Skip to content

Generate an image from a text prompt

POST
/v1/generate/image

Generate an image from a text prompt. This is the general-purpose endpoint — use it for photos, illustrations, art, or anything that isn’t specifically an icon/graphic, diagram, or story.

The prompt goes through content moderation first. If it passes, the image is generated using the specified model, watermarked with C2PA metadata (EU AI Act compliance), and uploaded to temporary storage.

The response includes signed URLs in multiple formats (PNG, JPEG, WebP) valid for 1 hour — download what you need before they expire. You also get the cost charged and your remaining balance.

Use GET /v1/models to see which models are available and what they cost.

Recovery: Every generation is tracked as a job. The response includes an X-Depicta-Job-Id header with the job UUID. If the response is lost (network error, timeout), use GET /v1/jobs to find your recent generations — the result will be there once the generation completes.

object
aspect_ratio

Desired aspect ratio of the output image.

null | string
image_size

Desired image size or resolution.

null | string
model
required

Model identifier from the /v1/models endpoint.

string
prompt
required

Text prompt describing the image to generate.

string
reference_images

Optional reference images for visual style/context anchoring. Max 5.

Array<object>
object
description
required

What this image shows. The model uses this to understand what to reference.

string
url
required

HTTPS URL of the reference image. Must be publicly accessible.

string
strictness

Classification strictness mode override for this request. ‘normal’ (brand-safe) or ‘liberal’ (legal limits only). Omit to use your account default.

null | string
Allowed values: normal liberal

OK

object
ai_generated

Always true. Indicates AI-generated content per EU AI Act Art. 50.

boolean
balance_eur

Remaining credit balance in EUR after this generation.

string
characters

Character reference images produced during story generation. Omitted for non-story operations.

Array<object>
object
expires_at

ISO 8601 expiry time of the reference URL. Null for client-provided refs.

null | string
name

Character name as provided in the story request.

string
reference_url

Signed URL of the character reference image. Expires in 1 hour.

string
cost_eur

Actual cost charged in EUR.

string
formats

Per-format variants (png, jpeg, webp) with individual URLs and hashes. Omitted when not available.

object
key
additional properties
object
expires_at

ISO 8601 expiry time of the signed URL.

string
format

Image format identifier.

string
hash

SHA-256 hash of the image in this format for provenance verification.

string
size_bytes

File size in bytes of the image in this format.

integer
url

Signed URL for this format variant. Expires in 1 hour.

string
id

Unique generation identifier.

string format: uuid
image_hash

SHA-256 hash of the generated image (PNG) for provenance verification.

string
image_hashes

SHA-256 hashes for multi-image operations (stories). Omitted for single-image operations.

Array<string>
image_url

Signed URL of the generated image (PNG). Expires in 1 hour. Omitted for story operations.

string
image_urls

Signed URLs for multi-image operations (e.g. combine). Each URL expires in 1 hour.

Array<string>
locations

Location reference images used during story generation (auto-generated or client-provided). Reusable for standalone scene regeneration. Omitted for non-story operations.

Array<object>
object
expires_at

ISO 8601 expiry time of the reference URL. Null for client-provided refs.

null | string
name

Location name as provided in the story request.

string
reference_url

Signed URL of the location reference image. Expires in 1 hour.

string
model

Resolved model identifier used for this generation.

string
scenes

Scene images for story operations. Each entry includes image URL, title, and expiry. Omitted otherwise.

Array<object>
object
expires_at

ISO 8601 expiry time of the signed URL.

string
formats

Per-format variants (png, jpeg, webp) with individual URLs and hashes. Omitted when not available.

object
key
additional properties
object
expires_at

ISO 8601 expiry time of the signed URL.

string
format

Image format identifier.

string
hash

SHA-256 hash of the image in this format for provenance verification.

string
size_bytes

File size in bytes of the image in this format.

integer
url

Signed URL for this format variant. Expires in 1 hour.

string
image_hash

SHA-256 hash of the scene image (PNG) for provenance verification.

string
image_url

Signed URL of the scene image (PNG). Expires in 1 hour.

string
scene

1-based scene index within the story.

integer
title

Short generated title for this scene.

string
title

Generated story title. Present only for story operations.

string

Bad Request

object
details
error
string
message
string
request_id
string

Unauthorized

object
details
error
string
message
string
request_id
string

Payment Required

object
details
error
string
message
string
request_id
string

Forbidden

object
details
error
string
message
string
request_id
string

Not Found

object
details
error
string
message
string
request_id
string

Conflict

object
details
error
string
message
string
request_id
string

Unprocessable Entity

object
details
error
string
message
string
request_id
string

Too Many Requests

object
details
error
string
message
string
request_id
string

Unavailable For Legal Reasons

object
details
error
string
message
string
request_id
string

Internal Server Error

object
details
error
string
message
string
request_id
string

Bad Gateway

object
details
error
string
message
string
request_id
string

Service Unavailable

object
details
error
string
message
string
request_id
string