d3
POST
/v1/systemone
model:
d3
d3 是 vLLM Semantic Router 的决策模型系列 Decision 3.0 中的 27B 模型,由 Qwen3.8-27B 训练而来,能读文本、JSON、图片和视频。 d3-flash 是同一 API 的 9B 版本:更快,准确率略低。
| 端点 | POST /v1/systemone |
| 输入 | state(文本或任意 JSON),可选图片和视频 |
| 输出 | 每个问题一个答案,附每个选项的概率 |
| 问题类型 | choice、noul、score |
| 输入上限 | 每个问题 32,768 token;超长请求会被拒绝,不会截断 |
| 流式 | ❌ |
| 计费 | 按输入 token,对应 usage.input_tokens;output_tokens 恒为 0 |
| 稳定性 | experimental |
| 许可证 | Apache-2.0 |
| 字段 | ||
|---|---|---|
model | 必填 | d3 |
state | 必填 | 要判断的情境:字符串或任意 JSON 值 |
questions | 必填 | 对象,键是你自己起的问题名,值是问题,至少一个 |
images | 可选 | 图片数组,每项是 data: URL 字符串(PNG、JPEG 或 WebP) |
videos | 可选 | 视频数组,每项是 data: URL 字符串(MP4、WebM、QuickTime 或 Matroska) |
每个问题都能看到请求里的所有图片和视频。模型卡给出的读取预算是:每张图片最多 1.6 百万像素; 每段视频按每秒 2 帧读取,最多 32 帧,每帧最多 0.2 百万像素。整个请求体须小于 5 MB。
输入外层的提示词是固定的,所以顶层的 instructions 字段会以 400 拒绝。
type | criteria | 答案 |
|---|---|---|
choice | 选项对象 {"选项名": "这个选项的含义", …} | choice、每个选项的 probabilities,以及 confidence(所选选项的概率) |
noul | 无;问题写在 instructions 里 | noul(答案为”是”的概率)、yes 和 no 的 probabilities、confidence |
score | 有序数组,等级从低到高 | score(期望等级,从 0 数起)、legend、每个等级的 probabilities,以及 confidence(最可能等级的概率) |
每个问题都带 instructions,即用自然语言写的问题本身。
{ "id": "decision-aa4a76300e0af8f5", "object": "structured_decision", "created": 1792166448, "model": "d3", "answers": { "team": { "type": "choice", "choice": "auth", "probabilities": { "auth": 0.9993, "billing": 0.0000, "other": 0.0006 }, "confidence": 0.9993 }, "urgent": { "type": "noul", "noul": 0.9967, "probabilities": { "yes": 0.9967, "no": 0.0033 }, "confidence": 0.9967 }, "severity": { "type": "score", "score": 1.8641, "legend": { "0": "Low", "1": "Medium", "2": "High" }, "probabilities": { "0": 0.0034, "1": 0.1292, "2": 0.8674 }, "confidence": 0.8674 } }, "usage": { "input_tokens": 352, "output_tokens": 0 }, "diagnostics": { "team": { "label_mass": 1.0, "argmax_is_label": true }, "urgent": { "label_mass": 1.0, "argmax_is_label": true }, "severity": { "label_mass": 1.0, "argmax_is_label": true } }}diagnostics 按问题给出:落在该问题答案标签上的概率占比(label_mass),以及概率最高的那个编码是否属于这些标签(argmax_is_label)。
请用概率,而不只看最高的那个答案:noul 为 0.55 和 0.99 都算”是”,但只有后者适合直接自动执行。
错误采用常规的 {"error": { … }} 格式:
| 状态码 | message 示例 |
|---|---|
| 400 | unknown question type 'bogus'; supported: ['choice', 'noul', 'score'] |
| 400 | question 'q': the prompt has 33356 tokens, more than max_model_len=32768; nothing is truncated |
| 400 | this model reads a fixed prompt, so it takes no instructions |
| 401 | API Key 缺失或错误 |
curl https://developer.amd.com.cn/radeon/api/v1/systemone \ -H "Authorization: Bearer $RADEON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "d3", "state": {"ticket": "Customer cannot log in after resetting the password; error 403 on every attempt."}, "questions": { "team": {"type": "choice", "instructions": "Which team should handle this?", "criteria": {"auth": "Identity and login", "billing": "Payments and invoices", "other": "Anything else"}}, "urgent": {"type": "noul", "instructions": "Is the customer blocked from using the product?"}, "severity": {"type": "score", "instructions": "How severe is this?", "criteria": ["Low", "Medium", "High"]} } }'带视频:
import base64, requests
clip = base64.b64encode(open("clip.mp4", "rb").read()).decode()r = requests.post( "https://developer.amd.com.cn/radeon/api/v1/systemone", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "model": "d3", "state": "Watch the clip.", "videos": [f"data:video/mp4;base64,{clip}"], "questions": { "direction": {"type": "choice", "instructions": "Which way does the ball move?", "criteria": {"left_to_right": "Left to right", "right_to_left": "Right to left"}}, }, }, timeout=120,)print(r.json()["answers"]["direction"])