POST /images/edits

Live
Edit source images; GPT Image 2 accepts one image and an optional mask. Face and head swap require explicit portrait authorization.
Open in ChatGPT
(opens in new tab)
Last verified: 2026-08-11

Endpoint

POST /images/edits
Edit source images; GPT Image 2 accepts one image and an optional mask. Face and head swap require explicit portrait authorization. The base URL is https://api.modelrush.ai/v1.

Request

model, prompt, image(s); person_rights_confirmed=true is required for face/head swap; optional mask, n, size, quality, output_format, watermark, 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.