跳转到内容

PuLID

集成

模型 id pulid
# 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/pulid?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reference_images": [
      {
        "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
      }
    ],
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# 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.009 9 API 积分 在此页面运行

获取 API 密钥
ByteDance 图像编辑 参考输入 #editing#customization#personalization

根据参考照片生成保持人物面部特征的新图像,无需针对个人进行调优

ByteDance · 图像

你的第一个结果将在此显示

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

构建请求

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

•必填

用于生成人脸的提示词。

image_size 默认 {"height":1024,"width...

生成图像的尺寸。

num_images 默认 1

要生成的图像数量。

•必填

参考人脸图像列表;4 张图像为理想数量。

高级 negative_prompt · mode · guidance_scale · num_inference_steps · id_scale · seed · id_mix · enable_safety_checker
默认 flaws in the eyes, fl...

人脸生成的负面提示词。

mode 默认 fidelity

生成模式。

默认 1.2

引导缩放值。

默认 4

要执行的总步数。

默认 0.8

ID 缩放值。

用于可复现随机生成的种子。

POST /run/pulid?wait=20 报价 → $0.009
# 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/pulid?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reference_images": [
      {
        "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
      }
    ],
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# 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 密钥

关于 PuLID

接收人脸的 `reference_images`(建议约 4 张)和 `prompt`,然后生成保持身份特征的图像。`mode` 可选择保真或极致风格,`id_scale` 范围为 0 到 5,`id_mix` 支持混合两个身份。最多可生成 8 张图像,步数为 1 到 12,`guidance_scale` 范围为 1 到 1.5。

参数

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

名称类型 默认值允许值 描述
reference_images必填
类型object[]
参考人脸图像列表;4 张图像为理想数量。
reference_images[].image_url必填
类型url · image
参考人脸图像 URL。
prompt必填
类型string
用于生成人脸的提示词。
negative_prompt可选
类型string
默认值flaws in the eyes, flaws in the face, flaws, lowres, non-HDRi, low quality, worst quality,artifacts noise, text, watermark, glitch, deformed, mutated, ugly, disfigured, hands, low resolution, partially rendered objects, deformed or partially rendered eyes, deformed, deformed eyeballs, cross-eyed,blurry
人脸生成的负面提示词。
num_images可选 num_outputs
类型integer
默认值1
1 – 8
要生成的图像数量。
guidance_scale可选
类型number
默认值1.2
1 – 1.5
引导缩放值。
num_inference_steps可选
类型integer
默认值4
1 – 12
要执行的总步数。
seed可选
类型integer | null
用于可复现随机生成的种子。
image_size可选
类型object
默认值{"height":1024,"width":768}
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
生成图像的尺寸。
id_scale可选
类型number
默认值0.8
≤ 5> 0
ID 缩放值。
mode可选
类型enum
默认值fidelity
fidelityextreme style
生成模式。
id_mix可选
类型boolean
默认值false
是否混合两张 ID 图像。启用以进行混合,否则禁用。
enable_safety_checker可选
类型boolean
默认值true
调用方获得授权后,可将其设置为 false 以放宽审核。
必填 规范名称,也可接受

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "pulid",
  "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": 9,
    "usd": "0.009",
    "charged": 9,
    "refunded": 0
  },
  "input": {
    "reference_images": [
      {
        "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
      }
    ],
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "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,
        "width": 1024,
        "height": 768
      }
    ],
    "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, width, height}生成的图像,以列表形式返回。
seed
integer用于复现结果的随机种子。

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