Auto
Hand model choice to Auto. Every request gets the highest-scoring candidate model.
Send "model": "auto" and Pleum classifies the request intent (code, reasoning, vision, translation…) then substitutes the highest-scoring candidate model for that kind of work. You never need to name a model.
curl https://apirouter.pleum.ai/v1/chat/completions \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [
{"role": "user", "content": "Write a Python function to dedupe a list."}
]
}'How it works#
The intent is classified from the request body, the highest-scoring candidate for that category is selected, and a single call is made. You are billed for the substituted real model — auto is a virtual model with no price of its own.
You can pass "optimize_for": "cost" | "balanced" | "quality" in the request. cost picks the cheapest candidate, balanced keeps the score order but drops candidates priced far above the cheapest, and quality (default) keeps the pure score order. You are always billed the selected model's list price — the mode only changes the choice.
Send a "trace_id" with your requests and consecutive requests in the same category keep using the previously selected model (held for 30 minutes after the last request). When the category changes, the model is selected again. Without a trace_id, every request is routed fresh.
Fallback chain#
If the selected model is temporarily disabled, it falls back to the top model of the general category. The decision happens before credit hold, so a miss bills nothing.
Related modes#
For maximum accuracy with several models verifying in parallel, see orchestrators.