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 请求一致。