Ideogram 4.6
This guide shows how to generate images using the Ideogram 4.6 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": "ideogram/ideogram-4.6",
"parameters": {
"width": 2048,
"height": 2048,
"prompt": "A vintage travel poster for a coastal town, bold serif lettering that reads VISIT SEABROOK, a lighthouse on rocky cliffs at golden hour, sailboats on a calm turquoise sea, flat screen-print style with warm orange and deep navy palette",
"quality": "MEDIUM",
"quantity": 4,
"prompt_enhance": "AUTO"
},
"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.image_reference | array | Optional. Reference images used to guide the image generation. Accepts up to 5 items. |
| guidances.image_reference.image | object | Required (for each image_reference item). The reference image object. |
| guidances.image_reference.image.data | string | Optional. Base64-encoded image bytes. Required when type is BASE64. |
| guidances.image_reference.image.height | integer | Optional. Height of the reference image. |
| guidances.image_reference.image.id | string | Optional. UUID of the reference image. Use with type set to UPLOADED, GENERATED, or VARIATION. |
| guidances.image_reference.image.type | string | Optional. Source of the reference image. One of UPLOADED, GENERATED, VARIATION, URL, or BASE64. |
| guidances.image_reference.image.url | string | Optional. Image URL or a base64 data URL. Required when type is URL. |
| guidances.image_reference.image.width | integer | Optional. Width of the reference image. |
| guidances.image_reference.order | integer | Optional. Position of this reference in the list of guidances. Minimum 0. |
| height | integer | Optional. Height of the image in pixels. Defaults to 2048. Supports 256 to 4096 in multiples of 32. The longer side can be at most 6 times the shorter side. When quality is VERY_LOW, the maximum is 2048. |
| model | string | Required. Model identifier. Set to ideogram/ideogram-4.6. |
| prompt | string | Required. Text prompt describing what image you want the model to generate. Accepts 1 to 10000 characters. |
| prompt_enhance | string | Optional. Controls prompt enhancement. One of AUTO, ON, or OFF. Defaults to AUTO. |
| public | boolean | Optional. Determines whether the generated images show in the community feed (true) or stay private (false). |
| quality | string | Optional. Output quality tier. One of VERY_LOW, LOW, MEDIUM, or HIGH. Defaults to MEDIUM. Use quality instead of mode for third-party models. |
| quantity | integer | Optional. Number of images to generate in a single request. Accepts 1 to 8. Defaults to 4. |
| seed | integer | Optional. Apply a fixed seed to maintain consistency across generation sets. Accepts 0 to 2147483647. |
| width | integer | Optional. Width of the image in pixels. Defaults to 2048. Supports 256 to 4096 in multiples of 32. The longer side can be at most 6 times the shorter side. When quality is VERY_LOW, the maximum is 2048. |
Updated about 7 hours ago
Did this page help you?
