跳至內容

IP Adapter Face ID

整合

模型 id ip-adapter-face-id
# 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/ip-adapter-face-id?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"
  }'

# 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.06 60 API 點數 在此頁面執行

取得 API 金鑰
Tencent 圖像編輯 #ip-adapter#personalization#customization#editing

根據一張照片或包含多張照片的 zip 產生相符臉部影像,支援 SD 1.5 或 SDXL 基礎模型

Tencent · 圖像

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填

盡可能詳細地描述想要生成的圖像,以取得最佳結果。

預設 4

臉部 ID 的樣本數,預設值為 4。增加數量可提升圖像品質,但會延長生成時間。

進階 negative_prompt · face_image_url · model_type · face_images_data_url · base_1_5_model_repo · base_sdxl_model_repo · guidance_scale · num_inference_steps · width · height · face_id_det_size · seed · enable_safety_checker
預設 blurry, low resolutio...

指定不需要圖像細節的負面提示詞。可排除色彩、物件、景物或更細微的特徵與品質,例如鬍鬚、模糊或低解析度。

拖放檔案,或

臉部比對參考圖像;若尺寸不同,會縮放並裁切為 640x640。

model_type 預設 1_5-v1

模型選擇,其中 1_5 是預設值,也是大多數用途的建議選項。

臉部圖像 zip 封存檔 URL,用於從封存圖像的嵌入平均值建立更準確的臉部 ID。

預設 SG161222/Realistic_Vi...

Base 1.5 模型的 URL;預設值為 `SG161222/Realistic_Vision_V4.0_noVAE`。

預設 SG161222/RealVisXL_V3.0

Base SDXL 模型的 URL;預設值為 `SG161222/RealVisXL_V3.0`。

預設 7.5

圖像選取的提示詞遵循強度,以 CFG (Classifier Free Guidance) 表示。

預設 50

圖像生成推論步驟數量;數量越大圖像品質越好,但生成時間也越長。

預設 512

結果圖像的寬度。

預設 512

結果圖像的高度。

預設 640

設定臉部偵測模型大小;若模型無法在圖像中找到臉部,請降低此值。較大的設定可提高偵測準確度,但速度較慢,也更可能完全找不到臉部。

用於在 Stable Diffusion 中重現圖像的種子。只要模型版本、提示詞和種子保持不變,每次執行都能精確重現圖像。

POST /run/ip-adapter-face-id?wait=20 報價 → $0.06
# 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/ip-adapter-face-id?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"
  }'

# 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 金鑰

關於 IP Adapter Face ID

根據以 `face_image_url` 提供的臉部,或透過 `face_images_data_url` 提供的多張臉部 ZIP(其嵌入向量會取平均)來個人化生成。`model_type` 可在 SD 1.5 與 SDXL 變體間選擇,也可透過 repo 參數變更基礎檢查點。`width` 與 `height` 範圍為 512 到 1024,`num_inference_steps` 最多為 200。

參數

名稱類型 預設值允許值 說明
model_type選填
類型enum
預設值1_5-v1
1_5-v11_5-v1-plus1_5-v2-plusSDXL-v1SDXL-v2-plus1_5-auraface-v1
模型選擇,其中 1_5 是預設值,也是大多數用途的建議選項。
prompt必填
類型string
盡可能詳細地描述想要生成的圖像,以取得最佳結果。
face_image_url選填
類型url · image
臉部比對參考圖像;若尺寸不同,會縮放並裁切為 640x640。
face_images_data_url選填
類型string | null
臉部圖像 zip 封存檔 URL,用於從封存圖像的嵌入平均值建立更準確的臉部 ID。
negative_prompt選填
類型string
預設值blurry, low resolution, bad, ugly, low quality, pixelated, interpolated, compression artifacts, noisey, grainy
指定不需要圖像細節的負面提示詞。可排除色彩、物件、景物或更細微的特徵與品質,例如鬍鬚、模糊或低解析度。
seed選填
類型integer | null
用於在 Stable Diffusion 中重現圖像的種子。只要模型版本、提示詞和種子保持不變,每次執行都能精確重現圖像。
guidance_scale選填
類型number
預設值7.5
0 – 16
圖像選取的提示詞遵循強度,以 CFG (Classifier Free Guidance) 表示。
num_inference_steps選填
類型integer
預設值50
1 – 200
圖像生成推論步驟數量;數量越大圖像品質越好,但生成時間也越長。
num_samples選填
類型integer
預設值4
1 – 4
臉部 ID 的樣本數,預設值為 4。增加數量可提升圖像品質,但會延長生成時間。
width選填
類型integer
預設值512
512 – 1,024
結果圖像的寬度。
height選填
類型integer
預設值512
512 – 1,024
結果圖像的高度。
face_id_det_size選填
類型integer
預設值640
64 – 640
設定臉部偵測模型大小;若模型無法在圖像中找到臉部,請降低此值。較大的設定可提高偵測準確度,但速度較慢,也更可能完全找不到臉部。
base_1_5_model_repo選填
類型string
預設值SG161222/Realistic_Vision_V4.0_noVAE
Base 1.5 模型的 URL;預設值為 `SG161222/Realistic_Vision_V4.0_noVAE`。
base_sdxl_model_repo選填
類型string
預設值SG161222/RealVisXL_V3.0
Base SDXL 模型的 URL;預設值為 `SG161222/RealVisXL_V3.0`。
enable_safety_checker選填
類型boolean
預設值true
在呼叫端獲得授權的情況下,將此值設為 false 可放寬審核。
必填

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ip-adapter-face-id",
  "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": 60,
    "usd": "0.06",
    "charged": 60,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "image": {
      "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 是模型自己的結果物件。
輸出欄位
image
object {url, content_type, file_name, file_size, width, height}生成圖像的檔案資訊。
seed
integer圖像生成種子;若輸入未提供種子,則包含隨機選取的值,否則會重複提供的值。

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/ip-adapter-face-id.md. 所有模型與指南: https://doitong.com/developers/llms.txt