更新日期:2026-06-06
Ideogram 旧版
Ideogram 旧版 API 提供基础的图像生成功能。推荐使用 Ideogram V3 获得更好的生成效果。
生成图像
POST /ideogram/generate
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
image_request | object | 是 | 图像请求对象 |
image_request.prompt | string | 是 | 提示词 |
image_request.model | string | 否 | 模型版本:V_2、V_2_TURBO |
image_request.aspect_ratio | string | 否 | 宽高比 |
image_request.magic_prompt_option | string | 否 | 提示词增强 |
image_request.style_type | string | 否 | 风格类型 |
image_request.negative_prompt | string | 否 | 负面提示词 |
请求示例
cURL
curl -X POST https://api.crazyrouter.com/ideogram/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"image_request": {
"prompt": "A futuristic cityscape at night with neon lights",
"model": "V_2",
"aspect_ratio": "ASPECT_16_9",
"magic_prompt_option": "AUTO"
}
}'
响应示例
{
"created": 1709123456,
"data": [
{
"url": "https://ideogram.ai/assets/image/...",
"prompt": "A futuristic cityscape at night with neon lights",
"resolution": "1344x768",
"seed": 67890
}
]
}
Remix 混合
POST /ideogram/remix
cURL
curl -X POST https://api.crazyrouter.com/ideogram/remix \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"image_request": {
"prompt": "Same scene in anime style",
"model": "V_2"
},
"image_file": "https://example.com/photo.jpg"
}'
放大图像
POST /ideogram/upscale
cURL
curl -X POST https://api.crazyrouter.com/ideogram/upscale \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"image_request": {
"prompt": "high quality detailed image"
},
"image_file": "https://example.com/photo.jpg"
}'
描述图像
POST /ideogram/describe
cURL
curl -X POST https://api.crazyrouter.com/ideogram/describe \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"image_file": "https://example.com/photo.jpg"
}'
响应示例
{
"descriptions": [
{
"text": "A futuristic cityscape at night with vibrant neon lights reflecting off wet streets, tall skyscrapers with holographic advertisements"
}
]
}