跳至內容

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` 可設為 fidelity 或 extreme 風格,`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-TW/developers/models/pulid.md. 所有模型與指南: https://doitong.com/developers/llms.txt