ideogram(Text-to-Image)
Method: POSTEndpoint: /ideogram/generate
Generates images synchronously based on a given prompt and optional parameters. For full parameters, see the official documentation: https://developer.ideogram.ai/api-reference/generate/post-generate-image
Synchronously generates an image from the given prompt and optional parameters. Returned image URLs remain valid for 24 hours. After that they can no longer be accessed. Reverse-proxied image
Request Parameters
Header Parameters
text
accept
string
Required
Example:
application/json
content-type
string
Required
Example:
application/json
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters application/json
text
image_request
object
Required
aspect_ratio
string
Required
ASPECT_10_16、ASPECT_16_10、ASPECT_9_16、ASPECT_16_9、ASPECT_3_2、ASPECT_2_3、ASPECT_4_3、ASPECT_3_4、ASPECT_1_1、ASPECT_1_3、ASPECT_3_1
magic_prompt_option
string
Required
AUTO、ON、OFF
model
string
Required
V_1、V_1_TURBO、V_2、V_2_TURBO
prompt
string
Required
style_type
string
Required
negative_prompt
string
Required
resolution
string
Required
color_palette
string
Required
Example
{
"image_request"
:
{
"aspect_ratio"
:
"string"
,
"magic_prompt_option"
:
"string"
,
"model"
:
"string"
,
"prompt"
:
"string"
,
"style_type"
:
"string"
,
"negative_prompt"
:
"string"
,
"resolution"
:
"string"
,
"color_palette"
:
"string"
}
}Example Request
Shell
bash
curl --location --request POST '/ideogram/generate' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'content-type: application/json' \
--data-raw '{
"image_request": {
"aspect_ratio": "string",
"magic_prompt_option": "string",
"model": "string",
"prompt": "string",
"style_type": "string",
"negative_prompt": "string",
"resolution": "string",
"color_palette": "string"
}
}'Response
🔴 500 Success
Content Type: application/json
Response Schema
text
code
string
Required
message
string
Required
data
null
RequiredExample
json
{
"created": "2000-01-23T04:56:07Z",
"data": [
{
"url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"resolution": "1024x1024",
"is_image_safe": true,
"seed": 12345
},
{
"url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"resolution": "1024x1024",
"is_image_safe": true,
"seed": 12345
}
]
}