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.13.0",
"answers": {
"is_urgent": {
"type": "noul",
"noul": 0.49
}
},
"usage": {
"input_tokens": 280,
"output_tokens": 23
}
}
},
"success": true,
"errors": [],
"messages": []
}
Jev
Jev 决策接口
- 同步决策接口,不是聊天接口,不支持流式输出
- 提交一段材料
state和若干判断题questions,同一次响应返回每题的概率、选项或分数 - 调用时模型名填
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.13.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.13.0。这个字段由上游返回,请求里不要填版本号。object
必填
判断内容。包含
state 和 questions。显示 字段说明
显示 字段说明
string | object | array
必填
要判断的材料。可以是一句话,也可以是对象或数组。只放完成判断所需的数据,不要放 API Key、密码等敏感信息。
object
必填
题目表,不能为空。键名由你自己起,每道题是一个对象。每道题都要有
type 和 instructions。noul— 是非题。返回noul,范围 0 到 1,表示「是」的概率。criteria可选,形状为{ "true": "怎样算是", "false": "怎样算不是" }。choice— 多选一。criteria必填,是「选项名 → 说明」的对象。返回的choice是被选中的选项名。score— 打分。criteria必填,是至少两项的有序数组,从低到高。返回的score是落在哪一档的数字,第一项是 0,可以是小数。例如三档时1.99表示几乎落在第三项。
noul、choice、score。不要传 stream,本接口只返回一次完整 JSON。
Response
响应体是上游原始 JSON,本接口不做改写。判断结果在result.result.answers。
boolean
本次请求是否成功
array
错误列表。成功时为空数组
array
附加提示。没有提示时为空数组
object
上游运行结果
显示 字段说明
显示 字段说明
string
运行状态。
Completed 表示已经完成object
模型回答
显示 字段说明
显示 字段说明
使用示例
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.13.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": "是否需要人工升级"
}
}
}
}
注意事项
- 本接口不是聊天接口,不能传
messages,也不能传stream。 - 上下文窗口为 32000 tokens。
- 业务失败时 HTTP 状态码可能仍为 200,请同时看
success和errors。鉴权失败返回401,model缺失或 JSON 不合法返回400,模型不存在返回404。