Submit a Hidream-Q Series Image Generation Task
1. Endpoint
/api/maas/gw/v1/images/generations
2. Method
POST
3. Request Parameters
Header
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer API key, for example sk-xxxxxxxx |
| Content-Type | string | Yes | application/json |
Body (by model)
model_idis required and must match the corresponding model.
Image-2zvskglc hidream-Q3-pro-Image
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | Fixed value: Image-2zvskglc |
| prompt | string | Yes | Text description, up to 2500 characters |
| aspect_ratio | string | No | Output image aspect ratio (width:height). Options: 16:9/9:16/1:1/4:3/3:4/3:2/2:3/21:9/auto. Default: auto |
| element_list | array | No | Subject reference list. For the element structure, see ElementSchema |
| image_list | array | No | Reference image list (supports .jpg/.jpeg/.png) |
| n | int | No | Number of images to generate. Range: 1 to 9. Default: 1 |
| resolution | string | No | Output image resolution. Options: 1k/2k. Default: 1k |
| result_type | string | No | Switch between single-image and image-series output. Options: single/series. Default: single |
| series_amount | int | No | Number of images in a series. Range: 2 to 9. Default: 4 |
| notify_url | string | No | Callback URL. Not yet available |
| request_id | string | No | Custom task ID |
Constraints:
image_listis required whenresult_type=series.- The total number of items in
image_listandelement_listmust not exceed 10.
Image-f3qa3lph hidream-Q3-std-Image
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | Fixed value: Image-f3qa3lph |
| prompt | string | Yes | Positive text prompt, up to 2500 characters |
| aspect_ratio | string | No | Output image aspect ratio (width:height). Options: 16:9/9:16/1:1/4:3/3:4/3:2/2:3/21:9. Default: 16:9 |
| element_list | array | No | Subject reference list. For the element structure, see ElementSchema |
| image | string | No | Reference image URL (supports .jpg/.jpeg/.png, single image < 10MB, minimum width and height 300px, aspect ratio between 1:2.5 and 2.5:1) |
| n | int | No | Number of images to generate. Range: 1 to 9. Default: 1 |
| resolution | string | No | Output image resolution. Options: 1k/2k. Default: 1k |
| notify_url | string | No | Callback URL. Not yet available |
| request_id | string | No | Custom task ID |
Constraints:
- The total number of items in
imageandelement_listmust not exceed 10.
Image-aw47boi4 hidream-Q1-image
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | Fixed value: Image-aw47boi4 |
| prompt | string | Yes | Text description, up to 2500 characters |
| aspect_ratio | string | No | Output image aspect ratio (width:height). Options: 16:9/9:16/1:1/4:3/3:4/3:2/2:3/21:9/auto. Default: 16:9; auto is not supported when image_list is not provided |
| element_list | array | No | Subject reference list. For the element structure, see ElementSchema |
| image_list | array | No | Reference image list (supports .jpg/.jpeg/.png, single image < 10MB, minimum width and height 300px, aspect ratio between 1:2.5 and 2.5:1) |
| n | int | No | Number of images to generate. Range: 1 to 9. Default: 1 |
| resolution | string | No | Output image resolution. Options: 1k/2k. Default: 1k |
| notify_url | string | No | Callback URL. Not yet available |
| request_id | string | No | Custom task ID |
Constraints:
aspect_ratio=autois not supported whenimage_listis not provided.- The total number of items in
image_listandelement_listmust not exceed 10.
Object Structure
ElementSchema
| Parameter | Type | Required | Description |
|---|---|---|---|
| element_id | string | Yes | Subject element ID |
Response
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | int | Yes | Response code. 0 means success; any non-zero value indicates an error. See message for details |
| message | string | Yes | Response message |
| result | dict | Yes | Returned result |
result
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | str | Yes | Task ID |