Ideogram
Ideogram 模型通过一个统一的异步任务 API 调用。用 POST /api/generate 发起任务,再轮询 GET /api/generate/{taskId} 直到完成。本系列提供 6 个端点。
概览
每个端点共享相同的外层结构 —— 只有 model 和 input 字段不同。可在模型市场的 playground 中运行任意一个。
认证
在 /api-keys 创建 API 密钥,然后作为 Bearer token 发送。已登录时从浏览器发起的请求也可通过会话 cookie 生效。
Authorization: Bearer <YOUR_API_KEY>创建任务
POST https://api.lithovas.com/api/generate请求体:{ "model": "<slug>", "input": { … } }
响应:{ "taskId": "<id>", "state": "waiting" }
查询结果
GET https://api.lithovas.com/api/generate/<taskId>响应:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
state 变为 success 或 fail。失败任务不计费。端点
| 模型 | 任务 | model slug |
|---|---|---|
| Ideogram | Image Editing | ideogram/character-edit |
| Ideogram | Image Editing | ideogram/character-remix |
| Ideogram | Image Editing | ideogram/character |
| Ideogram V3 | Text to Image | ideogram/v3-text-to-image |
| Ideogram V3 Edit | Image Editing | ideogram/v3-edit |
| Ideogram V3 Remix | Image Editing | ideogram/v3-remix |
Ideogram · Image Editing
ideogram/character-editpromptstring必填Text prompt to fill the masked image area (max 5000 chars)
image_urlstring必填Image URL to edit; must match mask dimensions (JPEG/PNG/WebP, max 10MB)
mask_urlstring必填Mask URL indicating region to inpaint; must match image dimensions
reference_image_urlsarray<string>必填Character reference images (1 supported, max 10MB total)
rendering_speedenum<string>可选Speed/quality tradeoff for generation
styleenum<string>可选Visual style for output image generation
expand_promptboolean可选Enable MagicPrompt enhancement
num_imagesenum<string>可选Number of images to generate
seedinteger可选Random seed for reproducible generation
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/character-edit",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_url": "https://example.com/input.jpg",
"mask_url": "example",
"reference_image_urls": [
"https://example.com/input.jpg"
],
"rendering_speed": "BALANCED",
"style": "AUTO",
"expand_prompt": true,
"num_images": "1",
"seed": 42
}
}'Ideogram · Image Editing
ideogram/character-remixpromptstring必填Text description to remix the image with (max 5000 chars)
image_urlstring必填Image URL to remix (JPEG/PNG/WebP, max 10MB)
reference_image_urlsarray<string>必填Character reference images (1 supported, max 10MB)
rendering_speedenum<string>可选Generation speed vs quality tradeoff
styleenum<string>可选Style type for generation
expand_promptboolean可选Enable MagicPrompt enhancement
image_sizeenum<string>可选Output image dimensions
num_imagesenum<string>可选Number of images to generate
seedinteger可选Random number generator seed
strengthnumber可选Input image influence strength (0.1-1.0, step 0.1)
negative_promptstring可选Content to exclude from generation (max 500 chars)
image_urlsarray<string>可选Style reference images (max 10MB total)
reference_mask_urlsstring可选Masks for character references (1 supported, max 10MB)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/character-remix",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_url": "https://example.com/input.jpg",
"reference_image_urls": [
"https://example.com/input.jpg"
],
"rendering_speed": "BALANCED",
"style": "AUTO",
"expand_prompt": true,
"image_size": "square_hd",
"num_images": "1",
"seed": 42,
"strength": 0.8,
"negative_prompt": "",
"image_urls": [
"https://example.com/input.jpg"
],
"reference_mask_urls": ""
}
}'Ideogram · Image Editing
ideogram/characterpromptstring必填The prompt to fill the masked part of the image (max 5000 chars)
reference_image_urlsarray<string>必填Character reference images (1 supported, max 10MB total)
rendering_speedenum<string>可选Speed setting for generation
styleenum<string>可选Style type for generation
expand_promptboolean可选Enable/disable MagicPrompt expansion
num_imagesenum<string>可选Number of images to generate
image_sizeenum<string>可选Output image resolution
seedinteger可选Random number generator seed for reproducibility
negative_promptstring可选Exclude specified elements from generation (max 5000 chars)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/character",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"reference_image_urls": [
"https://example.com/input.jpg"
],
"rendering_speed": "BALANCED",
"style": "AUTO",
"expand_prompt": true,
"num_images": "1",
"image_size": "square_hd",
"seed": 42,
"negative_prompt": ""
}
}'Ideogram V3 · Text to Image
ideogram/v3-text-to-imagepromptstring必填Description of the image to generate (max 5000 chars)
rendering_speedenum<string>可选Rendering speed vs quality tradeoff
styleenum<string>可选Visual style type for generation output
expand_promptboolean可选Whether to use MagicPrompt to enhance the request
image_sizeenum<string>可选Resolution of the generated image
seedinteger可选Seed value for the random number generator
negative_promptstring可选Description of what to exclude (max 5000 chars)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/v3-text-to-image",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"rendering_speed": "TURBO",
"style": "AUTO",
"expand_prompt": false,
"image_size": "square",
"seed": 42,
"negative_prompt": "example"
}
}'Ideogram V3 Edit · Image Editing
ideogram/v3-editpromptstring必填Text describing what to fill in masked area (max 5000 chars)
image_urlstring必填URL of image to edit; must match mask dimensions
mask_urlstring必填URL of mask indicating areas to inpaint; must match image dimensions
rendering_speedenum<string>可选Speed/quality tradeoff for generation
expand_promptboolean可选Whether to apply MagicPrompt enhancement
seedinteger可选Random number generator seed for reproducible results
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/v3-edit",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_url": "https://example.com/input.jpg",
"mask_url": "example",
"rendering_speed": "BALANCED",
"expand_prompt": true,
"seed": 42
}
}'Ideogram V3 Remix · Image Editing
ideogram/v3-remixpromptstring必填Text prompt to remix the image with (max 5000 chars)
image_urlstring必填URL of image to remix (JPEG/PNG/WebP, max 10MB)
rendering_speedenum<string>可选Speed/quality tradeoff for generation
styleenum<string>可选Visual style for output
expand_promptboolean可选Enable MagicPrompt enhancement
image_sizeenum<string>可选Output image resolution/aspect ratio
num_imagesenum<string>可选Number of images to generate
seedinteger可选Random number generator seed for reproducibility
strengthnumber可选Influence of input image (0.01-1.0, step 0.01)
negative_promptstring可选Content to exclude from generation (max 5000 chars)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ideogram/v3-remix",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_url": "https://example.com/input.jpg",
"rendering_speed": "TURBO",
"style": "AUTO",
"expand_prompt": false,
"image_size": "square",
"num_images": "1",
"seed": 42,
"strength": 1,
"negative_prompt": "example"
}
}'