LLMoxy 提供 OpenAI Responses 兼容路由:
POST /v1/responses
如果你的应用已经使用 Responses API 结构,或需要 input、instructions、reasoning、previous_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 | 支持推理的模型可使用 low、medium、high。 |
reasoning.summary | 上游支持时请求推理摘要。 |
previous_response_id | 上游支持时继续上一轮响应。 |
truncation | auto 或 disabled。 |
该接口面向兼容性。实际行为取决于选中的模型。
对话压缩
LLMoxy 还提供:
POST /v1/responses/compact
支持的模型可通过该接口压缩长对话历史。认证方式与其他 /v1 请求一致。
