Skip to content

Clef

POST /v1/systemone model: Clef

Clef is Cloudflare’s 27B decision model, post-trained from Qwen3.8-27B. Use it where you would otherwise ask a chat model to classify, route or grade something and then parse its reply.

EndpointPOST /v1/systemone
Inputa state (text or any JSON) and optional images
Outputone answer per question, with probabilities
Question typeschoice, noul, score
Streaming❌
Billingper input token, reported as usage.input_tokens; output_tokens is always 0
State lengthtruncated to 16,384 tokens
Stabilityexperimental
Field
modelrequiredClef
staterequiredthe situation to decide about: a string, or any JSON value
questionsrequiredan object mapping your own question names to questions, at least one
imagesoptionalan array of images as data: URL strings

temperature, prompt_format_version and return_prompt_token_ids are refused by name with a 422. Unknown keys inside a question are refused too, so a misspelled instruction fails loudly instead of being ignored.

typecriteriaAnswer
choicean object of options, {"name": "what this option means", …}, 1–255 entrieschoice, confidence, probabilities per option
nouloptional {"true": "…", "false": "…"}; give instructions, criteria, or bothnoul: the probability that the answer is yes (or that true holds), 0–1
scorean ordered array of 1–10 levels, lowest firstscore (the expected level, counting from 0), confidence, legend, probabilities per level

Every question can carry instructions, the question itself in plain words.

{
"answers": {
"status": {
"type": "choice",
"choice": "overdue",
"confidence": 0.9895,
"probabilities": { "paid": 0.0041, "overdue": 0.9930, "draft": 0.0029 }
},
"large": { "type": "noul", "noul": 0.9934 },
"urgency": {
"type": "score",
"score": 1.5326,
"confidence": 0.2989,
"legend": { "0": "Can wait", "1": "This week", "2": "Today" },
"probabilities": { "0": 0.0575, "1": 0.3524, "2": 0.5901 }
}
},
"usage": { "input_tokens": 340, "output_tokens": 0 },
"model": "Clef"
}

Use the probabilities rather than only the top answer: a noul of 0.55 and one of 0.99 are both “yes”, but only one of them is safe to act on automatically.

Terminal window
curl https://developer.amd.com.cn/radeon/api/v1/systemone \
-H "Authorization: Bearer $RADEON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Clef",
"state": {"invoice": {"vendor": "Acme", "total": 1250.0, "currency": "USD", "status": "overdue"}},
"questions": {
"status": {
"type": "choice",
"instructions": "What is the invoice status?",
"criteria": {"paid": "Invoice is paid.", "overdue": "Invoice is past due.", "draft": "Not sent."}
},
"large": {"type": "noul", "instructions": "Is the total above 1000 USD?"},
"urgency": {"type": "score", "instructions": "How urgent is follow-up?", "criteria": ["Can wait", "This week", "Today"]}
}
}'

With an image:

{
"model": "Clef",
"state": "Look at the attached picture.",
"images": ["data:image/png;base64,iVBORw0KGgo..."],
"questions": {
"colour": {
"type": "choice",
"instructions": "What colour fills the image?",
"criteria": {"red": "Red", "green": "Green", "blue": "Blue"}
}
}
}