Create a decision
Ask a decision model typed questions about an input and get a probability for every option. Decision models (joey-1, elephant-1) generate no text and are served on this endpoint only. Choose the asap, priority or standard completion window with metadata.completion_window.
POST /v1/alpha/decisions and POST /v1/systemone, for AI gateways whose built-in decision integrations append their own path to a custom host. Use the custom host https://api.valarhq.ai/v1 for an integration that appends /alpha/decisions, and https://api.valarhq.ai for one that appends /v1/systemone. Both paths take the same request and return the same response as POST /v1/decisions.Authorizations
Headers
Lets you retry safely. Valar records a reservation under the combination of organization, API key, and Idempotency-Key, so sending the same value again hands back the stored response rather than running inference a second time. Values can be up to 255 characters. See Idempotent Requests for the complete rules.
255Body
The input to evaluate: a string, a JSON object or a JSON array (structured data is rendered as text for you), or a conversation as {"messages": [...]} with user and assistant roles. A user message may include images as image_url content parts (base64 data URLs recommended, at most 16 per request). Numbers, booleans and null are not accepted.
"I was charged twice this month. Please refund the duplicate charge."
An optional token cap on each question's full prompt (state, question, criteria and images). As served today, each question's prompt is limited to 16,000 tokens on joey-1 and elephant-1. That is a serving limit: the models themselves were trained on sequences of up to 16,384 tokens. max_len can lower the serving limit but not raise it. A prompt over the limit is refused with a 413 rather than truncated, and is not billed. Occasionally the cap can be checked only against the request's prompts on average rather than each prompt: the response then carries the header X-Valar-Max-Len-Enforced: false, the request was refused (413, not billed) only if its prompts averaged over max_len, and one long question among short ones may have been answered over its cap.
x >= 1Response
The answers.