logo

Responses API

LLMoxy 提供 OpenAI Responses 相容路由:

POST /v1/responses

如果你的應用已經使用 Responses API 結構,或需要 inputinstructionsreasoningprevious_response_id 等欄位,可以使用該介面。

基礎請求

curl https://llmoxy.com/v1/responses \
  -H "Authorization: Bearer <LLMOXY_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "input": "Explain gateway routing in one sentence.",
    "instructions": "Be direct."
  }'

常用欄位

欄位說明
model必填,模型 ID。
input字串或訊息風格陣列。
instructions系統級指令文本。
max_output_tokens輸出 Token 限制。
temperature, top_p採樣控制參數。
stream上游支援時啟用流式輸出。
tools, tool_choice工具呼叫參數。
reasoning.effort支援推理的模型可使用 lowmediumhigh
reasoning.summary上游支援時請求推理摘要。
previous_response_id上游支援時繼續上一輪響應。
truncationautodisabled

該介面面向相容性。實際行為取決於選中的模型。

對話壓縮

LLMoxy 還提供:

POST /v1/responses/compact

支援的模型可透過該介面壓縮長對話歷史。認證方式與其他 /v1 請求一致。