curl https://aireiter.com/api/v1/systemone \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev",
"input": {
"state": "The payment API timed out.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this need a person right now?"
}
}
}
}'
import os
import requests
response = requests.post(
"https://aireiter.com/api/v1/systemone",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={
"model": "jev",
"input": {
"state": "The payment API timed out.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this need a person right now?",
}
},
},
},
)
print(response.json()["result"]["result"]["answers"])
const response = await fetch("https://aireiter.com/api/v1/systemone", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jev",
input: {
state: "The payment API timed out.",
questions: {
is_urgent: {
type: "noul",
instructions: "Does this need a person right now?",
},
},
},
}),
});
const data = await response.json();
console.log(data.result.result.answers);
{
"result": {
"state": "Completed",
"result": {
"model": "jev-1.14.0",
"answers": {
"is_urgent": {
"type": "noul",
"noul": 0.49
}
},
"usage": {
"input_tokens": 280,
"output_tokens": 23
}
}
},
"success": true,
"errors": [],
"messages": []
}
Jev
Jev 决策接口
- 同步决策接口,不是聊天接口,不支持流式输出
- 提交一段材料
state和若干判断题questions,同一次响应返回每题的概率、选项、分数或图中位置 - 支持图片输入和 Box 定位题(Beta)
- 调用时模型名填
jev
POST
/
api
/
v1
/
systemone
curl https://aireiter.com/api/v1/systemone \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev",
"input": {
"state": "The payment API timed out.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this need a person right now?"
}
}
}
}'
import os
import requests
response = requests.post(
"https://aireiter.com/api/v1/systemone",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={
"model": "jev",
"input": {
"state": "The payment API timed out.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this need a person right now?",
}
},
},
},
)
print(response.json()["result"]["result"]["answers"])
const response = await fetch("https://aireiter.com/api/v1/systemone", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jev",
input: {
state: "The payment API timed out.",
questions: {
is_urgent: {
type: "noul",
instructions: "Does this need a person right now?",
},
},
},
}),
});
const data = await response.json();
console.log(data.result.result.answers);
{
"result": {
"state": "Completed",
"result": {
"model": "jev-1.14.0",
"answers": {
"is_urgent": {
"type": "noul",
"noul": 0.49
}
},
"usage": {
"input_tokens": 280,
"output_tokens": 23
}
}
},
"success": true,
"errors": [],
"messages": []
}
Authorizations
string
必填
Body
string
必填
模型名称。固定填
jev。响应里的 result.result.model 是上游实际使用的版本号,例如 jev-1.14.0。这个字段由上游返回,请求里不要填版本号。object
必填
判断内容。包含
state、questions,带图片时再加 assets。显示 字段说明
显示 字段说明
string | object | array
必填
要判断的材料。可以是一句话,也可以是对象或数组。只放完成判断所需的数据,不要放 API Key、密码等敏感信息。带图片时,在
state 里写图片的引用名,例如 { "photo": "img-7f3a91" },引用名对应 assets 里的键。object
object
必填
题目表,不能为空。键名由你自己起,每道题是一个对象。每道题都要有
type 和 instructions。noul— 是非题。返回noul,范围 0 到 1,表示「是」的概率。criteria可选,形状为{ "true": "怎样算是", "false": "怎样算不是" }。choice— 多选一。criteria必填,是「选项名 → 说明」的对象。返回的choice是被选中的选项名。score— 打分。criteria必填,是至少两项的有序数组,从低到高。返回的score是落在哪一档的数字,第一项是 0,可以是小数。例如三档时1.99表示几乎落在第三项。box— 图中定位(Beta)。必须带图片,不接受criteria。instructions写要找什么、在哪张图里,例如"the car in `photo`"。返回一个框住目标的矩形。
noul、choice、score、box。不要传 stream,本接口只返回一次完整 JSON。
Response
响应体是上游原始 JSON,本接口不做改写。判断结果在result.result.answers。
boolean
本次请求是否成功
array
错误列表。成功时为空数组
array
附加提示。没有提示时为空数组
object
上游运行结果
显示 字段说明
显示 字段说明
string
运行状态。
Completed 表示已经完成object
模型回答
显示 字段说明
显示 字段说明
string
上游实际使用的版本号,例如
jev-1.14.0object
每道题的结果。键名与请求里的题目名一致。
noul:{ "type": "noul", "noul": 0.49 }。0.8及以上可视为「是」,0.2及以下可视为「不是」,接近0.5表示拿不准。choice:choice为选中的选项名,probabilities为各选项概率,confidence为置信度。score:score为分数,legend把档位下标映射回你提交的文案。box:box为{ "top", "bottom", "left", "right" }四条边,取值 0 到 1,是相对图片高、宽的比例,原点在左上角;confidence为置信度。画框时用各边乘以图片的像素宽高。
使用示例
curl https://aireiter.com/api/v1/systemone \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev",
"input": {
"state": "The payment API timed out.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this need a person right now?"
}
}
}
}'
import os
import requests
response = requests.post(
"https://aireiter.com/api/v1/systemone",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={
"model": "jev",
"input": {
"state": "The payment API timed out.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this need a person right now?",
}
},
},
},
)
print(response.json()["result"]["result"]["answers"])
const response = await fetch("https://aireiter.com/api/v1/systemone", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jev",
input: {
state: "The payment API timed out.",
questions: {
is_urgent: {
type: "noul",
instructions: "Does this need a person right now?",
},
},
},
}),
});
const data = await response.json();
console.log(data.result.result.answers);
{
"result": {
"state": "Completed",
"result": {
"model": "jev-1.14.0",
"answers": {
"is_urgent": {
"type": "noul",
"noul": 0.49
}
},
"usage": {
"input_tokens": 280,
"output_tokens": 23
}
}
},
"success": true,
"errors": [],
"messages": []
}
多题示例
choice 和 score 可以和 noul 放在同一次请求里。
{
"model": "jev",
"input": {
"state": {
"ticket": "支付接口间歇性超时,数据库连接池接近耗尽。"
},
"questions": {
"next_action": {
"type": "choice",
"instructions": "选择最安全的下一步",
"criteria": {
"rollback": "回滚最近变更",
"observe": "继续观察并采样日志"
}
},
"risk": {
"type": "score",
"instructions": "评估本次故障的风险",
"criteria": ["低", "中", "高", "极高"]
},
"escalate": {
"type": "noul",
"instructions": "是否需要人工升级"
}
}
}
}
图片与 Box 示例(Beta)
图片放在assets 里,state 用引用名指向它;题目里用 `photo` 指代这张图。下例同时问「图里有没有车」和「车在哪」。
{
"model": "jev",
"input": {
"state": { "photo": "img-7f3a91" },
"assets": {
"img-7f3a91": {
"type": "image",
"format": "jpg",
"data_base64": "/9j/4AAQSkZJRg..."
}
},
"questions": {
"has_car": {
"type": "noul",
"instructions": "Is there a car in `photo`?"
},
"car": {
"type": "box",
"instructions": "the car in `photo`"
}
}
}
}
answers:
{
"has_car": { "type": "noul", "noul": 0.97 },
"car": {
"type": "box",
"box": { "top": 0.24, "bottom": 0.81, "left": 0.15, "right": 0.74 },
"confidence": 0.74
}
}
noul,noul 很低就忽略这个框。
图片要求
| 项目 | 限制 |
|---|---|
| 格式 | PNG 或 JPEG 静态图,不支持动图;WebP、GIF、HEIC 等需先转成 PNG 或 JPEG |
| 单张大小 | 解码后不超过 16 MiB |
| 宽、高 | 每边 280 到 1568 像素,超出范围直接报错,不会自动缩放 |
| 请求体 | 含 JSON 和 base64 在内不超过 32 MiB |
- 发送前把长边缩到 1568 像素以内。上游会去掉 EXIF,不会按 EXIF 方向旋转,手机照片请先把像素本身转正。
- 图片会折算成输入 token,计入
usage.input_tokens,也占用上下文窗口。一张约 800 像素的图大约 1500 tokens。 - 请求里任何一张图片不合格,整个请求失败,不会返回部分结果。
注意事项
- 本接口不是聊天接口,不能传
messages,也不能传stream。 - 图片输入和 Box 题目前是 Beta,请求格式、结果和限制可能随版本变化,不建议直接用于生产决策。
- 上下文窗口为 32000 tokens。
- 业务失败时 HTTP 状态码可能仍为 200,请同时看
success和errors。鉴权失败返回401,model缺失或 JSON 不合法返回400,模型不存在返回404。