This endpoint shares its backend with
POST /api/v1/ads/generate. Both routes accept the same request body and produce identical responses. Use whichever path fits your integration style.Endpoint
Authentication
Request parameters
Ad intent prompt. Describe the ad you want to generate — the audience, tone, language, and any key visual or copy requirements. Maximum 5,000 characters.
Up to 6 reference images to guide the generation. Each item can be an HTTPS URL, a data URL (
data:image/...;base64,...), or a raw base64 string. Max 15 MB per image; accepted types: JPEG, PNG, WebP.UUID of a stored Brand DNA record (from
POST /api/v1/brands/extract). When provided, the backend pulls brand colors, fonts, tone, and identity context into the generation.Inline brand identity payload. Use this when you already have brand data and do not need a stored brand record.
Output controls. All subfields are optional.
Your own correlation ID for workflow or agent tracing. Echoed into the job record. Maximum 200 characters.
String map echoed into the job payload and webhook delivery. Maximum 16 keys; each value up to 500 characters.
Example request
Response
Returns202 Accepted immediately. The data.job_id is the identifier you use to poll for the result.
Request identifier (e.g.
req_pi_...).Always
"job".Initial status:
"queued".Unix timestamp of when the request was created.
UUID of the background job. Use this to poll for results.
Polling for the result
Poll the Jobs API until the job reaches a terminal status:completed:
data.ad.image_url— the generated image URL (when you useexpand=ad)data.payload.image_url— same URL available directly on the job payload
Idempotency
Send anIdempotency-Key header with any unique string (e.g. a UUID) to make retries safe. Replaying the same key with the same request body returns the original 202 response. Using the same key with a different body returns 409 idempotency_key_mismatch.
Alias route
POST /api/v1/ads/generate is a functionally identical route that targets the same backend. Use it when you prefer an explicit domain-specific path over the OpenAI-compatible surface.