API 参考
Responses
POST /v1/responses
请求参数
| 参数 | 说明 |
|---|---|
modelstring必填 | 从本站模型列表复制完整模型 ID;可用模型取决于密钥绑定的分组。 |
inputstring | array必填 | 文本输入或 Responses 输入项目。 |
streamboolean | 设为 true 接收 SSE 事件。客户端必须同时处理正常结束与错误终态。 |
previous_response_idstring | 仅在对应上游支持并保留同一上下文时使用;切换上游账号可能无法继续旧响应。 |
curl http://localhost/v1/responses \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"input": "Hello!"
}'返回结构
非流式结果读取 output 项目及其中的 content。流式关注 response.output_text.delta、工具事件及 response.completed / response.failed 终态。