对话接口
OpenAI 兼容的 Chat Completions 与 Responses 接口,使用迁移过来的对话模型。
POST
/v1/chat/completionsPOST/v1/responses对话模型
| 模型 ID | 接口 | 说明 |
|---|---|---|
gpt-6.2-sol | Chat / Responses | 当前主用对话模型,长上下文 |
gpt-6.2-astra | Chat / Responses | 长上下文 |
gpt-6.1-sol | Chat / Responses | 6.1 Sol |
gpt-6-astra | Chat / Responses | 6 Astra |
gpt-6-sol | Chat / Responses | 6 Sol |
gpt-5.6-sol | Chat / Responses | 5.6 Sol |
gpt-5.6-terra | Chat / Responses | 5.6 Terra |
deepseek-v4.1-flash | Chat / Responses | DeepSeek V4.1 Flash,1M 上下文 |
当前对话渠道由 ycy 上游提供;umapipro、umapi混合 已迁移但余额不足,暂时禁用。模型以 模型广场 实时列表为准。
Chat Completions
curl
curl https://sub.chatacc.com/v1/chat/completions \
-H "Authorization: Bearer sk-你的Key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.2-sol",
"messages": [
{"role": "user", "content": "用一句话介绍河马"}
]
}'| 参数 | 必填 | 说明 |
|---|---|---|
model | 是 | 对话模型 ID |
messages | 是 | 消息数组,支持 system/user/assistant |
stream | 否 | 是否 SSE 流式返回 |
max_tokens | 否 | 最大输出 token 数 |
temperature | 否 | 采样温度 |
Responses
curl
curl https://sub.chatacc.com/v1/responses \
-H "Authorization: Bearer sk-你的Key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.2-sol",
"input": "用一句话介绍河马"
}'上下文说明
new-api 本身不额外压缩上下文,请求会透传到上游。上游声明的窗口决定实际上限,例如 gpt-6-astra 约 1.05M、gpt-6.2-sol 约 872k。new-api 的 272k 只是 gpt-6-astra 的长上下文计费分档,不是输入上限。
