控制推理模型努力程度

Reasoning Effort

POST https://api.apizt.com/v1/chat/completions 在线调试 →

示例使用 gpt-6.1-sol。Chat 使用 reasoning_effort,仅接受 low/medium/high/xhigh/max;不要传 none 或 minimal。工具调用请改用 Responses 函数调用。 有推理时不传 temperature/top_p/logprobs;Responses 改用 reasoning.effort。

▼ Authorization

在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token

示例: Authorization: Bearer ********************

请求参数

Header 参数
Authorizationstring必需
Bearer Token;从环境变量 tokenba_API_KEY 读取。
Content-Typestring必需
示例:application/json
Body 参数application/json
modelstring必需
示例:gpt-6.1-sol
messagesarray必需
结构见完整 JSON 示例。
reasoning_effortstring可选
GPT-6.1 Sol 接受 low、medium、high、xhigh、max。可降低努力程度来控制时延;不支持 none/minimal。
max_completion_tokensnumber可选
包含可见文本与推理 token 的输出上限。
streamboolean可选
示例:true

完整 JSON 请求体

{
  "model": "gpt-6.1-sol",
  "messages": [
    {
      "role": "user",
      "content": "请解释 1 到 100 的整数之和如何计算。"
    }
  ],
  "reasoning_effort": "medium",
  "max_completion_tokens": 1000,
  "stream": true
}

请求示例代码

curl --fail-with-body --no-buffer --request POST 'https://api.apizt.com/v1/chat/completions' \
  --header "Authorization: Bearer ${tokenba_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "gpt-6.1-sol",
  "messages": [
    {
      "role": "user",
      "content": "请解释 1 到 100 的整数之和如何计算。"
    }
  ],
  "reasoning_effort": "medium",
  "max_completion_tokens": 1000,
  "stream": true
}'
async function main() {
  const headers = {
  "Authorization": "Bearer " + process.env.tokenba_API_KEY,
  "Content-Type": "application/json"
};
  const body = JSON.stringify({
  "model": "gpt-6.1-sol",
  "messages": [
    {
      "role": "user",
      "content": "请解释 1 到 100 的整数之和如何计算。"
    }
  ],
  "reasoning_effort": "medium",
  "max_completion_tokens": 1000,
  "stream": true
});
  const response = await fetch("https://api.apizt.com/v1/chat/completions", { method: "POST", headers, body });
  if (!response.ok) throw new Error("HTTP " + response.status + ": " + await response.text());
  const decoder = new TextDecoder();
  for await (const chunk of response.body) process.stdout.write(decoder.decode(chunk, { stream: true }));
  process.stdout.write(decoder.decode());
}
main().catch(console.error);
import os
import requests

headers = {"Authorization": "Bearer " + os.environ["tokenba_API_KEY"]}
payload = {'model': 'gpt-6.1-sol',
 'messages': [{'role': 'user', 'content': '请解释 1 到 100 的整数之和如何计算。'}],
 'reasoning_effort': 'medium',
 'max_completion_tokens': 1000,
 'stream': True}
response = requests.post('https://api.apizt.com/v1/chat/completions', headers=headers, json=payload, timeout=120, stream=True)
response.raise_for_status()
response.encoding = "utf-8"
for line in response.iter_lines(decode_unicode=True):
    print(line, flush=True)

返回响应

流式返回 SSE,增量位于 choices[].delta。按事件拼接文本;结束事件为 data: [DONE]。以下 JSON 为单个事件的结构示例,不代表实际调用结果。

{
  "id": "chatcmpl_demo",
  "object": "chat.completion.chunk",
  "model": "gpt-6.1-sol",
  "choices": [
    {
      "index": 0,
      "delta": {
        "role": "assistant",
        "content": "你好"
      },
      "finish_reason": null
    }
  ]
}

当前模型与版本

依据 apizt 价格页,同步于 。以下型号按目录声明的协议与本页用途筛选;不代表所有参数和功能通用。切换前请核对型号说明、令牌分组与参数差异。Gemini 原生接口需同时替换 URL 中的模型 ID。

模型 ID能力标签支持分组
gpt-6.1-sol对话,工具,识图,思考
分组(9)

Azure-Gpt-2、Azure-Gpt-3、Azure-Gpt-4、Azure-Gpt-5、Codex-Gpt-1、Codex-Gpt-2、Codex-Gpt-3、Openai-Gpt-1、Openai-Gpt-2

gpt-6-astra对话,工具,识图,思考
分组(10)

Azure-Gpt-2、Azure-Gpt-3、Azure-Gpt-4、Azure-Gpt-5、Azure-Gpt-6、Codex-Gpt-1、Codex-Gpt-2、Codex-Gpt-3、Openai-Gpt-1、Openai-Gpt-2

gpt-6-sol对话,工具,识图,思考
分组(10)

Azure-Gpt-2、Azure-Gpt-3、Azure-Gpt-4、Azure-Gpt-5、Azure-Gpt-6、Codex-Gpt-1、Codex-Gpt-2、Codex-Gpt-3、Openai-Gpt-1、Openai-Gpt-2

gpt-6-luna对话,工具,识图,思考
分组(10)

Azure-Gpt-2、Azure-Gpt-3、Azure-Gpt-4、Azure-Gpt-5、Azure-Gpt-6、Codex-Gpt-1、Codex-Gpt-2、Codex-Gpt-3、Openai-Gpt-1、Openai-Gpt-2

claude-sonnet-5-5对话,识图,工具
分组(6)

AWS-Bedrock-2、AWS-Claude-2、AWS-Claude-3、Claude-Code-1、Claude-Code-2、Kiro-Claude-1

claude-opus-5-5对话,工具,识图
分组(6)

AWS-Bedrock-2、AWS-Claude-2、AWS-Claude-3、Claude-Code-1、Claude-Code-2、Kiro-Claude-1

claude-sonnet-5对话,识图,工具
分组(8)

AWS-Bedrock-2、AWS-Claude-2、AWS-Claude-3、Anthropic-Claude-1、Claude-Code-1、Claude-Code-2、Kiro-Claude-1、Vertex-Claude-1

claude-fable-5-1对话,识图,工具
分组(5)

AWS-Claude-2、AWS-Claude-3、Anthropic-Claude-1、Claude-Code-1、Claude-Code-2

共列入 220 个候选型号。查看完整模型、版本与接口目录。