Generate
Overview
- Method:
POST
- Method:
- Path:
/ideogram/generate
- Path:
- Content-Type:
application/json
- Content-Type:
Authentication
Authorization: Bearer sk-xxx(required)
Request Example
Header
| Header | Example | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Authorization | Bearer sk-xxxx | Yes |
Request Body (JSON)
json
{
"image_request": {
"prompt": "A detailed image depicts a vast Stone Age city...",
"model": "V_2",
"aspect_ratio": "ASPECT_10_16",
"magic_prompt_option": "AUTO"
}
}Parameter Description
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| image_request | object | Yes | - | Image request object, refer to official documentation |
| - prompt | string | Yes | - | Prompt |
| - model | string | No | V_2 | Model version, options: V_1/V_1_TURBO/V_2/V_2_TURBO |
| - aspect_ratio | string | No | ASPECT_1_1 | Aspect ratio |
| - resolution | string | No | - | Supported on 2.0 only, for image resolution |
| - style_type | string | No | - | Style type, V_2+ only |
| - negative_prompt | string | No | - | Negative prompt |
| - color_palette | object | No | - | Color palette config |
| - seed | string | No | - | Seed |
Response Example (200)
json
{
"created": "2024-10-30T18:45:11.507243+00:00",
"data": [
{
"is_image_safe": true,
"prompt": "A detailed image depicts a vast Stone Age city...",
"resolution": "768x1232",
"seed": 1705925986,
"style_type": null,
"url": "https://ideogram.ai/api/images/ephemeral/aUXMxzdBQy..."
}
]
}