Appearance
Responses
清霄 API 的 OpenAI Responses 格式接口。
| 项 | 值 |
|---|---|
| Path | POST /v1/responses |
| Base | https://api.qingxiaocloud.com |
| Auth | Authorization: Bearer sk-… |
| Content-Type | application/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(控制台);示例请求含此字段 |
input | string | array(字符串或消息数组) | |
top_p | number | |
stream | boolean | |
tools | array | |
tool_choice | string | object | |
reasoning | object | |
previous_response_id | string | |
truncation | "auto" | "disabled" |
temperature / max_output_tokens 等本页未列出的字段是否可用,以控制台 / 实际接口为准。
响应字段(200)
| 字段 | 说明 |
|---|---|
id / object / created_at / status / model | object 例:response;status 例:completed |
output[] | type / id / status / role;content[]:type / text |
usage | prompt_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
}
}