Skip to main content
Decisions models answer typed questions about content you send in state. These models also accept images: Text-only Decisions requests, including every request to Jev, work the same as before.

Quickstart

Encode an image as base64 and put it in the state array as an image_url part, next to any text:
The response has one typed answer per question:

Image part format

An image is an item of the state array with this shape, the same image part Chat Completions uses in message content:
  • url must be a base64 data URL with the type image/png, image/jpeg, or image/webp. Remote http(s) URLs are not fetched.
  • detail (auto, low, or high) is accepted, but Clef and Clef Flash ignore it.
  • Put image parts directly in the top-level state array. Images nested inside other objects in state are not read as images.
  • Send at most 4 images per request to Clef and Clef Flash, and at most 128 to GPT-6 Luna Decisions.
  • Text items in the array are plain strings, not { "type": "text" } parts.
These shapes are not image inputs:
  • A top-level images field. The API rejects it with a 400.
  • The Responses API input_image part ({ "type": "input_image", "image_url": "data:..." }).
  • A raw base64 string without the data:image/...;base64, prefix.

Limits

  • Image size on Clef and Clef Flash. Workers AI estimates a request’s tokens from the base64 length before it processes the image, at about 4 base64 characters per token, and rejects the request with a 413 once that estimate passes its 65,536-token window. Keep each image under about 300 KB before encoding, and resize or recompress larger images. Billing uses the tokens the model actually processes.
  • Text length on Clef and Clef Flash. Workers AI reads roughly the first 2,000 tokens of text in state and drops the rest without an error. Images are counted separately.
  • See each model page for the current context length and pricing.