Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

创建模型响应

服务器:https://openapi.felo.ai
客户端库

创建模型响应

​

兼容 OpenAI Responses API 的端点。成功的非流式响应使用 Responses 对象结构;当 stream=true 时,该端点返回 Responses SSE 事件。即使 HTTP 请求本身已完成,失败的 Responses 对象也可能带有 status=failed 和 error={code,message}。

请求头
  • X-Felo-Channel
    类型: string

    以逗号分隔、按顺序排列的公开通道代码。省略此请求头表示使用 default;default 必须单独使用。在钱包模式下,default 会从后往前扫描该模型实际生效的公开通道顺序,跳过未发布或不可用的通道,并选择第一个可用通道的提供方。它会纳入该提供方下上游模型 ID 和服务层级相同的可用端点。显式通道按客户端指定的顺序校验;仅提交第一个通道所属的提供方组。不会自动回退到其他提供方。旧版提供方请求头无法覆盖通道路由。

请求体·ResponsesRequest
必填
application/json
  • input
    必填

    Reference a Felo PDF with input_file.file_id or an uploaded image with input_image.file_id in a message content array. The model must be enabled for the attachment type. The combined limit for Felo file references is 50 MB per request. PDF file_url/file_data and image_url (HTTPS or a data URL) use the native format.

    • 类型: string

      Reference a Felo PDF with input_file.file_id or an uploaded image with input_image.file_id in a message content array. The model must be enabled for the attachment type. The combined limit for Felo file references is 50 MB per request. PDF file_url/file_data and image_url (HTTPS or a data URL) use the native format.

  • model
    类型: string
    必填
  • include
    类型: array string[]
  • instructions
    类型: string
  • max_output_tokens
    类型: integer
    最小值:  
    1

    Integer numbers.

  • metadata
    类型: object
    • propertyName
      类型: anything
  • previous_response_id
    类型: string
  • reasoning
    类型: object
    • propertyName
      类型: anything
  • service_tier
    类型: string | null

    目前仅支持 default(standard)。省略、null、别名以及不支持的字符串都会回退到 default;其他类型返回 HTTP 400。已配置的通道和价格保持不变。文本 API 发送提供方的标准值;Decisions 和生成类 API 省略该上游字段。

  • store
    类型: boolean
  • stream
    类型: boolean
  • temperature
    类型: number
    最小值:  
    0
  • propertyName
    类型: anything
  • text
    类型: object
    • propertyName
      类型: anything
  • tool_choice
    • 类型: string
  • tools
    类型: array object[]
    • propertyName
      类型: anything
  • top_p
    类型: number
    最小值:  
    0
    最大值:  
    1
  • propertyName
    类型: anything
响应
  • 200
    类型: object · ResponsesResponse

    响应对象或流式响应事件

    • id
      类型: string
      必填
    • object
      常量:  
      response
      必填
    • status
      类型: string 枚举
      必填
      值
      • completed
      • failed
      • in_progress
      • cancelled
      • queued
      • incomplete
    • error
      类型: object · ResponsesError
      • code
        类型: string
        必填
      • message
        类型: string
        必填
      • propertyName
        类型: anything
    • metadata
      类型: object
      • propertyName
        类型: anything
    • model
      类型: string
    • output
      类型: array object[]
      • propertyName
        类型: anything
    • output_text
      类型: string
    • usage
      类型: object · Usage

      提供方用量对象。字段因端点和提供方而异。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
  • 400
    类型: object · OpenAIErrorResponse

    请求、模型或提供方映射无效

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 401
    类型: object · OpenAIErrorResponse

    Felo API 密钥无效或缺失

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 402
    类型: object · OpenAIErrorResponse

    余额不足

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 403
    类型: object · OpenAIErrorResponse

    该账户未获授权使用此模型。已停用的模型也会在调用上游之前被拒绝。已接受的请求和任务继续进行。

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 429
    类型: object · OpenAIErrorResponse

    已达到消费或请求上限

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 502
    类型: object · OpenAIErrorResponse

    上游提供方请求失败

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
  • 503
    类型: object · OpenAIErrorResponse

    提供方或计费服务不可用

    兼容 OpenAI 的错误封装。Router 可能只包含 code 和 message,而不包含所有可选的上游字段。

    • error
      类型: object
      必填
      • message
        类型: string
        必填
      • code
        类型: string | null
      • param
        类型: string | null
      • type
        类型: string

        提供时为 OpenAI 兼容的错误类型。

      • propertyName
        类型: anything
    • propertyName
      类型: anything
    application/json
Request Example for post/api/v1/responses
curl https://openapi.felo.ai/api/v1/responses \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "gpt-5.5",
  "input": "Explain why the sky is blue in one sentence.",
  "stream": false
}'
{
  "id": "string",
  "object": "response",
  "status": "completed",
  "output": [
    {
      "additionalProperty": "anything"
    }
  ],
  "output_text": "string",
  "error": {
    "code": "string",
    "message": "string",
    "additionalProperty": "anything"
  },
  "usage": {
    "additionalProperty": "anything"
  },
  "model": "string",
  "metadata": {
    "additionalProperty": "anything"
  },
  "additionalProperty": "anything"
}
Create a model response

需要帮助?