IronStratum

POST /v1/images/generations

Generate images from a prompt (unit-billed, per image returned)

Images route (route_type: images; OpenAI images shape, synchronous). Strict accepted set — model, prompt (required, non-empty), n (integer 1-10, default 1), size (WIDTHxHEIGHT with positive integer dimensions — the provider APPLIES it), and response_format with the value url ONLY (b64_json is a named 400 day-one: the provider's API rejects it, and a value we cannot serve is refused at our door, never coerced); everything else — seed, quality, style, background, output_format, output_compression, moderation, stream, partial_images, user — is unknown_param naming the offender. Metering: unit_type='images' — the count IS the response's data[] length (n-billed-as-returned: a partial return bills what returned; a failed generation bills zero with its failure row). usage on every answer is OUR {images, cost} at 6dp (the provider's token-shaped usage block is all-zero noise and never crosses). The response's hosted image URLs pass through byte-identical (no proxy, no transform) and are EPHEMERAL — fetch promptly and store client-side. Idempotency-Key carries replay semantics on this route (contract §8 route-scope — the embeddings/rerank JSON class).

Request

Request body fields for generateImage
Field Type Required Description
model string yes An IronStratum alias whose route_type is images.
prompt string yes Required non-empty (an empty string is a 400, not a free no-op).
n integer no Images requested per call; billing counts what the answer RETURNS (data[] length).
size string no WIDTHxHEIGHT with positive integer dimensions (no leading zeros); applied by the provider (pixel-verified in the platform's dated test round, 2026-09-24). Default is the provider's own default (1024x1024).
response_format string enum no url only day-one — b64_json is a named 400 (the provider's API rejects it).

Responses

200 The generated images

200 response fields for generateImage
Field Type Required Description
created integer no —
data array of object no —
usage object no OUR count and OUR retail cost — the provider's usage block never crosses.

400 400

400 response fields for generateImage
Field Type Required Description
error object yes —

401 401

401 response fields for generateImage
Field Type Required Description
error object yes —

402 402

402 response fields for generateImage
Field Type Required Description
error object yes —

403 403

403 response fields for generateImage
Field Type Required Description
error object yes —

404 404

404 response fields for generateImage
Field Type Required Description
error object yes —

409 409

409 response fields for generateImage
Field Type Required Description
error object yes —

500 500

500 response fields for generateImage
Field Type Required Description
error object yes —

502 502

502 response fields for generateImage
Field Type Required Description
error object yes —

503 503

503 response fields for generateImage
Field Type Required Description
error object yes —

Example

curl -X POST https://api.ironstratum.com/v1/images/generations \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"<model>","prompt":"<prompt>"}'

All operations · interactive reference · openapi.yaml