Skip to content

API 文档

基本信息

  • 获取 API Key

获取 API Key

  • 查看模型列表

获取模型列表

对话补全

  • 基础对话

    curl -X POST \
        -H "Authorization: Bearer API_KEY_HERE" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{
        "model": "DeepSeek-R1-Distill-Qwen-14B",
        "max_tokens": 4096,
        "messages": [
            {
                "role": "user",
                "content": "Hello"
            }
        ],
        "stream": true
    }' https://maas.qc-ai.cn/api/v1/qc-maas/chat/completions/apikey
    
  • 多轮对话

    • 把历史对话按顺序拼接到messages中即可,以下是一个messages的例子
    [
        {"role": "user", "content": "What's the highest mountain in the world?"},
        {"role": "system", "content": "The highest mountain in the world is Mount Everest."},
        {"role": "user", "content": "What is the second?"}
    ]
    

错误码

  • 400 参数异常,如(输入token超过最大限制)
  • 401 apikey鉴权失败
  • 402 所调用的模型为付费模型且余额<=0的情况
  • 422 输入格式错误
  • 429 达到了最大访问频率限制
  • 500 服务异常
  • 503 服务器繁忙,稍后重试