账户:查看余额、用量和管理 Key。Account: view balance, usage, and keys.
第一次使用 AI 智能体Your first AI coding agent
不需要编程基础。先认识账户、API Key 和客户端,再按画面示意完成第一次连接。
No coding background is required. Learn what an account, API key, and client are, then follow the visual steps for your first connection.
先认识三个概念Learn three basics first
API Key:像专门给软件使用的密码。API key: a password used by software.
智能体或客户端:您输入任务、AI执行工作的应用;不限于某两个品牌。Agent or client: the app where you give the AI tasks; it is not limited to two brands.
注册、验证、充值、保存 KeyRegister, verify, add credit, and save your key
- 打开首页,点击“免费注册”。
- 填写姓名、邮箱和至少8位密码。
- 立即复制以
ats_开头的API Key,并保存到密码管理器。页面关闭后不会再次完整显示。 - 到邮箱点击验证链接,再点击页面上的“确认验证邮箱”。验证成功后会自动返回控制台。
- 登录控制台,选择¥20首次体验、¥50轻量、¥100标准或¥1,000高频使用。所有档位只有预存余额不同,模型、价格、功能和调用限制相同。
ats_your_key_here必须替换成您自己的Key。- Open the home page and click “Sign up free.”
- Enter your name, email, and a password of at least 8 characters.
- Immediately copy the API key beginning with
ats_and store it in a password manager. It will not be shown in full again. - Open the verification email, then click “Confirm email” on the page. You will return to the console automatically.
- Choose ¥20 one-time trial, ¥50 light use, ¥100 standard use, or ¥1,000 high usage. All amounts have identical model access, pricing, features, and request limits; only prepaid balance differs.
ats_your_key_here with your own key.已有账户?Already registered?
连接测试、Key 丢失处理和 API Key 管理的逐步说明仅在登录后控制台显示。Connection tests, lost-key recovery, and step-by-step API key management are available only in the signed-in console.
登录后查看补充教程Open the signed-in guide选择适合您的客户端Choose the right client
Codex
适合想让 AI 查看项目、修改文件和运行测试的学习者。macOS 使用桌面端;Windows 可先使用命令行方式。For learners who want AI to inspect projects, edit files, and run tests. Use the desktop app on macOS or start with the CLI on Windows.
Claude Code
在 macOS 终端、Windows PowerShell/WSL 或 Linux 中使用,适合逐步学习命令行。Runs in macOS Terminal, Windows PowerShell/WSL, or Linux and is suitable for learning command-line workflows.
手机和平板Phone and tablet
必须使用明确支持自定义 API 地址的客户端;官方聊天 App 不能当作 APIGate 设置入口。Use a client that explicitly supports a custom API endpoint. Official chat apps are not APIGate configuration screens.
画面为步骤示意,按钮名称可能随软件版本略有变化。Illustrations are representative; labels may change between app versions.
选择可用的 Model IDChoose an available Model ID
Model ID 是软件识别模型的准确名称,必须从下表复制,不能凭显示名称猜测。
A Model ID is the exact name software uses. Copy it from the live list below instead of guessing from a display name.
| 供应商Provider | Model ID | 名称Name | 适合Best for |
|---|---|---|---|
| Loading… | |||
第一次使用 Jev:让 AI 按规则做判断Your first Jev call: structured decisions from clear rules
普通聊天模型适合写作和对话;Jev 更像一张会阅读资料的判断表。您把待判断的文字放进 state,把问题和标准放进 questions,它会返回可供程序继续处理的结构化结果。
Chat models are designed for writing and conversation. Jev behaves more like an evaluation sheet that can read evidence. Put the material in state, define questions and criteria in questions, and receive structured results that software can process.
jev-latest 放进普通聊天客户端自动读取的模型列表。Cherry Studio、Chatbox或其他OpenAI兼容聊天窗口会调用 /v1/chat/completions,而Jev只接受 /v1/systemone、MCP工具 jev_decide 或本页OpenAPI方式。APIGate no longer publishes jev-latest in the catalog automatically imported by chat clients. Cherry Studio, Chatbox, and other OpenAI-compatible chat screens call /v1/chat/completions; Jev uses /v1/systemone, the jev_decide MCP tool, or the OpenAPI method documented here.放入事实材料,不要放密码、证件或隐私资料。Add the evidence, without passwords, identity documents, or private data.
写清楚要判断什么,以及每个选项或等级的标准。State what to evaluate and define every option or score level.
结果使用固定字段,适合分流、排序和自动化。Fixed response fields make routing, ranking, and automation easier.
适合交给 JevGood uses
- 判断一条消息是否紧急Decide whether a message is urgent
- 在客服、技术、账务等固定选项中分流Route to support, technical, billing, or other fixed choices
- 按您给出的等级评估风险、情绪或质量Score risk, tone, or quality against your rubric
不要这样使用Do not use it for
- 写文章、自由聊天或生成图片Writing articles, open chat, or image generation
- 把
jev-latest填进普通聊天模型选单Selectingjev-latestin a normal chat-model menu - 让模型代替医疗、法律、财务或人事负责人作最终决定Replacing accountable people in medical, legal, financial, or employment decisions
先认识三种问题The three question types
| 类型Type | 它回答什么What it answers | 怎么看结果How to read it |
|---|---|---|
noul | 一个是或否的问题A yes-or-no question | 0 接近“否”,1 接近“是”0 is closer to no; 1 is closer to yes |
choice | 从您定义的固定选项中选一个One option from the set you define | 看 choice 和各选项的 probabilitiesRead choice and each option's probabilities |
score | 按从低到高的等级标准评分A rating across ordered levels | score 可能落在两个等级之间score may land between two levels |
Mac:复制整段到“终端”Mac: paste the whole block into Terminal
按 Command+空格,输入“终端”,按 Return。复制下面整段,粘贴后按 Return;出现提示时再粘贴自己的 ats_ Key。输入 Key 时屏幕没有字符属于正常现象。
Press Command+Space, type Terminal, and press Return. Paste the whole block. When prompted, paste your own ats_ key; the key remains hidden while you type.
read -s "APIGATE_API_KEY?Paste your ats_ key: "
export APIGATE_API_KEY
curl -sS https://api.apigate.biz/v1/systemone \
-H "Authorization: Bearer $APIGATE_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<'JSON'
{
"state": "客户说:扣款已经成功,但课程仍显示未购买,请尽快处理。",
"model": "jev-latest",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "这条消息是否表达了紧迫性?"
},
"department": {
"type": "choice",
"instructions": "应该由哪个团队处理?",
"criteria": {
"billing": "扣款、付款、发票或退款问题",
"technical": "故障、连接或系统错误",
"course": "课程内容或学习方法"
}
}
}
}
JSON
Paste your ats_ key: 提示。此时才粘贴真正的 APIGate Key,再按回车;输入过程中屏幕不会显示字符,也不会出现星号,这是隐藏输入,不是没有粘贴成功。看到下一行命令提示符后,继续执行 export APIGATE_API_KEY,再执行测试命令。Paste your ats_ key:. Paste the real APIGate key there and press Return. No characters or asterisks appear while typing; this is hidden input. When the normal prompt returns, run export APIGATE_API_KEY, then run the test command.Windows:复制整段到 PowerShellWindows: paste the whole block into PowerShell
按 Windows 键,输入 PowerShell 并打开。复制下面整段,右键粘贴后按 Enter;提示输入 Key 时再粘贴自己的 ats_ Key。
Press the Windows key, search for PowerShell, and open it. Paste the whole block, press Enter, then paste your ats_ key when prompted.
$secure = Read-Host "Paste your ats_ key" -AsSecureString
$pointer = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure)
$apiKey = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($pointer)
@'
{
"state": "客户说:扣款已经成功,但课程仍显示未购买,请尽快处理。",
"model": "jev-latest",
"questions": {
"is_urgent": {"type":"noul","instructions":"这条消息是否表达了紧迫性?"},
"department": {
"type":"choice",
"instructions":"应该由哪个团队处理?",
"criteria": {
"billing":"扣款、付款、发票或退款问题",
"technical":"故障、连接或系统错误",
"course":"课程内容或学习方法"
}
}
}
}
'@ | curl.exe -sS https://api.apigate.biz/v1/systemone -H "Authorization: Bearer $apiKey" -H "Content-Type: application/json" --data-binary '@-'
[Runtime.InteropServices.Marshal]::ZeroFreeBSTR($pointer)
Remove-Variable secure,pointer,apiKeymodel、answers 和 usage。在本例中,is_urgent.noul 越接近 1 越紧急;department.choice 是建议分流的团队。它是模型判断,不是事实证明,重要结果仍要由人复核。The response contains model, answers, and usage. Here, an is_urgent.noul value nearer 1 means more urgent, while department.choice is the suggested routing team. This is a model judgment, not proof; review consequential results.失败时先看这里Check this if the test fails
| 400 unsupported_endpoint | 您在普通聊天窗口中选择了Jev。请换回聊天模型;要使用Jev,请复制本页Mac或Windows测试,或连接MCP工具 jev_decide。Jev was selected in a normal chat screen. Switch that chat to a chat model, then use the Mac/Windows example on this page or connect the jev_decide MCP tool. |
|---|---|
| 401 | Key 缺失、贴错或已停用。重新复制,前后不要带空格。The key is missing, invalid, or disabled. Copy it again without spaces. |
| 402 | 账户余额不足或达到预算上限。The account has insufficient balance or reached its budget. |
| 422 | 请求格式不完整,常见原因是漏了 state、model 或 questions。The request is incomplete, often missing state, model, or questions. |
| 429 / 529 | 请求过快或上游繁忙,稍后再试,不要连续点击。The rate limit or upstream load was reached. Wait before trying again. |
让智能体自己调用 JevLet your agent call Jev
下面四种入口连接的是同一个 jev_decide 工具。智能体负责整理输入和发起请求,APIGate 仍会检查您的 Key、余额、月预算和调用频率,并按 Jev 的实际用量记账。
All four options connect to the same jev_decide tool. APIGate still checks your key, balance, monthly budget, and rate limit, then records the actual Jev usage.
APIGATE_API_KEY 的环境变量。不要把完整 Key 写进任务、课程作业或截图。Your computer needs an environment variable named APIGATE_API_KEY. Never put the full key in a task, course submission, or screenshot.Codex
打开 Codex 设置,进入 MCP servers,选择 Add server 和 Streamable HTTP。如果您的版本没有这个页面,就把下面配置合并到 ~/.codex/config.toml,保存后重启 Codex。
Open Codex Settings, choose MCP servers, Add server, and Streamable HTTP. If your version has no such screen, merge this block into ~/.codex/config.toml, save, and restart Codex.
[mcp_servers.apigate_jev]
url = "https://api.apigate.biz/mcp/jev"
bearer_token_env_var = "APIGATE_API_KEY"
enabled_tools = ["jev_decide"]Claude Code
在终端或 PowerShell 执行对应命令。它会把远程工具保存到您的个人配置。执行 claude mcp list,看到 Connected 才算连接完成。
Run the matching command in Terminal or PowerShell. Then run claude mcp list; the setup is complete when the server shows Connected.
claude mcp add --transport http --scope user apigate-jev https://api.apigate.biz/mcp/jev \
--header "Authorization: Bearer ${APIGATE_API_KEY}"
claude mcp listclaude mcp add --transport http --scope user apigate-jev https://api.apigate.biz/mcp/jev --header "Authorization: Bearer $env:APIGATE_API_KEY"
claude mcp listOpenClaw
打开 OpenClaw 控制台的 /settings/mcp 页面,新增远程 HTTP 工具。名称填 apigate-jev,URL 填 https://api.apigate.biz/mcp/jev,传输方式选 streamable-http。请求头添加 Authorization,值为 Bearer ${APIGATE_API_KEY}。保存后运行 openclaw mcp probe apigate-jev,工具清单里应出现 jev_decide。
Open /settings/mcp in the OpenClaw Control UI. Add a remote HTTP server named apigate-jev, use the endpoint below, choose streamable-http, and add the Authorization header. After saving, run openclaw mcp probe apigate-jev and confirm that jev_decide is listed.
Coze、Dify 与其他平台Coze, Dify, and other platforms
如果平台支持导入 OpenAPI,请导入下面的网址,并把鉴权方式设为 Bearer Token。平台只支持普通聊天模型、没有“工具”“插件”“OpenAPI”或“MCP”入口时,就不能直接调用 Jev。
If the platform imports OpenAPI, use the URL below and choose Bearer Token authentication. A chat-only platform without Tools, Plugins, OpenAPI, or MCP cannot call Jev directly.
https://api.apigate.biz/openapi/jev.jsonjev_decide 判断下面这条客户消息是否紧急,并在 billing、technical、course 中选择负责团队”。如果智能体先向您确认是否调用工具,选择允许。答案中出现结构化的 answers,同时 APIGate 控制台新增一笔用量,才算完整通过。Ask the agent to use jev_decide to assess urgency and choose a team. Approve the tool call if prompted. A structured answers result and a new APIGate usage entry confirm the full path.Jev 的 MCP 与 OpenAPI 工具由 APIGate 统一提供;底层问题字段以APIGate provides the Jev MCP and OpenAPI tool. For the underlying question schema, see the TypeSafe 官方 API 文档official TypeSafe API reference为准。.
先认清:指令究竟要贴在哪里First: know where each item belongs
这一页会出现三类内容。放错位置不会完成设置,所以先看每个入口的外观和用途。
This page uses three different places. Learn what each one looks like before pasting anything.
或
姓名@Mac ~ %
粘贴“命令”Paste commands
看到深色代码框并写着“环境命令”“测试命令”,就贴在这里,贴完按 Enter。Paste environment and test commands here, then press Enter.
[model_providers...]
粘贴“配置”Paste configuration
这是一个文字文件。用记事本、文本编辑或 Codex 设置打开,合并后保存,不要贴到终端。This is a text file. Open it in an editor, merge the configuration, and save it.
输入“任务”Enter a task
这里只写您希望 AI 完成的工作。不要把完整 API Key 放进普通聊天框。Enter the work you want done. Never paste a full API key into a normal chat box.
~ 是什么:在 Mac 终端中,它代表您当前账户的个人文件夹。~/.codex 就是个人文件夹里名为 .codex 的目录。
为什么平常看不到:名称以英文句点开头的目录在 Mac 中通常会隐藏。您不需要改成“显示所有隐藏文件”,用下面的“前往文件夹”就能直接打开。
What ~ means: on macOS it is your current account's home folder. ~/.codex is the hidden .codex folder inside it.
Codex
画面路线:打开项目文件夹 → 设置 APIGate → 新建任务 → 输入最小测试。Visual route: open a project → configure APIGate → create a task → run the minimum test.
适合希望让 AI 读取、修改和测试本地项目的学习者。请先选自己的系统,每一步完成后再继续。
For learners who want an AI agent to read, edit, and test local projects.
- Download Codex for your system from OpenAI Developers. Open it once after installation, then quit it completely.
- On macOS, open Terminal and place the key into the current login session without displaying it.
- Back up and edit
~/.codex/config.toml. Merge the block below without overwriting unrelated settings. - Reopen Codex, choose a practice project folder, and use
gpt-5.4-mini. Avoid nano because some client tools may not be supported. - Create a task and enter
Reply only: APIGATE_OK. Then match the new request in the APIGate console; the reply alone does not prove the provider.
Mac:从打开“终端”开始Mac: start by opening Terminal
- 打开终端:按 Command+空格,输入“终端”或
Terminal,按 Return。看到以%或$结尾的一行,就找对了。 - 打开配置最快路线:在 Codex 右上角点齿轮,进入 Codex 设置,再点“Open config.toml”。如果没有这个按钮,点桌面蓝白笑脸“访达”,按 Shift+Command+G,粘贴
~/.codex,按 Return。 - 文件夹不存在:回到终端,复制下面“建立并打开配置文件”整段,粘贴后按 Return。它只会建立目录、在已有文件旁保存备份,并用文本编辑打开。
- 合并配置:把“复制配置”框内文字贴进
config.toml。已有内容要保留;同名设置只留一份。按 Command+S 保存。 - 设置 Key:回到终端,复制“Mac 环境命令”。提示输入时粘贴以
ats_开头的 Key,按 Return。屏幕不显示字符属于正常现象。 - 重新打开并测试:完全退出 Codex 后再打开,选择不含敏感资料的练习文件夹,新建任务输入
Reply only: APIGATE_OK。
mkdir -p ~/.codex
touch ~/.codex/config.toml
cp ~/.codex/config.toml ~/.codex/config.toml.backup
open -a TextEdit ~/.codex/config.tomlread -s "APIGATE_API_KEY?Paste your ats_ key: "
export APIGATE_API_KEY
launchctl setenv APIGATE_API_KEY "$APIGATE_API_KEY"
model = "gpt-5.4-mini"
model_provider = "apigate"
[model_providers.apigate]
name = "APIGate"
base_url = "https://api.apigate.biz/v1"
env_key = "APIGATE_API_KEY"
wire_api = "responses"
requires_openai_auth = false如果只测试命令行,可在同一个终端执行:codex exec "Reply only: APIGATE_OK"。注销或重新启动 Mac 后,需要重新设置环境变量。请使用上述 config.toml 测试;单独另存为 apigate.config.toml 不会自动创建 profile。
CLI-only test: codex exec "Reply only: APIGATE_OK". Set the environment variable again after logging out of macOS. Use the config.toml above for the test; a separately named file is not automatically a profile.
下一步:在同一个终端执行 codex exec --skip-git-repo-check "只回复:APIGATE_OK"。如果终端提示 Not inside a trusted directory,这是因为当前不在受信任的 Git 项目目录;保留上面的 --skip-git-repo-check 即可完成一次测试,不是 Key 错误。注销或重新启动 Mac 后,需要重新设置环境变量。
Next, in the same terminal run codex exec --skip-git-repo-check "Reply only: APIGATE_OK". If Codex says Not inside a trusted directory, you are outside a trusted Git project; keep --skip-git-repo-check for this one-shot test. It is not a key error. Set the environment variable again after logging out or restarting macOS.
model: gpt-5.4-mini 和 provider: apigate,随后实际返回 APIGATE_OK;最后在 APIGate 控制台看到一笔新的模型用量。只看到“GPT-5”或模型名称,不足以证明请求经过 APIGate。Windows:从打开 PowerShell 开始Windows: start by opening PowerShell
- 打开 PowerShell:按一下键盘上的 Windows 键,输入
PowerShell。点“Windows PowerShell”;如果只看到“终端”,打开后点标签旁的下拉箭头,选择 PowerShell。看到PS C:\Users\您的名称>就找对了。 - 打开隐藏目录:按 Win+E 打开文件资源管理器,再按 Ctrl+L 选中地址栏,粘贴
%USERPROFILE%\.codex,按 Enter。这样不需要先打开“显示隐藏项目”。 - 目录不存在:回到 PowerShell,复制下面“建立并打开配置文件”整段,粘贴后按 Enter。记事本询问是否建立文件时,选择“是”。
- 合并配置:把“复制配置”框内文字贴进记事本。已有设置要保留;按 Ctrl+S 保存。文件名必须是
config.toml,不能是config.toml.txt。 - 设置并测试:复制“Windows 环境命令”到同一个 PowerShell 窗口。提示输入 Key 时粘贴并按 Enter,屏幕不显示字符属于正常现象。
New-Item -ItemType Directory -Force "$HOME\.codex" | Out-Null
if (-not (Test-Path "$HOME\.codex\config.toml")) { New-Item -ItemType File "$HOME\.codex\config.toml" | Out-Null }
Copy-Item "$HOME\.codex\config.toml" "$HOME\.codex\config.toml.backup" -Force
notepad "$HOME\.codex\config.toml"Windows 先使用 Codex CLI。用户级配置位于 $HOME\.codex\config.toml;不要放到项目里的 .codex\config.toml,因为自定义模型供应商设置只从用户级配置读取。桌面界面若没有“自定义供应商”入口,也不要把 Key 填进普通 ChatGPT 登录框。
On Windows, begin with the Codex CLI and use the user-level $HOME\.codex\config.toml. Do not put provider settings in a project-local config.
$secure = Read-Host "Paste your ats_ key" -AsSecureString
$ptr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure)
$env:APIGATE_API_KEY = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($ptr)
[Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ptr)
codex exec "Reply only: APIGATE_OK"APIGATE_OK,并且 APIGate 控制台出现一笔新的模型用量。若 PowerShell 报“找不到 codex”,表示 Codex CLI 尚未安装或新安装后的窗口还没重开,不是 Key 错误。config.toml。Windows 弹出更改扩展名警告时,确认文件确实是本教程的纯文字配置后再继续。Claude Code
画面路线:安装 Claude Code → 打开项目文件夹 → 设置两个变量 → 先做单次测试。Visual route: install Claude Code → open a project → set two variables → run a one-shot test.
- 按照 Claude Code 官方安装说明完成安装。Windows 请选择官方支持的 PowerShell、WSL 或 Git for Windows 路线。
- 打开终端并进入一个不含敏感资料的练习项目文件夹。
- 执行下面的安全输入命令,把
ats_Key 作为令牌,并把 Base URL 指向 APIGate。 - 先执行单次测试。看到
APIGATE_OK后,再运行claude进入交互模式。
- Install Claude Code using the official setup guide. On Windows, use the supported PowerShell, WSL, or Git for Windows route.
- Open Terminal and enter a practice project folder that contains no sensitive data.
- Run the secure input commands below. They use your
ats_key as the token and point the Base URL to APIGate. - Run the one-shot test first. After seeing
APIGATE_OK, runclaudefor interactive mode.
read -s "APIGATE_KEY?Paste your ats_ key: "
export ANTHROPIC_AUTH_TOKEN="$APIGATE_KEY"
unset APIGATE_KEY
export ANTHROPIC_BASE_URL="https://api.apigate.biz"
claude -p --model claude-haiku-4-5 "Reply only: APIGATE_OK"Windows PowerShell
Windows用户不要执行上面的read/export命令,请复制下面整段到PowerShell。看到APIGATE_OK后,使用同一个PowerShell窗口运行claude --model claude-sonnet-4-6。不要先执行/login。
Windows users must use the PowerShell block below instead of the read/export commands. After APIGATE_OK, run claude --model claude-sonnet-4-6 in the same window. Do not run /login first.
$secure = Read-Host "Paste your ats_ key" -AsSecureString
$ptr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure)
$env:ANTHROPIC_AUTH_TOKEN = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($ptr)
[Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ptr)
Remove-Item Env:ANTHROPIC_API_KEY -ErrorAction SilentlyContinue
$env:ANTHROPIC_BASE_URL = "https://api.apigate.biz"
claude -p --model claude-haiku-4-5 "Reply only: APIGATE_OK"cc switch等第三方工具不属于APIGate支持范围,可能无法自动读取模型。请从本页Model ID表复制名称,并通过claude --model MODEL_ID选择。出现“Please run /login · 403”通常表示当前PowerShell没有正确设置上述环境变量。Third-party tools such as cc switch are not an APIGate-supported selection method and may not discover models. Copy a name from this page and use claude --model MODEL_ID. “Please run /login · 403” usually means the environment variables were not set in the current PowerShell window.这些变量只对当前终端窗口有效,关闭后Key不会写进配置文件。Claude Code的提示缓存会按官方缓存倍率计费,并显示在APIGate用量记录中。
These variables apply only to the current Terminal window, so the key is not written to a config file. Claude Code prompt caching is billed using the official cache multipliers and recorded in APIGate usage.
OpenClaw
- 先执行
openclaw --version确认已安装。 - 设置当前终端的
APIGATE_API_KEY。 - 打开
~/.openclaw/openclaw.json,将下面内容合并到现有配置;不要删除原来的渠道、工具或代理设置。 - 运行
openclaw config validate和openclaw models status。 - 重启Gateway,再发送单次测试。
- Run
openclaw --versionto confirm installation. - Set
APIGATE_API_KEYin the current shell. - Open
~/.openclaw/openclaw.jsonand merge the block below. Keep existing channels, tools, and agent settings. - Run
openclaw config validateandopenclaw models status. - Restart the Gateway and run a one-shot test.
{
models: {
mode: "merge",
providers: {
apigate: {
baseUrl: "https://api.apigate.biz/v1",
apiKey: "${APIGATE_API_KEY}",
api: "openai-completions",
models: [{
id: "gpt-5.4-mini",
name: "GPT-5.4 mini via APIGate",
reasoning: true,
input: ["text", "image"],
contextWindow: 400000,
maxTokens: 128000
}]
}
}
},
agents: {
defaults: {
model: { primary: "apigate/gpt-5.4-mini" }
}
}
}read -s "APIGATE_API_KEY?Paste your ats_ key: "
export APIGATE_API_KEY
openclaw config validate
openclaw doctor
openclaw gateway restart
openclaw agent --local --message "Reply only: APIGATE_OK"通用API与最小测试Generic API and minimum test
如果您使用Python、JavaScript、Cherry Studio或其他支持自定义OpenAI地址的软件,Base URL使用https://api.apigate.biz/v1,Key使用您的ats_ Key。
For Python, JavaScript, Cherry Studio, or any client supporting a custom OpenAI endpoint, use https://api.apigate.biz/v1 as the Base URL and your ats_ key.
curl https://api.apigate.biz/v1/chat/completions \
-H "Authorization: Bearer ats_your_key_here" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.4-nano","messages":[{"role":"user","content":"Reply only: APIGATE_OK"}]}'APIGATE_OK · 控制台出现一笔新用量a new usage row appears in the console.iPhone、iPad 与 AndroidiPhone, iPad, and Android
确认客户端明确提供“自定义供应商”或“自定义 API”。Confirm the client explicitly supports a custom provider or API.
填写 Base URL、自己的 ats_ Key 和控制台列出的 Model ID。Enter the Base URL, your ats_ key, and a listed Model ID.
发送最小测试,确认回复后再用于个人学习。Send the minimum test before using it for personal learning.
接入后:完成一次可核对的验收
保存并重新打开客户端 → 回复 APIGATE_OK → 在练习文件夹读取一份无敏感资料的文本 → 核对工具结果及 APIGate 控制台同一时间、对应 Key/模型的调用记录。
模型自报身份不能证明线路正确;CLI 成功不能代替桌面端测试。
查看验收清单与逐项排障 →常见问题与排错Common problems and fixes
| 现象Symptom | 含义Meaning | 处理Fix |
|---|---|---|
| 401 | Key缺失、错误或已停用Missing, invalid, or disabled key | 重新复制Key;确认没有空格;必要时在控制台轮换Copy again, remove spaces, or rotate it in the console |
| 402 | 余额不足、月度预算或单 Key 限额Insufficient balance, monthly budget, or per-key limit reached | 先核对 error 字段,区分余额、月预算和单 Key 限额Check the error field before changing credit or limits |
| 400 unsupported_model | 模型名不在当前价格表Model is not in the active price list | 使用本页列出的完整模型名Use an exact model name shown on this page |
| 400 unsupported_endpoint · Jev | 在普通聊天窗口中调用了JevJev was called from a normal chat screen | 聊天窗口换回聊天模型;Jev请使用本页专用教程、/v1/systemone或MCP工具Use a chat model in chat; call Jev through this guide, /v1/systemone, or MCP |
| 429 | 限流、上游过载或额度限制;需看具体错误Rate limit, upstream overload, or quota; inspect the error | 按错误类型处理;额度问题不能靠等待解决Follow the error type; waiting does not fix quota issues |
| 连接超时Timeout | 客户端当前无法完成连接The client cannot complete the connection | 登录控制台打开补充教程进行连接测试;联系支持时只提供时间、系统和错误信息,不要发送完整 KeySign in and follow the supplementary connection test. Give support only the time, OS, and error—never the complete key |