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(標準)。省略、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

需要協助嗎?