Edit an image
POST /v1/edit/image
Edit an existing image using a text prompt. Provide the image as a signed URL (from a previous generation or from POST /v1/upload) and describe what you want changed.
The model interprets your prompt in the context of the input image — “remove the background”, “make it warmer”, “add a hat to the person”. How well this works depends on the model and the specificity of your prompt.
Same content moderation, watermarking, and signed URL expiry rules as /v1/generate/image.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
Desired aspect ratio of the output image.
Desired image size or resolution.
HTTPS URL of the image to edit. Must be publicly accessible. Signed URLs from previous generations work.
Model identifier from the /v1/models endpoint.
Text prompt describing the desired edit.
Optional reference images for visual style/context anchoring. Max 5.
object
What this image shows. The model uses this to understand what to reference.
HTTPS URL of the reference image. Must be publicly accessible.
Classification strictness mode override for this request. ‘normal’ (brand-safe) or ‘liberal’ (legal limits only). Omit to use your account default.
Responses
Section titled “ Responses ”OK
object
Always true. Indicates AI-generated content per EU AI Act Art. 50.
Remaining credit balance in EUR after this generation.
Character reference images produced during story generation. Omitted for non-story operations.
object
ISO 8601 expiry time of the reference URL. Null for client-provided refs.
Character name as provided in the story request.
Signed URL of the character reference image. Expires in 1 hour.
Actual cost charged in EUR.
Per-format variants (png, jpeg, webp) with individual URLs and hashes. Omitted when not available.
object
object
ISO 8601 expiry time of the signed URL.
Image format identifier.
SHA-256 hash of the image in this format for provenance verification.
File size in bytes of the image in this format.
Signed URL for this format variant. Expires in 1 hour.
Unique generation identifier.
SHA-256 hash of the generated image (PNG) for provenance verification.
SHA-256 hashes for multi-image operations (stories). Omitted for single-image operations.
Signed URL of the generated image (PNG). Expires in 1 hour. Omitted for story operations.
Signed URLs for multi-image operations (e.g. combine). Each URL expires in 1 hour.
Location reference images used during story generation (auto-generated or client-provided). Reusable for standalone scene regeneration. Omitted for non-story operations.
object
ISO 8601 expiry time of the reference URL. Null for client-provided refs.
Location name as provided in the story request.
Signed URL of the location reference image. Expires in 1 hour.
Resolved model identifier used for this generation.
Scene images for story operations. Each entry includes image URL, title, and expiry. Omitted otherwise.
object
ISO 8601 expiry time of the signed URL.
Per-format variants (png, jpeg, webp) with individual URLs and hashes. Omitted when not available.
object
object
ISO 8601 expiry time of the signed URL.
Image format identifier.
SHA-256 hash of the image in this format for provenance verification.
File size in bytes of the image in this format.
Signed URL for this format variant. Expires in 1 hour.
SHA-256 hash of the scene image (PNG) for provenance verification.
Signed URL of the scene image (PNG). Expires in 1 hour.
1-based scene index within the story.
Short generated title for this scene.
Generated story title. Present only for story operations.
Bad Request
object
Unauthorized
object
Payment Required
object
Forbidden
object
Not Found
object
Conflict
object
Unprocessable Entity
object
Too Many Requests
object
Unavailable For Legal Reasons
object
Internal Server Error
object
Bad Gateway
object
Service Unavailable