Skip to content

Responses ​

清霄 API 的 OpenAI Responses 格式接口。

项值
PathPOST /v1/responses
Basehttps://api.qingxiaocloud.com
AuthAuthorization: Bearer sk-…
Content-Typeapplication/json

可用 model 与接口开放情况以控制台 / 实际接口为准。未列出的字段是否透传亦以控制台 / 实际接口为准。

相关路径:

方法路径说明
POST/v1/responses创建响应
POST/v1/responses/compact压缩上下文;请求/响应字段表以控制台 / 实际接口为准
GET/v1/responses/{id}按 id 查询;字段表以控制台 / 实际接口为准

请求示例 ​

bash
curl -sS "https://api.qingxiaocloud.com/v1/responses" \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL_ID",
    "input": "用一句话介绍清霄 API"
  }'

请求字段 ​

字段必填说明
model*模型 ID(控制台);示例请求含此字段
inputstring | array(字符串或消息数组)
top_pnumber
streamboolean
toolsarray
tool_choicestring | object
reasoningobject
previous_response_idstring
truncation"auto" | "disabled"

temperature / max_output_tokens 等本页未列出的字段是否可用,以控制台 / 实际接口为准。

响应字段(200) ​

字段说明
id / object / created_at / status / modelobject 例:response;status 例:completed
output[]type / id / status / role;content[]:type / text
usageprompt_tokens / completion_tokens / total_tokens 及 details(含 reasoning_tokens)

响应示例 ​

json
{
  "id": "string",
  "object": "response",
  "created_at": 0,
  "status": "completed",
  "model": "string",
  "output": [
    {
      "type": "string",
      "id": "string",
      "status": "string",
      "role": "string",
      "content": [{ "type": "string", "text": "string" }]
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0
  }
}

清霄 · 专业 LLM 聚合平台