POST /images/generations

Live
Generate one to four images from a prompt.
Open in ChatGPT
(opens in new tab)
Last verified: 2026-08-11

Endpoint

POST /images/generations
Generate one to four images from a prompt. The base URL is https://api.modelrush.ai/v1.

Request

model, prompt; optional n, size, quality, output_format, watermark, thinking_mode, region. Send Authorization: Bearer $MODELRUSH_API_KEY for authenticated routes and Content-Type: application/json for JSON bodies.

Response

202 Prediction for async models, otherwise generation_request_id, model, region, image data. Preserve returned request or generation identifiers. Generated outputs and their Provider file references are removed from the ModelRush database 24 hours after request completion; download anything you need to keep.

Errors

Invalid inputs return a 4xx response with a structured error. A 403 with adult_attestation_required, portrait_rights_attestation_required, or person_rights_confirmation_required must be resolved by the account user and must never be retried automatically. Retry 429 according to Retry-After; retry 5xx failures only with a bounded backoff policy.