kettei-fat and kettei-chub) read images as well as text. Put each picture in the request’s images and mark where it belongs in the context with an anchor, <image:1>, <image:2> and so on. The decisions are then answered with the pictures in view, exactly as the models were trained to read them. core reads text only.
The model reads each picture at no more than 2,097,152 pixels, about 2 megapixels. A request uploads several times faster with a larger picture shrunk to fit and a photo sent as JPEG: Send images fast.
usage saying how many images were read.
Send images fast
Much of the time a request with images takes is its upload, and the upload grows with the bytes you send. The model never reads more than 2,097,152 pixels of a picture. A larger file costs upload time and changes nothing the model reads.
A 3840 × 2160 photo of 5.6 MB and the same picture at 1920 × 1056 as a 0.37 MB JPEG both come to 1,980 image tokens, and the second sends a fifteenth of the bytes. A 640 × 480 photo saved as a 0.42 MB PNG is 0.07 MB as a JPEG.
- The size the model reads keeps the picture’s shape within 2,097,152 pixels, each side a multiple of 32: 1664 × 1248 for a 4:3 photo, 1920 × 1056 for 16:9 and 1440 × 1440 for a square. A smaller picture is read at about its own size. The example’s
-resize '2097152@>'caps the pixels but doesn’t round each side to 32, so the model rounds them: a 3840 × 2160 photo is then read at 2,040 tokens rather than 1,980. - Ask the related questions about a picture in one request. It uploads once, and the decisions are read together.
- Resize a picture once. Keep the file you made and send it each time you ask about that picture.
- Compress the body with
Content-Encoding: zstdorgzip(API behaviour). It wins back what base64 adds, about a quarter of the body. JPEG and PNG are compressed already, so it saves no more. - Fewer pixels read faster. A picture under 2 megapixels has fewer image tokens, which the model scores sooner and which count less toward your tokens a minute. It also shows the model less, so check the answers on your own labelled rows first.
Anchors and the context
contextmust be a string. Each image’sidis the number in its anchor, from 1 to 64, and appears once inimages.- Every image needs its anchor, and every anchor needs its image.
- An image is shown where its anchor first appears. A later mention of the same anchor is read as text, so you can refer back to a picture (“the damage in
<image:2>”) without sending it twice. - Text around the anchors works as in any context: say what each picture is (“Photo of the item as received:”, “Screenshot of the error:”).
Limits
Each image is resized as the model’s own image processor does, to between 65,536 and 2,097,152 pixels, and becomes between 64 and 2,048 image tokens, one per 32 × 32 pixels. Anything of about 2 megapixels or more comes to just under 2,048:
The image tokens count toward the request’s input limit of 65,536 tokens, as they are billed, which is the same for every model, and nothing is ever cut to fit: a request over that limit, or longer than the model accepts, is refused with
context_too_long. Send fewer or smaller images if you see it.
A request with images can ask as many decisions as one without. The public playground takes no images.
From /v1/systemone
The Jev-compatible endpoint takes the same images insidestate, in either of two forms. The model reads exactly what the same request to /v1/decide shows it, and POST /v1/systemone/translate returns that request.
A content array of text and image parts. The text parts, with an <image:1>, <image:2> … anchor where each image is, joined by spaces, are the context:
assets map, under a reference you choose, and write the reference in state where the image goes:
state is read as an image node there. References in a state that is one string are read as a content array of its text and images. Each use of a reference is an image of its own, up to 8 images a request. A reference used nowhere, written inside a longer string of an object or array state, or written in a question is refused with invalid_request: images go in state here. Choose references that can’t occur in your text by accident, such as a new UUID for each image.
Images are base64 JPEG, PNG or WebP: a data: URL in an image part, plain base64 in a node or an asset. URLs are not fetched. Put images in state; a top-level images field is refused. The limits, errors and billing are the ones on this page, and usage says images and image_tokens here too.
A multipart request (API behaviour) carries each image’s file as it is, a quarter smaller than base64. Shrink each picture to fit there too.
Fallback
With images, the fallback ladder of/v1/decide keeps only the models that read images, so an answer always comes from a model that saw your pictures: chub may fall back to fat and fat to chub, never to a text-only size. /v1/systemone never falls back: the model you name answers, or the request fails with an error that says why. A fine-tuned model reads text only.
Billing
Each image is billed at the image tokens the model reads for it, 64 to 2,048 by its size, as in the table above, at the price of the model that answers, as any input token is.usage.input_tokens counts your text as usual, the anchors included, plus the image tokens of each image, and nothing else per image. A picture is billed once however many times the context mentions it or the model reads it. usage.images is the number of images, and usage.image_tokens is the image tokens billed for them. They also count toward the model’s prompt limit. About 2,000 image tokens for each image means the model read each at its most. If your files are larger than that, they were shrunk after their upload: send them smaller. POST /v1/decide/estimate takes the same body and quotes it before you send it.
Errors
None of these is retryable: change the request first.
