state and returns typed answers with probabilities. Use it for routing, classification, scoring, and extraction with POST /v1/decisions and the model mercury-decide.
Send a decision request
SetINCEPTION_API_KEY to your API key. Each request includes a model, a state, and a non-empty map of questions. The names you choose for questions are preserved in the response.
Question types
The state, instructions, and criterion descriptions can be strings, JSON objects, or arrays. Instructions may be omitted or
null. Questions are evaluated independently against the shared state. A score can be fractional; it is not restricted to a single level.
Send images
Mercury Decide can look at images. Add an image part anywhere instate or in a question’s instructions:
- Images must be base64 data URLs in PNG, JPEG, WebP, or GIF format. Remote URLs are not supported.
- Each image can be up to 10 MiB, and a request can include up to 16 images.
- The complete JSON request, including base64-encoded images and all other fields, must fit within the gateway’s 20 MiB default body limit. Base64 encoding increases image size by roughly one third, so multiple images can exceed this limit even when each image is below 10 MiB.
- Images are not supported in
criteria. - The image part must use exactly the shape above. A data URL passed as a plain string is treated as text, and the model does not see an image.
413 error before image validation. Invalid images in requests within that limit return a 422 error.
Read the response
The response contains the model name, ananswers map keyed by your question names, and usage. For example, a request with a single noul question named billing could return:
choice, probabilities uses your option names. For score, it uses string indices such as "0" and "1", and legend maps those indices back to your criteria. Both include a confidence value between 0 and 1.
Pricing and limits
Mercury Decide costs $0.02 per million input tokens (50% off the regular $0.04 price). Only input tokens are billed; output tokens are reported inusage.output_tokens but are not charged. See Models & Pricing.
- Send requests to
/v1/decisions. Mercury Decide does not support/v1/chat/completions, streaming, or tool calling. - Use Error Codes for authentication, rate-limit, and service errors.