接口地址 URL
API Base URL 与 Jev 专用 /v1/decisions、/v1/systemone 请求格式,说明聊天接口不兼容和 convert_request_failed 的解决方法。
本页用于集中说明地区接入地址,以及账户与额度相关入口。
一、地区接入地址
| 使用地区 | 推荐 Base URL | 说明 |
|---|---|---|
| 全球(含中国大陆) | https://api.llm-token.cn/v1 | 全球智能路由:华东、华南、香港、新加坡、美国、德国节点,自动分配最快线路。 |
二、账户与额度入口
Jev 原生决策接口:不能使用聊天 URL
jev-latest 使用原生决策协议,不兼容普通聊天客户端。本站调用地址与 TypeSafe 官方直连地址不同,密钥也不能混用。
| 接入方式 | 完整 POST URL | 密钥 |
|---|---|---|
| 本站推荐入口 | https://api.llm-token.cn/v1/decisions | 贵数智能 API Key |
| 本站兼容入口 | https://api.llm-token.cn/v1/systemone | 贵数智能 API Key |
| TypeSafe 官方直连 | https://api.typesafe.ai/v1/systemone | TypeSafe API Key |
客户端 Base URL 若已是 https://api.llm-token.cn/v1,仅追加 /decisions 或 /systemone,不要拼成 /v1/v1/decisions。
请求体必须包含 model、state 和 questions;questions 是以问题 ID 为键的对象,每题填写 type 和 instructions。choice 的 criteria 是选项对象,score 的 criteria 是有序数组,noul 用于是/否概率。不要发送聊天格式的 messages,也不要启用流式输出。
最小可用请求格式
请先把贵数智能 API Key 放入环境变量 LLM_API_KEY。示例会发出真实调用,请在确认额度和计费后执行。响应读取 answers.is_urgent.noul 和 usage,不是 choices[0].message.content。
curl -sS -X POST https://api.llm-token.cn/v1/decisions \
-H "Authorization: Bearer $LLM_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<'JSON'
{
"model": "jev-latest",
"state": "The order is due today and the payment has failed.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this require urgent attention?"
}
}
}
JSON如果出现 500 / convert_request_failed,且错误包含 this channel only supports native decisions requests,请检查实际请求是否仍发往 /v1/chat/completions 或 /v1/messages。该错误表示协议不匹配,不是额度不足;充值或改成按量计费都不会改变客户端发送的协议。先修正 URL 和请求体,不要反复重发原聊天请求。