开发者文档

完整的 API 接入指南与示例代码

📍 Base URL
/v1
cURL
Python
Node.js
Anthropic SDK
接口一览

对话补全 (Streaming)

curl /v1/chat/completions \
  -H "Authorization: Bearer sk-你的密钥" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "你好,请介绍一下你自己"}
    ],
    "stream": true
  }'