curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-6.1-sol",
"input": "用一句话解释什么是量子纠缠。"
}
'import requests
url = "https://direct.evolink.ai/v1/responses"
payload = {
"model": "gpt-6.1-sol",
"input": "用一句话解释什么是量子纠缠。"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-6.1-sol', input: '用一句话解释什么是量子纠缠。'})
};
fetch('https://direct.evolink.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-6.1-sol',
'input' => '用一句话解释什么是量子纠缠。'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"gpt-6.1-sol\",\n \"input\": \"用一句话解释什么是量子纠缠。\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-6.1-sol\",\n \"input\": \"用一句话解释什么是量子纠缠。\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gpt-6.1-sol\",\n \"input\": \"用一句话解释什么是量子纠缠。\"\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5",
"object": "response",
"status": "completed",
"model": "gpt-6.1-sol",
"created_at": 1786705221,
"output": [
{
"id": "<string>",
"type": "web_search_call",
"status": "completed",
"content": [
{}
],
"encrypted_content": "<string>",
"result": "<string>"
}
],
"incomplete_details": {},
"usage": {
"input_tokens": 18,
"output_tokens": 42,
"total_tokens": 60,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 16
}
},
"tool_usage": {
"image_gen": {
"input_tokens": 74,
"input_tokens_details": {},
"output_tokens": 196,
"output_tokens_details": {},
"total_tokens": 270
}
},
"metadata": {}
}{
"error": {
"code": 400,
"message": "Invalid value: '__bogus__'. Supported values are: 'auto' and 'disabled'.",
"type": "invalid_request_error",
"param": "truncation"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/credits"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}GPT 全模型接口 - Responses 完整参数
- GPT 系列文本模型的 OpenAI 兼容 Responses 接口,通过
model选择具体模型(全部可选值见model参数的对照表) - 全系为推理模型,通过
reasoning.effort控制推理深度;推理 token 计入输出 token 计费 - Prompt 缓存自动生效:命中缓存的输入 token 按更低的缓存价计费
- 支持同步与流式(SSE)两种模式
- 服务端工具:
web_search(联网搜索)、code_interpreter(代码执行)、file_search(文档检索) - 内置生图工具:
image_generation(仅gpt-6-astra/gpt-6.1-sol/gpt-6-sol/gpt-6-luna),在对话中直接生成或修改图片 - 同时支持普通
function工具(客户端函数调用) - 多轮对话可用
previous_response_id串联 - 注意 部分参数各模型支持范围不同,逐参数见下方说明
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-6.1-sol",
"input": "用一句话解释什么是量子纠缠。"
}
'import requests
url = "https://direct.evolink.ai/v1/responses"
payload = {
"model": "gpt-6.1-sol",
"input": "用一句话解释什么是量子纠缠。"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-6.1-sol', input: '用一句话解释什么是量子纠缠。'})
};
fetch('https://direct.evolink.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-6.1-sol',
'input' => '用一句话解释什么是量子纠缠。'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"gpt-6.1-sol\",\n \"input\": \"用一句话解释什么是量子纠缠。\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-6.1-sol\",\n \"input\": \"用一句话解释什么是量子纠缠。\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gpt-6.1-sol\",\n \"input\": \"用一句话解释什么是量子纠缠。\"\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5",
"object": "response",
"status": "completed",
"model": "gpt-6.1-sol",
"created_at": 1786705221,
"output": [
{
"id": "<string>",
"type": "web_search_call",
"status": "completed",
"content": [
{}
],
"encrypted_content": "<string>",
"result": "<string>"
}
],
"incomplete_details": {},
"usage": {
"input_tokens": 18,
"output_tokens": 42,
"total_tokens": 60,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 16
}
},
"tool_usage": {
"image_gen": {
"input_tokens": 74,
"input_tokens_details": {},
"output_tokens": 196,
"output_tokens_details": {},
"total_tokens": 270
}
},
"metadata": {}
}{
"error": {
"code": 400,
"message": "Invalid value: '__bogus__'. Supported values are: 'auto' and 'disabled'.",
"type": "invalid_request_error",
"param": "truncation"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/credits"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。web_search、code_interpreter、file_search、mcp)在服务端执行,无需客户端回传结果,仅在本接口提供。Chat Completions 接口只支持普通 function 工具调用。background: true 的后台异步模式,也不提供按响应 ID 查询、取消、删除响应的端点。需要长时间生成时,请使用 stream: true 保持连接。image_generation(内置生图工具)目前仅 gpt-6-astra / gpt-6.1-sol / gpt-6-sol / gpt-6-luna 支持,其余模型不可用;单独生成图像也可使用图像系列模型接口。gpt-6-astra / gpt-6.1-sol / gpt-6-sol / gpt-6-luna 直接出图:在 tools 中声明 {"type": "image_generation"},模型会在对话中按需生成图片。- 选择图像模型:用工具的
model字段指定,可选gpt-image-2(默认)、gpt-image-2.5-sunburst、gpt-image-2.5-flare;quality、size、partial_images等参数与图像模型的官方参数一致(xhigh/max两档仅 2.5 系列可用) - 获取图片:图片以 base64 返回在
output中type为image_generation_call的输出项的result字段,不是 URL,请自行保存 - 图生图:在
input中附带input_image(公网 URL 或data:image/png;base64,...),并在文字中说明修改要求 - 多轮改图:用上一轮的
id作为previous_response_id,直接描述要怎么改 - 流式:设置
partial_images(0-3)可在生成过程中收到预览图事件response.image_generation_call.partial_image - 张数上限:未传
max_tool_calls时,单次请求最多生成 4 张;需要更多请显式设置 - 计费:文本与图像生成分别按 token 收费;图像生成的 token 用量见响应中的
tool_usage.image_gen
{
"model": "gpt-6.1-sol",
"input": "画一只坐在窗边的橘猫,水彩风格",
"tools": [{"type": "image_generation", "model": "gpt-image-2", "quality": "low", "size": "1024x1024"}]
}
id 作为下一轮的 previous_response_id 即可续接上下文。响应有留存期限,过期后该 ID 不再有效,请求会按新会话处理;对上下文准确性有强要求的场景,建议自行维护完整的 input 历史。授权
##所有接口均需 Bearer Token 认证##
获取 API Key:
访问 API Key 管理页面 获取你的 API Key
添加到请求头:
Authorization: Bearer YOUR_API_KEY
请求体
要调用的模型:
| 模型 ID | 上下文窗口 | 定位 |
|---|---|---|
gpt-6.1-sol | 1,050,000 | Sol 新版,以更低成本接近 Astra 的能力(推荐) |
gpt-6-astra | 1,050,000 | 面向高难度端到端任务的旗舰推理模型,支持内置生图工具 image_generation |
gpt-6-sol | 1,050,000 | 复杂编程与 Agent 工作流 |
gpt-6-luna | 1,050,000 | 高吞吐分类、抽取与成本控制 |
gpt-5.6-sol | 1,050,000 | GPT-5.6 家族,前沿推理 |
gpt-5.6-terra | 1,050,000 | GPT-5.6 家族,均衡生产 |
gpt-5.6-luna | 1,050,000 | GPT-5.6 家族,高吞吐与成本控制 |
gpt-5.5 | 400,000 | 通用推理模型 |
gpt-5.4 | 128,000 | 通用推理模型 |
gpt-5.2 | 400,000 | 通用推理模型 |
gpt-5.1 | 400,000 | 通用推理模型 |
gpt-6.1-sol, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.2, gpt-5.1 "gpt-6.1-sol"
模型输入:纯字符串,或输入项数组。
输入项的 content 支持 input_text(文本)、input_image(图像)两种块:
"input": [ { "role": "user", "content": [ { "type": "input_text", "text": "这张图里有什么?" }, { "type": "input_image", "image_url": "https://example.com/photo.png", "detail": "auto" } ] } ]
图像
image_url传入图片的公网 URLimage_url必须是字符串;写成{ "url": "..." }会返回400detail与image_url同级(不是嵌套在里面),可选auto(默认)/low/high/original- 图片需能被正常下载,否则返回
400
工具结果
- 数组中也可回填上一轮的
function_call_output等工具结果项
注意 本接口的块类型与 Chat Completions 接口不同(Chat 用 text / image_url),两者不可混用,写错会返回 400。
"搜索最近一周的 AI 新闻并用三句话总结。"
系统级指令,等价于在 input 最前面插入一条系统消息。使用 previous_response_id 续轮时,本参数不会从上一轮继承,需要每轮传入。
"你是一个简洁的助手,回答不超过三句话。"
是否流式返回(SSE 事件流,以 response.completed 结束)。默认 false。
false
生成的最大 token 数(含推理 token)。达到上限时 status 为 incomplete。
GPT-6 Astra / Sol / Luna 与 GPT-6.1 Sol 最大输出为 128,000 tokens,此预算包含推理 token。
2048
推理控制。
effort(推理深度)可选值随模型不同:
| 模型 | 可选值 |
|---|---|
gpt-6-astra / gpt-6.1-sol | low、medium、high、xhigh、max |
gpt-6-sol / gpt-6-luna | none、low、medium、high、xhigh、max |
gpt-5.6-sol / gpt-5.6-terra / gpt-5.6-luna | none、low、medium、high、xhigh、max |
gpt-5.5 / gpt-5.4 / gpt-5.2 | none、low、medium、high、xhigh |
gpt-5.1 | none、low、medium、high |
summary(推理摘要):auto / concise / detailed。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
mode(推理模式):standard / pro,gpt-6-astra / gpt-6-sol / gpt-6-luna 与 gpt-5.6 家族支持。
GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
context(推理上下文范围):auto / current_turn / all_turns,gpt-6-astra 与 gpt-5.6 家族支持。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
推理 token 按输出 token 计费,并计入 usage.output_tokens_details.reasoning_tokens。
GPT-6 Sol / Luna 已支持:model 可选 gpt-6-sol 或 gpt-6-luna,上下文窗口为 1,050,000 tokens,最大输出 128,000 tokens(含推理)。reasoning.effort 支持 none、low、medium(默认)、high、xhigh、max;Astra 与 6.1 Sol 不支持 none。需要推理与工具调用时,使用本接口。
Show child attributes
Show child attributes
输出文本控制:
format:{"type": "text"}(默认)、{"type": "json_object"},或{"type": "json_schema", "name": "...", "schema": {...}, "strict": true}输出结构化结果verbosity:low/medium/high,控制回答详略
text.verbosity — GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
Show child attributes
Show child attributes
工具声明。服务端工具在服务端执行,无需客户端回传结果:
| 工具类型 | 能力 |
|---|---|
web_search | 联网搜索并浏览网页(别名 web_search_preview) |
code_interpreter | 在沙箱中运行代码,需带 "container": {"type": "auto"} |
file_search | 检索已创建的向量库,需带 vector_store_ids |
mcp | 连接远程 MCP 服务,需带 server_label 与 server_url |
image_generation | 在对话中生成或修改图片,图片以 base64 返回(仅 gpt-6-astra / gpt-6.1-sol / gpt-6-sol / gpt-6-luna) |
同时支持普通 function 工具(客户端函数调用)。
注意 image_generation 仅 gpt-6-astra / gpt-6.1-sol / gpt-6-sol / gpt-6-luna 支持,其余模型不可用;单独生成图像请使用图像系列模型接口。
Show child attributes
Show child attributes
[{ "type": "web_search" }]
工具选择控制:"auto"(默认)/ "none" / "required",或用对象指定某个工具,如 {"type": "web_search"}。
none, auto, required 本次响应中允许的工具调用总次数上限(所有内置工具合计)。
注意 gpt-6-astra / gpt-6.1-sol / gpt-6-sol / gpt-6-luna 使用 image_generation 且未传该参数时,单次请求最多生成 4 张图;需要更多请显式设置。
5
是否允许模型在一轮中并行调用多个工具。默认 true。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
以下为既有模型规则(不含 GPT-6 Sol / Luna 与 GPT-6.1 Sol):
注意 gpt-6-astra、gpt-5.6 家族与 gpt-5.5 支持设为 false;在 gpt-5.4 / gpt-5.2 / gpt-5.1 上该参数不生效,始终按 true 处理。
true
上一轮响应的 id,用于串联多轮对话,无需重复上传历史消息。
注意 需配合 store: true(默认值)使用。响应有留存期限,过期后该 ID 不再有效;此时请求会按新会话处理,不会继承上下文。对上下文准确性有强要求的场景,建议自行维护完整的 input 历史。
"resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5"
是否在服务端留存本次响应,留存后才能被 previous_response_id 引用。默认 true。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:store: false 关闭留存的行为尚未完成渠道实测,不能据此字段已被接收就认定响应未被留存。
以下为既有模型规则(不含 GPT-6 Sol / Luna 与 GPT-6.1 Sol):
注意 gpt-6-astra、gpt-5.6 家族与 gpt-5.5 支持设为 false;在 gpt-5.4 / gpt-5.2 / gpt-5.1 上该参数不生效,始终按 true 处理。如不希望存储响应,请选择支持关闭存储的模型。
true
要求在响应中额外返回的内容,可选值:
reasoning.encrypted_contentmessage.output_text.logprobsweb_search_call.resultsweb_search_call.action.sourcesfile_search_call.resultscode_interpreter_call.outputsmessage.input_image.image_urlcomputer_call_output.output.image_url
注意 gpt-6-astra 与 gpt-6.1-sol 不支持 message.output_text.logprobs。
GPT-6:Astra 与 6.1 Sol 不支持输出 logprobs。Sol / Luna 仅在推理档位为 none 时使用;其他档位请移除 logprobs、top_logprobs,并从 Responses 的 include 中移除 message.output_text.logprobs。
["reasoning.encrypted_content"]
采样温度,取值 0 ~ 2,值越低输出越确定。
GPT-6:gpt-6-astra 与 gpt-6.1-sol 请省略此参数;gpt-6-sol / gpt-6-luna 仅在推理档位为 none 时可调节,其他档位请省略。省略推理档位时默认为 medium,不等于 none。
既有模型:gpt-5.4 / gpt-5.2 / gpt-5.1 上 temperature: 0 按默认值 1 处理;需要更确定的输出时可使用 0.01 等大于 0 的值。
0 <= x <= 21
核采样参数,取值 0 ~ 1。建议不要与 temperature 同时调整。
GPT-6:gpt-6-astra 与 gpt-6.1-sol 请省略此参数;gpt-6-sol / gpt-6-luna 仅在推理档位为 none 时可调节,其他档位请省略。省略推理档位时默认为 medium,不等于 none。
0 <= x <= 11
每个位置返回的候选 token 数量,取值 0 ~ 20,需配合 include: ["message.output_text.logprobs"] 使用。
GPT-6:Astra 与 6.1 Sol 不支持输出 logprobs。Sol / Luna 仅在推理档位为 none 时使用;其他档位请移除 logprobs、top_logprobs,并从 Responses 的 include 中移除 message.output_text.logprobs。
以下为既有模型规则(不含 GPT-6 Sol / Luna 与 GPT-6.1 Sol):
注意 仅 gpt-5.6 家族与 gpt-5.5 支持;其余模型不支持该参数。
0 <= x <= 202
频率惩罚,取值 -2 ~ 2,降低重复内容的概率。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
以下为既有模型规则(不含 GPT-6 Sol / Luna 与 GPT-6.1 Sol):
注意 gpt-5.6 家族支持调节;其余既有模型不支持该参数。GPT-6 Astra 不支持调节,只接受默认值 0,传入其他值会返回 400。
-2 <= x <= 20
存在惩罚,取值 -2 ~ 2,鼓励模型讨论新话题。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
以下为既有模型规则(不含 GPT-6 Sol / Luna 与 GPT-6.1 Sol):
注意 gpt-5.6 家族支持调节;其余既有模型不支持该参数。GPT-6 Astra 不支持调节,只接受默认值 0,传入其他值会返回 400。
-2 <= x <= 20
上下文超出窗口时的处理方式:disabled(默认,直接报错)或 auto(自动截断中间内容)。
auto, disabled "auto"
长会话自动压缩配置,例如 [{"type": "compaction", "compact_threshold": 100000}]:上下文超过阈值时自动压缩历史。
注意 仅 gpt-6-astra / gpt-6-sol / gpt-6-luna 与 gpt-5.6 家族支持;其余模型不支持该参数。
GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
缓存分组键。GPT-6 / GPT-5.6 自动处理缓存路由,不需要此字段来优化路由;可为不同用户或客户使用不同键,区分缓存复用与计费。同一组需复用前缀的请求应保持键一致。较早模型可使用稳定的键帮助缓存路由。
"app-agent-v1"
旧模型的缓存保留策略。GPT-6 / GPT-5.6 请使用 prompt_cache_options.ttl: "30m",不要把 24h 写入新字段。
in_memory, 24h "in_memory"
引用已创建的 Prompt 模板,形如 {"id": "pmpt_xxx", "version": "1", "variables": {...}}。
Show child attributes
Show child attributes
自定义键值对,随响应原样返回,便于业务侧标记。键与值均为字符串。
{ "trace_id": "abc-123" }
终端用户的稳定标识,用于滥用行为追踪。
GPT-6 Sol / Luna 与 GPT-6.1 Sol:此参数的支持范围尚未确认,基础请求建议省略。
以下为既有模型规则(不含 GPT-6 Sol / Luna 与 GPT-6.1 Sol):
注意 仅 gpt-6-astra 与 gpt-5.6 家族支持;其余模型不支持该参数。
"user-1024"
终端用户标识,用于区分调用来源。
"user-1024"
GPT-6 与 GPT-5.6 的 Prompt 缓存配置。默认使用隐式断点;mode: "explicit" 只使用显式断点,没有断点时不缓存。
Show child attributes
Show child attributes
{ "ttl": "30m", "mode": "implicit" }
响应
响应生成成功(JSON 对象;stream=true 时为 SSE 事件流,以 response.completed 结束)
响应的唯一标识,可作为下一轮的 previous_response_id
"resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5"
响应类型
response "response"
响应状态:completed 正常结束,incomplete 因达到 max_output_tokens 等原因未写完,failed 生成失败
completed, incomplete, failed "completed"
实际使用的模型名称
"gpt-6.1-sol"
创建时间戳
1786705221
按生成顺序排列的输出项:reasoning 项(推理摘要 / 加密推理内容)、工具调用项(如 web_search_call、code_interpreter_call、image_generation_call),以及最后含 output_text 内容的 message 项。
Show child attributes
Show child attributes
status 为 incomplete 时说明原因
内置工具用量。使用 image_generation 时,image_gen 为图像生成消耗的 token,与 usage 分开统计、分开按 token 收费
Show child attributes
Show child attributes
请求中传入的自定义键值对,原样返回