跳转到主要内容
适合聊天、多轮对话、Agent 编排和结构化文本输出。

端点列表

你应该怎么选

  • 如果你在接传统聊天补全,优先用 chat.completions
  • 如果你希望统一文本、结构化输出和后续多模态扩展,优先用 responses

请求要点

  • 使用 Authorization: Bearer {API_KEY} 鉴权
  • chat.completionsmessages 为核心
  • responsesinputinstructionsresponse_format 为核心

返回要点

  • chat.completions 常从 choices[0].message.content 读取文本
  • responses 常从 output_textoutput[] 中读取结果
  • 流式模式下需要按 SSE chunk 逐段处理

参考旧页