跳转到内容

Ideogram V3 Character Edit

集成

模型 id ideogram/character/edit
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ideogram/character/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mask": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "reference_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此请求: $0.15 150 API 积分 在此页面运行

获取 API 密钥
Ideogram 图像编辑 参考输入 #character-consistency

Ideogram V3 蒙版编辑,在保留参考角色身份的同时编辑图像

Ideogram · 图像

你的第一个结果会显示在这里

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存,也可免费保存 7 天。

构建请求

控件根据模型架构生成。修改控件时,代码和价格会同步更新。

•必填

描述图像蒙版区域填充内容的提示词。

•必填 image_url
拖放文件,或

以图像 URL 提供的生成源,宽度和高度必须分别与蒙版对应尺寸完全一致。

•必填 mask_url
拖放文件,或

通过 URL 提供的局部重绘蒙版,宽度和高度必须分别与输入图像对应尺寸完全一致。

•必填
拖放文件,或

JPEG、PNG 或 WebP 格式的角色参考图像,所有角色参考图像的总大小限制为 10 MB。目前仅支持 1 张图像;其他图像会被忽略。

rendering_speed 默认 BALANCED

渲染速度设置。

num_images 默认 1

要生成的图像数量。

高级 images · reference_mask_urls · seed · expand_prompt · style_codes · color_palette
image_urls
拖放文件,或

JPEG、PNG 或 WebP 格式的风格参考图像。总大小不得超过 10 MB。

拖放文件,或

JPEG、PNG 或 WebP 格式的角色参考蒙版;所有角色参考图像的总大小不得超过 10 MB。目前仅使用 1 个蒙版,其他蒙版会被忽略。

随机数生成的种子值。

图像风格代码,每个代码为 8 个字符的十六进制字符串;使用此列表时请同时省略 style_reference_images 和 style。

生成期间使用的调色板。可通过名称指定预设,或通过 members 指定明确的十六进制颜色,也可以选择性地包含权重。

POST /run/ideogram/character/edit?wait=20 报价 → $0.15
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ideogram/character/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mask": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "reference_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Ideogram V3 Character Edit

使用 `mask_url` 对 `image_url` 的蒙版区域进行修复(两者尺寸必须相同),并结合 `prompt` 和 `reference_image_urls` 中的角色参考图(使用 1 张图)。适用于更改姿势、表情或服装。支持可选的风格参考图、`rendering_speed` 以及最多 8 个输出。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
image_urls可选 images
类型url[] · image
JPEG、PNG 或 WebP 格式的风格参考图像。总大小不得超过 10 MB。
rendering_speed可选
类型enum
默认值BALANCED
TURBOBALANCEDQUALITY
渲染速度设置。
color_palette可选
类型object
生成期间使用的调色板。可通过名称指定预设,或通过 members 指定明确的十六进制颜色,也可以选择性地包含权重。
color_palette.members可选
类型object[]
定义调色板颜色的调色板成员列表。
color_palette.members[].rgb必填
类型object
以 RGB 表示的调色板成员颜色。
color_palette.members[].color_weight可选
类型number | null
默认值0.5
0.05 – 1
分配给该颜色在调色板中的权重。
color_palette.name可选
类型enum
EMBERFRESHJUNGLEMAGICMELONMOSAICPASTELULTRAMARINE
调色板的预设选择。
style_codes可选
类型string[]
图像风格代码,每个代码为 8 个字符的十六进制字符串;使用此列表时请同时省略 style_reference_images 和 style。
expand_prompt可选
类型boolean
默认值true
请求生成的 MagicPrompt 使用开关。
num_images可选 num_outputs
类型integer
默认值1
1 – 8
要生成的图像数量。
seed可选
类型integer | null
随机数生成的种子值。
prompt必填
类型string
描述图像蒙版区域填充内容的提示词。
image_url必填 image
类型url · image
以图像 URL 提供的生成源,宽度和高度必须分别与蒙版对应尺寸完全一致。
mask_url必填 mask
类型url · image
通过 URL 提供的局部重绘蒙版,宽度和高度必须分别与输入图像对应尺寸完全一致。
reference_image_urls必填
类型url[] · image
JPEG、PNG 或 WebP 格式的角色参考图像,所有角色参考图像的总大小限制为 10 MB。目前仅支持 1 张图像;其他图像会被忽略。
reference_mask_urls可选
类型url[] · image
JPEG、PNG 或 WebP 格式的角色参考蒙版;所有角色参考图像的总大小不得超过 10 MB。目前仅使用 1 个蒙版,其他蒙版会被忽略。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ideogram/character/edit",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 150,
    "usd": "0.15",
    "charged": 150,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "mask_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "reference_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200
      }
    ],
    "seed": 42
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
文件由你选择每个 outputs[].url 都是我们存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
所有模型的结构一致图像、视频和音频的字段均为 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
images
array of object {url, content_type, file_name, file_size}
seed
integer用于随机数生成的种子值。

更多模型:图像编辑

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh-CN/developers/models/ideogram/character/edit.md. 所有模型和指南: https://doitong.com/developers/llms.txt