HiDream O1 API, HiDream O1 Dev API, HiDream I1 Full API - AI Image Generation APIs
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 Text to Image API Documentation
https://gateway.pixazo.ai/hidream-o1-image/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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[] | [] | — | Array of URLs to reference images. Use 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} | square_hd | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output resolution. Accepts predefined enums: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Alternatively, specify exact width and height as an object (e.g., {"width": 2048, "height": 2048}), snapped to nearest supported resolution up to 2048x2048. |
| num_inference_steps | No | integer | 50 | — | Number of denoising steps during generation. Higher values improve quality but increase processing time. |
| guidance_scale | No | float | 5 | 1–15 | Classifier-free guidance scale. Controls how closely the output adheres to the prompt. Values typically range from 1 to 15. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical parameters to generate identical outputs. |
| 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 true, returns base64-encoded data URI instead of a public URL. Use only for small-scale or testing purposes. |
| enable_safety_checker | No | boolean | true | — | Enables or disables the NSFW content filter. Disable only if you are certain your content complies with safety policies. |
| keep_original_aspect | No | boolean | false | — | When exactly one reference_image_url is provided, preserves the original aspect ratio of the reference image instead of snapping to image_size. |
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 Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.01 |
HiDream O1 Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/hidream-o1-image-edit/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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 be detailed for best results. |
| reference_image_urls | Yes | string[] | — | — | Array of URLs to reference images used for editing or subject-driven personalization. Use one image for editing, multiple for multi-subject personalization. |
| image_size | No | enum or {width,height} | — | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output resolution. Accepts predefined enums: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom object with width and height (both must be ≤ 2048 and snapped to nearest supported resolution). |
| num_inference_steps | No | integer | 50 | — | Number of denoising steps during generation. Higher values improve quality but increase processing time. |
| guidance_scale | No | float | 5 | 1–15 | Classifier-free guidance scale. Controls how closely the output follows the prompt. Values typically range from 1 to 15. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical inputs to generate identical outputs. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. Must be ≥ 1 and ≤ 4. |
| output_format | No | enum | "png" | jpeg, png, webp | Output image format. Allowed values: jpeg, png, webp. |
| sync_mode | No | boolean | — | — | If true, returns base64-encoded data URI in output.media_url instead of a public URL. Use for low-latency applications. |
| enable_safety_checker | No | boolean | true | — | Enables or disables the NSFW content filter. Disable only if you are certain your inputs are safe. |
| keep_original_aspect | No | boolean | — | — | When exactly one reference image is provided, preserves its original aspect ratio in the output. Overrides image_size if specified. |
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://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
{
"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 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.01 |
HiDream O1 Dev Text to Image API Documentation
https://gateway.pixazo.ai/hidream-o1-image-dev/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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 describe the desired visual content clearly. |
| reference_image_urls | No | string[] | — | — | Array of URLs to reference images. Use 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} | square_hd | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output image dimensions. Allowed enum values: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Alternatively, specify exact width and height as integers, rounded down to the nearest multiple of 32, with maximum 2048x2048. |
| num_inference_steps | No | integer | 28 | — | Number of denoising steps. The distilled model is optimized for 28 steps; increasing beyond this may not improve quality. |
| guidance_scale | No | float | 0.0 | — | Classifier-free guidance scale. The dev model uses 0.0 by default for faster inference; values above 0.0 may increase adherence to prompt but reduce speed. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical inputs to generate identical outputs. |
| 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 true, returns base64-encoded data URI in output.media_data instead of a public URL. Use only for small-scale or testing purposes. |
| enable_safety_checker | No | boolean | true | — | Toggle the NSFW content safety checker. Disable only if you are certain your prompts are safe and comply with platform policies. |
| 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. |
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 Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.005 |
HiDream O1 Dev Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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 detailed for best results. |
| reference_image_urls | Yes | string[] | — | — | Array of HTTPS URLs to reference images used for editing or subject-driven personalization. Must be publicly accessible. |
| image_size | No | object or string | — | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output resolution. Accepts either an object with `width` and `height` (e.g., `{ "width": 2048, "height": 2048 }`) or a preset string. Allowed presets: `square_hd`, `square`, `portrait_4_3`, `portrait_16_9`, `landscape_4_3`, `landscape_16_9`. Values are snapped to nearest supported resolution up to 2048x2048. |
| num_inference_steps | No | integer | 28 | — | Number of denoising steps. This model is distilled for optimal performance at 28 steps. |
| guidance_scale | No | float | 0.0 | — | Classifier-free guidance scale. The dev edition uses 0.0 by default for faster inference. Values above 0.0 may increase fidelity but slow generation. |
| seed | No | integer | — | — | Random seed for reproducible results. If omitted, a random seed is used. |
| num_images | No | integer | 1 | — | Number of images to generate in a single request. |
| output_format | No | string | "png" | jpeg, png, webp | Output image format. Allowed values: `jpeg`, `png`, `webp`. |
| sync_mode | No | boolean | — | — | If `true`, returns base64-encoded data URI in `output.media_url` instead of a public URL. If `false` or omitted, returns a public URL. |
| enable_safety_checker | No | boolean | true | — | Toggle the NSFW content safety checker. Set to `false` to disable filtering. |
| keep_original_aspect | No | boolean | — | — | When exactly one reference image is provided, preserve its original aspect ratio in the output. If omitted, output is resized to match `image_size`. |
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://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
{
"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 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.005 |
HiDream O1 Dev Text to Image API Documentation
https://gateway.pixazo.ai/hidream-o1-image-dev/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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 describe the desired visual content clearly. |
| reference_image_urls | No | string[] | — | — | Array of URLs to reference images. Use 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} | square_hd | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output image dimensions. Allowed enum values: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Alternatively, specify exact width and height as integers, rounded down to the nearest multiple of 32, with maximum 2048x2048. |
| num_inference_steps | No | integer | 28 | — | Number of denoising steps. The distilled model is optimized for 28 steps; increasing beyond this may not improve quality. |
| guidance_scale | No | float | 0.0 | — | Classifier-free guidance scale. The dev model uses 0.0 by default for faster inference; values above 0.0 may increase adherence to prompt but reduce speed. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical inputs to generate identical outputs. |
| 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 true, returns base64-encoded data URI in output.media_data instead of a public URL. Use only for small-scale or testing purposes. |
| enable_safety_checker | No | boolean | true | — | Toggle the NSFW content safety checker. Disable only if you are certain your prompts are safe and comply with platform policies. |
| 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. |
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 Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.005 |
HiDream O1 Dev Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/hidream-o1-image-dev-edit/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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 detailed for best results. |
| reference_image_urls | Yes | string[] | — | — | Array of HTTPS URLs to reference images used for editing or subject-driven personalization. Must be publicly accessible. |
| image_size | No | object or string | — | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output resolution. Accepts either an object with `width` and `height` (e.g., `{ "width": 2048, "height": 2048 }`) or a preset string. Allowed presets: `square_hd`, `square`, `portrait_4_3`, `portrait_16_9`, `landscape_4_3`, `landscape_16_9`. Values are snapped to nearest supported resolution up to 2048x2048. |
| num_inference_steps | No | integer | 28 | — | Number of denoising steps. This model is distilled for optimal performance at 28 steps. |
| guidance_scale | No | float | 0.0 | — | Classifier-free guidance scale. The dev edition uses 0.0 by default for faster inference. Values above 0.0 may increase fidelity but slow generation. |
| seed | No | integer | — | — | Random seed for reproducible results. If omitted, a random seed is used. |
| num_images | No | integer | 1 | — | Number of images to generate in a single request. |
| output_format | No | string | "png" | jpeg, png, webp | Output image format. Allowed values: `jpeg`, `png`, `webp`. |
| sync_mode | No | boolean | — | — | If `true`, returns base64-encoded data URI in `output.media_url` instead of a public URL. If `false` or omitted, returns a public URL. |
| enable_safety_checker | No | boolean | true | — | Toggle the NSFW content safety checker. Set to `false` to disable filtering. |
| keep_original_aspect | No | boolean | — | — | When exactly one reference image is provided, preserve its original aspect ratio in the output. If omitted, output is resized to match `image_size`. |
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://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
{
"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 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.005 |
HiDream I1 Full Text to Image API Documentation
https://gateway.pixazo.ai/hidream-o1-image/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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[] | [] | — | Array of URLs to reference images. Use 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} | square_hd | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output resolution. Accepts predefined enums: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9. Alternatively, specify exact width and height as an object (e.g., {"width": 2048, "height": 2048}), snapped to nearest supported resolution up to 2048x2048. |
| num_inference_steps | No | integer | 50 | — | Number of denoising steps during generation. Higher values improve quality but increase processing time. |
| guidance_scale | No | float | 5 | 1–15 | Classifier-free guidance scale. Controls how closely the output adheres to the prompt. Values typically range from 1 to 15. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical parameters to generate identical outputs. |
| 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 true, returns base64-encoded data URI instead of a public URL. Use only for small-scale or testing purposes. |
| enable_safety_checker | No | boolean | true | — | Enables or disables the NSFW content filter. Disable only if you are certain your content complies with safety policies. |
| keep_original_aspect | No | boolean | false | — | When exactly one reference_image_url is provided, preserves the original aspect ratio of the reference image instead of snapping to image_size. |
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 Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.01 |
HiDream I1 Full Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/hidream-o1-image-edit/v1
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 generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
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 be detailed for best results. |
| reference_image_urls | Yes | string[] | — | — | Array of URLs to reference images used for editing or subject-driven personalization. Use one image for editing, multiple for multi-subject personalization. |
| image_size | No | enum or {width,height} | — | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | Output resolution. Accepts predefined enums: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom object with width and height (both must be ≤ 2048 and snapped to nearest supported resolution). |
| num_inference_steps | No | integer | 50 | — | Number of denoising steps during generation. Higher values improve quality but increase processing time. |
| guidance_scale | No | float | 5 | 1–15 | Classifier-free guidance scale. Controls how closely the output follows the prompt. Values typically range from 1 to 15. |
| seed | No | integer | — | — | Random seed for reproducible results. Use the same seed with identical inputs to generate identical outputs. |
| num_images | No | integer | 1 | 1–4 | Number of images to generate in a single request. Must be ≥ 1 and ≤ 4. |
| output_format | No | enum | "png" | jpeg, png, webp | Output image format. Allowed values: jpeg, png, webp. |
| sync_mode | No | boolean | — | — | If true, returns base64-encoded data URI in output.media_url instead of a public URL. Use for low-latency applications. |
| enable_safety_checker | No | boolean | true | — | Enables or disables the NSFW content filter. Disable only if you are certain your inputs are safe. |
| keep_original_aspect | No | boolean | — | — | When exactly one reference image is provided, preserves its original aspect ratio in the output. Overrides image_size if specified. |
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://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
{
"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 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.01 |