模型市场支持← 返回应用

Ideogram

Ideogram 模型通过一个统一的异步任务 API 调用。用 POST /api/generate 发起任务,再轮询 GET /api/generate/{taskId} 直到完成。本系列提供 6 个端点。

概览

每个端点共享相同的外层结构 —— 只有 modelinput 字段不同。可在模型市场的 playground 中运行任意一个。

认证

/api-keys 创建 API 密钥,然后作为 Bearer token 发送。已登录时从浏览器发起的请求也可通过会话 cookie 生效。

Authorization: Bearer <YOUR_API_KEY>

创建任务

POST
POST https://api.lithovas.com/api/generate

请求体:{ "model": "<slug>", "input": { … } }

响应:{ "taskId": "<id>", "state": "waiting" }

查询结果

GET
GET https://api.lithovas.com/api/generate/<taskId>

响应:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

异步
创建任务返回 200 只表示任务已被接受 —— 并非已完成。请轮询此端点,直到 state 变为 successfail。失败任务不计费。

端点

模型任务model slug
IdeogramImage Editingideogram/character-edit
IdeogramImage Editingideogram/character-remix
IdeogramImage Editingideogram/character
Ideogram V3Text to Imageideogram/v3-text-to-image
Ideogram V3 EditImage Editingideogram/v3-edit
Ideogram V3 RemixImage Editingideogram/v3-remix

Ideogram · Image Editing

POSTImage Editingideogram/character-edit
input 字段
promptstring必填

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
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

POSTImage Editingideogram/character-remix
input 字段
promptstring必填

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
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

POSTImage Editingideogram/character
input 字段
promptstring必填

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
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

POSTText to Imageideogram/v3-text-to-image
input 字段
promptstring必填

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
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

POSTImage Editingideogram/v3-edit
input 字段
promptstring必填

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
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

POSTImage Editingideogram/v3-remix
input 字段
promptstring必填

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
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"
  }
}'