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/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

ParameterTypeDefinition
guidancesobjectOptional. Object defining image guidance inputs that influence the generated result.
guidances.image_referencearrayOptional. 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.
heightintegerOptional. Height of the image to generate in pixels. Supports 480 to 6336 in multiples of 16. Defaults to 1024.
modelstringRequired. Model identifier. Set to minimax/h3-image.
promptstringRequired. Text prompt describing what image you want the model to generate. Supports up to 9999 characters.
publicbooleanOptional. Boolean flag that determines whether the generation is public (true) or private (false).
qualitystringOptional. 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.
quantityintegerOptional. Number of images to generate in a single request. Supports 1 to 8. Defaults to 4.
widthintegerOptional. Width of the image to generate in pixels. Supports 480 to 6336 in multiples of 16. Defaults to 1024.

Did this page help you?