HiDream O1 API, HiDream O1 Dev API, HiDream I1 Full API: Pricing, Documentation
by HiDream
HiDream O1 API and its distilled counterpart, the HiDream O1 Dev API, leverage a unified transformer architecture to handle complex text rendering and subject-driven personalization without the need for traditional encoders. Complementing these, the HiDream I1 Full API provides a powerful foundation model focused on delivering production-grade photorealism and superior adherence to intricate instructions. Together, these APIs provide developers with a scalable toolkit for generating professional visual content across various creative and commercial applications.

Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
HiDream O1 API Documentation
https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
HiDream O1 Image generate request
Request Code
POST https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
import requests
url = "https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request";
const data = {
prompt: "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
image_size: {
width: 2048,
height: 2048
},
num_inference_steps: 50,
guidance_scale: 5,
num_images: 1,
output_format: "png",
enable_safety_checker: true
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}'
Output
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - HiDream O1 Image generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text prompt for image generation, editing, or subject-driven personalization. Must describe the desired visual content clearly. |
| reference_image_urls | No | string[] | [] | — | Optional reference images. Use an empty array for text-to-image, one URL for image editing, or multiple URLs for subject-driven personalization. |
| image_size | No | enum or {width,height} | {"width": 1024, "height": 1024} | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or {width, height} up to 2048x2048 | Requested output resolution. Accepts a predefined enum (square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) or an exact size object (e.g. {"width": 2048, "height": 2048}). Dimensions are rounded down to a multiple of 32, up to about 2048x2048 pixels. The default is equivalent to square_hd. |
| num_inference_steps | No | integer | 50 | 1–50 | Number of denoising (refinement) steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | float | 5 | 0–20 | Classifier-free guidance scale — controls how closely the output follows your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation. The full model uses 5.0. |
| seed | No | integer | — | — | Random seed for reproducible generation. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. |
| output_format | No | enum | png | jpeg, png, webp | The format of the generated image. |
| sync_mode | No | boolean | false | true, false | If true, the finished image is returned directly as a data URI instead of a download link (and is not stored in request history). Handy for quick tests; for normal use leave it off to get a download link. |
| enable_safety_checker | No | boolean | true | true, false | Enables the safety checker on generated images (filters unsafe or explicit content). Leave enabled unless you have a specific reason to disable it. |
| keep_original_aspect | No | boolean | false | true, false | When exactly one reference image is provided, preserves its aspect ratio for the output image instead of using image_size. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s). |
Example Request
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
Response
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'hidream-o1-image' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image_019dxxxx/output.png"],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
HiDream O1 API Pricing
O1 is the production model. O1 Dev is a faster lower-cost preview tier with lower-quality outputs.
HiDream O1 API Documentation
https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
HiDream O1 Image (Edit) generate request
Request Code
POST https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
import requests
url = "https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}'
Output
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-edit",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - HiDream O1 Image (Edit) generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text prompt describing the desired edit or generation. Must describe the intended result clearly. |
| reference_image_urls | Yes | string[] | — | — | Reference images for image editing or subject-driven personalization. Use one image URL for editing, or multiple URLs for multi-subject personalization. |
| image_size | No | enum or {width,height} | {"width": 2048, "height": 2048} | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or {width, height} up to 2048x2048 | Requested output resolution. Accepts a predefined enum (square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) or an exact size object (e.g. {"width": 2048, "height": 2048}). Reference-image outputs use the nearest model-supported resolution, up to about 2048x2048 pixels. |
| num_inference_steps | No | integer | 50 | 1–50 | Number of denoising (refinement) steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | float | 5 | 0–20 | Classifier-free guidance scale — controls how closely the output follows your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation. The full model uses 5.0. |
| seed | No | integer | — | — | Random seed for reproducible generation. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. |
| output_format | No | enum | png | jpeg, png, webp | The format of the generated image. |
| sync_mode | No | boolean | false | true, false | If true, the finished image is returned directly as a data URI instead of a download link (and is not stored in request history). Handy for quick tests; for normal use leave it off to get a download link. |
| enable_safety_checker | No | boolean | true | true, false | Enables the safety checker on generated images (filters unsafe or explicit content). Leave enabled unless you have a specific reason to disable it. |
| keep_original_aspect | No | boolean | false | true, false | When exactly one reference image is provided, preserves its aspect ratio for the output image instead of using image_size. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s) to edit. |
Example Request
{
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/upscaler_019ed0c8-bb34-7854-afbc-b2a164758a15b/output.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
Response
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'hidream-o1-image-edit' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-edit",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-edit_019dxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
HiDream O1 API Pricing
O1 is the production model. O1 Dev is a faster lower-cost preview tier with lower-quality outputs.
HiDream O1 Dev API Documentation
https://gateway.pixazo.ai/hidream-o1-image-dev/v1/hidream-o1-image-dev-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
HiDream O1 Image (Dev) generate request
Request Code
POST https://gateway.pixazo.ai/hidream-o1-image-dev/v1/hidream-o1-image-dev-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 1024,
"height": 1024
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
import requests
url = "https://gateway.pixazo.ai/hidream-o1-image-dev/v1/hidream-o1-image-dev-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 1024,
"height": 1024
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/hidream-o1-image-dev/v1/hidream-o1-image-dev-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 1024,
"height": 1024
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/hidream-o1-image-dev/v1/hidream-o1-image-dev-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 1024,
"height": 1024
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}'
Output
{
"request_id": "hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-dev",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-dev",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - HiDream O1 Image (Dev) generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text prompt for image generation, editing, or subject-driven personalization. Must be at least 1 character — describe the desired visual content clearly. |
| reference_image_urls | No | string[] | [] (empty array) | — | Optional reference images. Use an empty array (or omit) for text-to-image, one URL for image editing, or multiple URLs for subject-driven personalization. URLs must be publicly accessible; base64 data URIs are also accepted. |
| image_size | No | enum or {width,height} | {width: 1024, height: 1024} | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom {width,height} object up to 2048x2048 | Output image dimensions. Pass one of the preset enum values, or an object with exact width and height. Dimensions are rounded down to the nearest multiple of 32, up to about 2048x2048. Defaults to 1024x1024. |
| num_inference_steps | No | integer | 28 | 1–28 | Number of refinement (denoising) steps. Higher values add detail but take longer. The dev model is distilled for 28 steps — maximum 28; higher values are rejected. |
| guidance_scale | No | float | 0.0 | 0–20 | Classifier-free guidance scale — controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. The dev model is distilled to run at 0.0. |
| seed | No | integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. Must be between 1 and 4. |
| output_format | No | enum | "png" | jpeg, png, webp | Output image format. Allowed values: jpeg, png, webp. |
| sync_mode | No | boolean | false | — | If on, the finished image is returned directly (as a data URI) instead of as a download link, and is not kept in request history. Handy for quick tests; for normal use, leave it off to get a download link. |
| enable_safety_checker | No | boolean | true | — | Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. |
| keep_original_aspect | No | boolean | false | — | When exactly one reference image URL is provided, preserve its original aspect ratio instead of conforming to image_size. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s). |
Example Request
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 1024,
"height": 1024
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
Response
{
"request_id": "hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'hidream-o1-image-dev' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-dev",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "hidream-o1-image-dev_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-dev",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-dev_019dxxxx/output.png"],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
HiDream O1 Dev API Pricing
HiDream O1 Dev API Documentation
https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1/hidream-o1-image-dev-edit-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
HiDream O1 Image (Dev Edit) generate request
Request Code
POST https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1/hidream-o1-image-dev-edit-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
import requests
url = "https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1/hidream-o1-image-dev-edit-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1/hidream-o1-image-dev-edit-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1/hidream-o1-image-dev-edit-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}'
Output
{
"request_id": "hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-dev-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-dev-edit",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - HiDream O1 Image (Dev Edit) generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text prompt describing the desired edit or generation. Must be at least 1 character — be specific for best results. |
| reference_image_urls | Yes | string[] | — | At least 1 URL | Reference images to edit or personalize from. Provide one URL to edit a single image, or multiple URLs for subject-driven personalization. URLs must be publicly accessible; base64 data URIs are also accepted. |
| image_size | No | enum or {width,height} | {width: 2048, height: 2048} | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom {width,height} object up to 2048x2048 | Requested output resolution. Pass one of the preset enum values, or an object with exact width and height. Reference-image outputs are snapped to the nearest model-supported resolution, up to about 2048x2048. Defaults to 2048x2048. |
| num_inference_steps | No | integer | 28 | 1–28 | Number of refinement (denoising) steps. Higher values add detail but take longer. The dev model is distilled for 28 steps — maximum 28; higher values are rejected. |
| guidance_scale | No | float | 0.0 | 0–20 | Classifier-free guidance scale — controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. The dev model is distilled to run at 0.0. |
| seed | No | integer | — | — | Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. Must be between 1 and 4. |
| output_format | No | enum | "png" | jpeg, png, webp | Output image format. Allowed values: jpeg, png, webp. |
| sync_mode | No | boolean | false | — | If on, the finished image is returned directly (as a data URI) instead of as a download link, and is not kept in request history. Handy for quick tests; for normal use, leave it off to get a download link. |
| enable_safety_checker | No | boolean | true | — | Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. |
| keep_original_aspect | No | boolean | false | — | When exactly one reference image is provided, preserve its original aspect ratio in the output. If off, the output is resized to match image_size. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s) to edit. |
Example Request
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/upscaler_019ed0c8-bb34-7854-afbc-b2a164758a15b/output.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 28,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
Response
{
"request_id": "hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'hidream-o1-image-dev-edit' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-dev-edit",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-dev-edit",
"error": null,
"output": { "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-dev-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"], "media_type": "image/png" },
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
HiDream O1 Dev API Pricing
HiDream I1 Full API Documentation
https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
HiDream O1 Image generate request
Request Code
POST https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
import requests
url = "https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request";
const data = {
prompt: "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
image_size: {
width: 2048,
height: 2048
},
num_inference_steps: 50,
guidance_scale: 5,
num_images: 1,
output_format: "png",
enable_safety_checker: true
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/hidream-o1-image/v1/hidream-o1-image-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}'
Output
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - HiDream O1 Image generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text prompt for image generation, editing, or subject-driven personalization. Must describe the desired visual content clearly. |
| reference_image_urls | No | string[] | [] | — | Optional reference images. Use an empty array for text-to-image, one URL for image editing, or multiple URLs for subject-driven personalization. |
| image_size | No | enum or {width,height} | {"width": 1024, "height": 1024} | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or {width, height} up to 2048x2048 | Requested output resolution. Accepts a predefined enum (square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) or an exact size object (e.g. {"width": 2048, "height": 2048}). Dimensions are rounded down to a multiple of 32, up to about 2048x2048 pixels. The default is equivalent to square_hd. |
| num_inference_steps | No | integer | 50 | 1–50 | Number of denoising (refinement) steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | float | 5 | 0–20 | Classifier-free guidance scale — controls how closely the output follows your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation. The full model uses 5.0. |
| seed | No | integer | — | — | Random seed for reproducible generation. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. |
| output_format | No | enum | png | jpeg, png, webp | The format of the generated image. |
| sync_mode | No | boolean | false | true, false | If true, the finished image is returned directly as a data URI instead of a download link (and is not stored in request history). Handy for quick tests; for normal use leave it off to get a download link. |
| enable_safety_checker | No | boolean | true | true, false | Enables the safety checker on generated images (filters unsafe or explicit content). Leave enabled unless you have a specific reason to disable it. |
| keep_original_aspect | No | boolean | false | true, false | When exactly one reference image is provided, preserves its aspect ratio for the output image instead of using image_size. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s). |
Example Request
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
Response
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'hidream-o1-image' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "hidream-o1-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image",
"error": null,
"output": {
"media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image_019dxxxx/output.png"],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
HiDream I1 Full API Pricing
O1 is the production model. O1 Dev is a faster lower-cost preview tier with lower-quality outputs.
HiDream I1 Full API Documentation
https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
HiDream O1 Image (Edit) generate request
Request Code
POST https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
import requests
url = "https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/hidream-o1-image-edit/v1/hidream-o1-image-edit-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field",
"reference_image_urls": [
"https://example.com/model_tests/hidream/woman.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}'
Output
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-edit",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - HiDream O1 Image (Edit) generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text prompt describing the desired edit or generation. Must describe the intended result clearly. |
| reference_image_urls | Yes | string[] | — | — | Reference images for image editing or subject-driven personalization. Use one image URL for editing, or multiple URLs for multi-subject personalization. |
| image_size | No | enum or {width,height} | {"width": 2048, "height": 2048} | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or {width, height} up to 2048x2048 | Requested output resolution. Accepts a predefined enum (square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) or an exact size object (e.g. {"width": 2048, "height": 2048}). Reference-image outputs use the nearest model-supported resolution, up to about 2048x2048 pixels. |
| num_inference_steps | No | integer | 50 | 1–50 | Number of denoising (refinement) steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | float | 5 | 0–20 | Classifier-free guidance scale — controls how closely the output follows your prompt. Higher values stick more strictly to the prompt; lower values allow more creative variation. The full model uses 5.0. |
| seed | No | integer | — | — | Random seed for reproducible generation. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. |
| output_format | No | enum | png | jpeg, png, webp | The format of the generated image. |
| sync_mode | No | boolean | false | true, false | If true, the finished image is returned directly as a data URI instead of a download link (and is not stored in request history). Handy for quick tests; for normal use leave it off to get a download link. |
| enable_safety_checker | No | boolean | true | true, false | Enables the safety checker on generated images (filters unsafe or explicit content). Leave enabled unless you have a specific reason to disable it. |
| keep_original_aspect | No | boolean | false | true, false | When exactly one reference image is provided, preserves its aspect ratio for the output image instead of using image_size. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s) to edit. |
Example Request
{
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/upscaler_019ed0c8-bb34-7854-afbc-b2a164758a15b/output.png"
],
"image_size": {
"width": 2048,
"height": 2048
},
"num_inference_steps": 50,
"guidance_scale": 5,
"num_images": 1,
"output_format": "png",
"enable_safety_checker": true
}
Response
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'hidream-o1-image-edit' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "hidream-o1-image-edit",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "hidream-o1-image-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "hidream-o1-image-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/hidream-o1-image-edit_019dxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
HiDream I1 Full API Pricing
O1 is the production model. O1 Dev is a faster lower-cost preview tier with lower-quality outputs.