Images
The POST /v1/images/generations call — the prompt, how many images, the size, the response shape, and why generation is counted in images rather than tokens.
Quick
One operation makes images from a text prompt. The request, response and error envelopes are OpenAI-compatible.
curl https://api.kumorouter.com/v1/images/generations \
-H "Authorization: Bearer $KUMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model>",
"prompt": "A lighthouse in fog, ink on paper",
"n": 1,
"size": "1024x1024"
}'Request members
modelRequired. The public model name to generate with.promptRequired. The prompt to generate an image from; up to 32,000 characters.nHow many images to generate, from 1 to 10. Absent, it is one.sizeThe image size as `WIDTHxHEIGHT`, for example `1024x1024`.This operation has no other members. Edits and variations are not served.
The response
createdWhen the images were generated, as a Unix timestamp in seconds.dataThe generated images, in the order the supplier answered them.A data entry carries b64_json — the image bytes, base64-encoded — or a url the image can be fetched from. Both are optional, so a client reads whichever arrived rather than the one it expected.
{
"created": 1756900000,
"data": [{ "b64_json": "iVBORw0KGgoAAAANSUhEUg..." }]
}A refusal arrives in the OpenAI-compatible envelope: error.message, error.type and error.code, with param always null — this surface never names a field of the request.
How it is counted
Image generation is counted in images, not tokens, and is debited through the same admission, reservation and settlement chain as every other model surface.
One consequence matters for rate limits. An operation that reports no tokens at all keeps the estimate it was charged before it went upstream: correcting it to zero would refund the whole estimate and let this surface cost nothing against the token ceiling.