curl --request POST \
--url https://direct.evolink.ai/v1beta/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-decision-1",
"input": "The blue mug I ordered on Monday arrived cracked on Wednesday.",
"questions": {
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?"
}
}
}
'{
"answers": {
"is_defect": {
"type": "noul",
"noul": 0.94,
"confidence": 0.94
},
"next_action": {
"type": "choice",
"choice": "human_escalation",
"probabilities": {
"human_escalation": 0.76,
"replacement_shipment": 0.18,
"troubleshooting_flow": 0.04,
"instant_refund": 0.02
},
"confidence": 0.76
},
"churn_risk": {
"type": "score",
"score": 2.99,
"legend": {
"0": "No churn signal",
"1": "Mild frustration",
"2": "Mentions alternatives",
"3": "Threatens to cancel"
},
"probabilities": {
"0": 0,
"1": 0,
"2": 0.01,
"3": 0.99
},
"confidence": 0.99
}
},
"usage": {
"total_input_tokens": 324,
"input_tokens_by_modality": [
{
"modality": "text",
"tokens": 324
}
],
"total_output_tokens": 0,
"total_tokens": 324
}
}Gemini Decisions - 完整参数文档
- 使用
gemini-decision-1对文本、图片、音频、视频和 PDF 进行结构化判断,支持是非概率、单选和评分 - 同步返回全部答案,不支持流式、Batch API 和上下文缓存
- 仅按输入 token 计费,输出不计费;每次请求有最低收费,详见 模型价格
- 需要对话或生成文字时,请使用 Gemini 原生 API
curl --request POST \
--url https://direct.evolink.ai/v1beta/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-decision-1",
"input": "The blue mug I ordered on Monday arrived cracked on Wednesday.",
"questions": {
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?"
}
}
}
'{
"answers": {
"is_defect": {
"type": "noul",
"noul": 0.94,
"confidence": 0.94
},
"next_action": {
"type": "choice",
"choice": "human_escalation",
"probabilities": {
"human_escalation": 0.76,
"replacement_shipment": 0.18,
"troubleshooting_flow": 0.04,
"instant_refund": 0.02
},
"confidence": 0.76
},
"churn_risk": {
"type": "score",
"score": 2.99,
"legend": {
"0": "No churn signal",
"1": "Mild frustration",
"2": "Mentions alternatives",
"3": "Threatens to cancel"
},
"probabilities": {
"0": 0,
"1": 0,
"2": 0.01,
"3": 0.99
},
"confidence": 0.99
}
},
"usage": {
"total_input_tokens": 324,
"input_tokens_by_modality": [
{
"modality": "text",
"tokens": 324
}
],
"total_output_tokens": 0,
"total_tokens": 324
}
}https://direct.evolink.ai,https://api.evolink.ai 为备用地址。授权
使用 EvoLink API Key 进行 Bearer 认证。
获取 API Key:
访问 API Key 管理页面。
请求头:
Authorization: Bearer YOUR_API_KEY
请求体
请求体仅接受 model、input、questions 三个字段。传入其他字段(如 stream)会返回 400 invalid_request。
模型 ID,使用 gemini-decision-1。
本模型不是对话模型,只能用于本接口。例如把它发到 GPT Decisions 接口 /v1/decisions 会返回 400 model_endpoint_mismatch。
gemini-decision-1 "gemini-decision-1"
所有问题共用的输入:一段文本、一个内容块,或由内容块组成的数组(文本、图片、音频、视频或 PDF 文档)。输入不能为空。相邻的文本块会按顺序直接拼接、中间不加分隔符,需要时请自己加空格或换行。要传 JSON 数据时,先序列化成字符串再作为文本传入。
1"I was charged twice for my order."
要判断的问题,以“问题键名 → 问题”的对象传入,1 到 1,000 个。键名由你自己定(1 到 64 个字符,只能是 [A-Za-z0-9_-]+),答案会放在同名键下返回。模型看不到键名,请把完整问题写在 instructions 里。
| 类型 | 用来做什么 | 主要结果 |
|---|---|---|
noul | 判断一个说法是否成立 | noul:“是”的概率(0.01 到 0.99) |
choice | 从固定选项中选一个 | choice:概率最高的选项 ID |
score | 按有序等级打分 | score:按概率加权的等级分 |
每个问题都独立地针对同一份输入判断,互相看不到;不同类型可以混用。问题之间存在依赖时,请拆为多次请求。输入和全部问题共用 262,144 token 的上下文窗口。
Show child attributes
Show child attributes
{
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?"
}
}
响应
每个问题一条答案,键名与请求中的问题键名一致
每个问题一条答案,键名与请求中的问题键名一致,答案的 type 与对应问题一致。设置了 prompt_feedback.block_reason 时为空
Show child attributes
Show child attributes
输入内容过滤的反馈。设置了 block_reason 时表示输入被拦下,没有判断任何问题,answers 为空。若以 HTTP 200 返回,仍会计费,详见 usage。
Show child attributes
Show child attributes