适合聊天、多轮对话、Agent 编排和结构化文本输出。
端点列表
你应该怎么选
- 如果你在接传统聊天补全,优先用
chat.completions - 如果你希望统一文本、结构化输出和后续多模态扩展,优先用
responses
请求要点
- 使用
Authorization: Bearer {API_KEY}鉴权 chat.completions以messages为核心responses以input、instructions、response_format为核心
返回要点
chat.completions常从choices[0].message.content读取文本responses常从output_text或output[]中读取结果- 流式模式下需要按 SSE chunk 逐段处理
