Responses
创建 Responses 响应
POST
OpenAI Responses 格式。线上实测:qwen3.7-flash 可用(非流式与流式 SSE 均通过);deepseek-v3.2、kimi-k2.7-code 返回 400(Agent capabilities are not enabled for the current model),claude-haiku-4-5 返回 500(not implemented),请在这些模型上改用 Chat Completions 或 Anthropic Messages。
BearerAuthheader
鉴权Bearer <令牌>使用令牌(API Key)认证。
格式:Authorization: Bearer sk-xxxxxx。令牌在控制台「API 密钥」页创建。
application/json- body
model*stringinput?|array<>输入内容,可以是字符串或消息数组
instructions?stringmax_output_tokens?integertemperature?numbertop_p?numberstream?booleantools?array<>tool_choice?string|reasoning?previous_response_id?stringtruncation?string可选值
"auto""disabled"enable_thinking?boolean千问系列专用:设为 false 关闭思考,节省 token。其他模型请去掉。
成功创建响应
application/json- response
id?stringobject?stringcreated_at?integerstatus?string可选值
"completed""failed""in_progress""incomplete"model?stringoutput?array<>usage?curl -X POST "https://ai.athandra.com/v1/responses" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3.7-flash", "input": "用一句话介绍你自己", "max_output_tokens": 600, "enable_thinking": false }'{ "id": "resp_deaedc17-0a80-9bbf-bab3-9aa18d893838", "object": "response", "created_at": 1791367100, "model": "qwen3.7-flash", "status": "completed", "output": [ { "id": "msg_ffe2ee94", "type": "message", "role": "assistant", "status": "completed", "content": [ { "type": "output_text", "text": "我是通义千问,由阿里巴巴集团通义实验室独立开发的大型语言模型。" } ] } ], "usage": { "input_tokens": 52, "output_tokens": 18, "total_tokens": 70 }}