Request body
prompt— Required description of the desired image.count— Optional integer (1–8) for how many variants to produce; defaults to1.aspectRatio— Optional ratio string such as1:1,3:2, or9:16; defaults to1:1.style— Optional style preset (cinematic,illustration,photographic, etc.).webhookUrl— Optional HTTPS URL Horizon should call when the image job finishes.
Sample request
Response
Returns202 Accepted with a jobId and array of placeholder asset records. Poll the provided statusUrl or listen for your webhook to receive the final download locations. Each finished asset includes url, width, height, and checksum details.
Notes
- Use
count = 1when latency matters; batching increases turnaround time slightly. - Generated assets respect your workspace retention policy; copy them to long-term storage if needed.
GET /jobs/{jobId}(mirrors thestatusUrl) lets you check progress or fetch the finished assets later without storing the initial response.
x402 flow
Image rendering requests are billed through Coinbase’s x402 protocol. If payment is missing, Horizon issues402 Payment Required with a structured challenge:
- Forward the
acceptsentry to a facilitator (/verify,/settle) as described in the facilitator docs. - Obtain the Base64
Payment Payloadand replay the request with anX-PAYMENTheader: - Horizon validates the payload (directly or via facilitator) before resuming processing. Successful responses can include
X-PAYMENT-RESPONSEwith settlement details.
Body
application/json
Response
Image generation job accepted
Example:
"job_01hx9q9"
Available options:
queued, processing, completed, failed Canonical link to GET /jobs/{jobId} for this job.
Example:
"extract/pdf"
Present when the job completes synchronously.
Estimated seconds until completion.