MiniMax H3 Image
This guide shows how to generate images using the MiniMax H3 Image model via the Leonardo.AI REST API.
Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v2/generations \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '{
"model": "minimax/h3-image",
"parameters": {
"width": 1024,
"height": 1024,
"prompt": "Koala with purple wizard hat on a skateboard",
"quality": "STANDARD",
"quantity": 2
},
"public": false
}'API Request Endpoint, Headers, Parameters
Endpoint
https://cloud.leonardo.ai/api/rest/v2/generationsHeaders
--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"Body Parameters
| Parameter | Type | Definition |
|---|---|---|
| guidances | object | Optional. Object defining image guidance inputs that influence the generated result. |
| guidances.image_reference | array | Optional. Array of up to 16 reference images. Each reference includes a required image object with image.id and image.type (UPLOADED, GENERATED, VARIATION, URL, or BASE64; use image.url for URL or image.data for BASE64), plus an optional order integer that sets the guidance order. |
| height | integer | Optional. Height of the image to generate in pixels. Supports 480 to 6336 in multiples of 16. Defaults to 1024. |
| model | string | Required. Model identifier. Set to minimax/h3-image. |
| prompt | string | Required. Text prompt describing what image you want the model to generate. Supports up to 9999 characters. |
| public | boolean | Optional. Boolean flag that determines whether the generation is public (true) or private (false). |
| quality | string | Optional. Generation speed. Supports STANDARD or ACCELERATED. STANDARD uses the standard model. ACCELERATED uses the high-speed model, which returns sooner and costs more. Defaults to STANDARD. |
| quantity | integer | Optional. Number of images to generate in a single request. Supports 1 to 8. Defaults to 4. |
| width | integer | Optional. Width of the image to generate in pixels. Supports 480 to 6336 in multiples of 16. Defaults to 1024. |
Updated 1 day ago
Did this page help you?
