OpenAPI 接口规范
Responses 响应接口
面向支持 Responses 协议的文本模型,支持多类型 output 项与流式事件。
POST
/v1/responses在请求头中携带 Authorization: Bearer YOUR_BEEFTV_API_KEY。获取 API Key →
请求示例
替换为你的 API Key、真实任务编号与可访问的素材链接。
curl -X POST "https://beeftv.cn/v1/responses" \ -H "Authorization: Bearer YOUR_BEEFTV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.6-sol", "input": "用一句话解释异步任务轮询。", "max_output_tokens": 128 }'响应示例
以下为脱敏后的真实返回结构,点击切换状态码。
返回 Responses 对象(或 `stream: true` 时返回 SSE 事件流,直至 `response.completed`)。
{ "id": "resp_example", "object": "response", "created_at": 1795668068, "completed_at": 1795668068, "status": "completed", "model": "gpt-5.6-sol", "output": [ { "type": "message", "id": "msg_example", "role": "assistant", "status": "completed", "content": [ { "type": "output_text", "text": "OK", "annotations": [] } ] } ], "usage": { "input_tokens": 9, "input_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 }, "output_tokens": 5, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 14 }}请求体
application/json
| 参数 | 说明 |
|---|---|
model | 支持 Responses 协议的精确模型 ID(如 |
input | 文本输入或结构化输入项数组。 展开子字段文本输入或结构化输入项数组。 文本输入或结构化输入项数组。 |
instructions | 可选系统级指令。 |
max_output_tokens | 最大输出 Token 数。 最小值: |
stream | 是否启用 SSE 流式事件。 默认值: |
tools | 可选工具定义。 展开子字段可选工具定义。 [index: integer]? |
响应字段、响应头与状态码
响应体
application/json
application/json
application/json
application/json
application/json
application/json