跳转到主要内容
POST
/
responses
创建一次 response
curl --request POST \
  --url https://api.orcarouter.ai/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "openai/gpt-4.1",
  "input": "<string>",
  "instructions": "<string>",
  "previous_response_id": "<string>",
  "tools": [
    {
      "type": "<string>"
    }
  ],
  "tool_choice": "<string>",
  "temperature": 123,
  "top_p": 123,
  "max_output_tokens": 123,
  "stream": true,
  "reasoning": {},
  "store": true,
  "metadata": {}
}
'

授权

Authorization
string
header
必填

OrcaRouter API 密钥形如 sk-orca-...。请在 Authorization: Bearer sk-orca-... 头中传入。

请求体

application/json
model
string
必填
示例:

"openai/gpt-4.1"

input
必填
instructions
string
previous_response_id
string

先前响应的 ID,用于在不重新发送完整消息历史的情况下继续 一段多轮对话。

tools
object[]

自由形式的 Responses-API 工具数组。每项的 type 选择工具。 常见值有 function(自定义函数工具,与 Chat Completions 形态相同)、web_search(内置联网接地)、mcp (Model Context Protocol)、code_interpreter。 内置工具调用(如 web_search_call)按次计费——见 运维 / 计费与用量。

tool_choice
temperature
number
top_p
number
max_output_tokens
integer
stream
boolean
reasoning
object

OpenAI Responses-API 推理配置。

store
boolean

上游是否可存储请求/响应。默认允许;通道设置 disable_store 可覆盖。

metadata
object

响应

200

OK