Skip to main content
POST
Generate AI image

Authorizations

X-API-Key
string
header
required

Your Hrizn API key (prefix hzk_)

Headers

X-Idempotency-Key
string

Optional idempotency key. Repeats with the same key + body within 24h return the original response instead of creating a duplicate.

Body

application/json
prompt
string
required

What to render (subject, setting, mood) in plain language.

Maximum string length: 8000
Example:

"A silver mid-size SUV parked outside a dealership at golden hour"

aspect_ratio
string

e.g. "16:9", "1:1", "4:5". Defaults to landscape.

Maximum string length: 16
Example:

"16:9"

article_id
string<uuid> | null

Attach the image to a Hrizn content item as an article image.

asset_id
string<uuid> | null

Existing generated image to regenerate in place.

reference_image_keys
string[]

Media Library asset keys used as visual references.

Maximum array length: 4
idempotency_key
string

Alternative to the X-Idempotency-Key header.

Maximum string length: 200

Response

Image generation started

data
object
Last modified on September 6, 2026