cURL
simple-input
curl --request POST \ --url https://api.foxapi.cc/v1/responses \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "gpt-4o", "input": "解释一下 RESTful API 的设计原则" } '
{ "id": "resp_abc123", "object": "response", "created_at": 1757165031, "model": "<string>", "status": "completed", "output": [ { "type": "message", "id": "msg_abc123", "role": "assistant", "content": [ { "type": "output_text", "text": "Hello! How can I help you today?" } ] } ], "usage": { "input_tokens": 20, "output_tokens": 50, "total_tokens": 70 } }
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
模型名称
"gpt-4o"
用于生成响应的文本输入或消息列表
是否流式返回响应
采样温度 (0-2)
0 <= x <= 2
最大输出token生成数
核采样参数 (0-1)
0 <= x <= 1
上一个响应的ID,用于多轮对话
系统级指令
可用工具列表
Show child attributes
文本输出格式配置
响应对象
响应唯一ID
"resp_abc123"
对象类型
response
创建时间戳
1757165031
使用的模型
响应状态
completed
failed
in_progress
incomplete
"completed"
响应输出内容列表
用量统计