跳转到内容

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

基础 1.5 模型的 URL;默认值为 `SG161222/Realistic_Vision_V4.0_noVAE`。

默认 SG161222/RealVisXL_V3.0

基础 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
基础 1.5 模型的 URL;默认值为 `SG161222/Realistic_Vision_V4.0_noVAE`。
base_sdxl_model_repo可选
类型string
默认值SG161222/RealVisXL_V3.0
基础 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/developers/models/ip-adapter-face-id.md. 所有模型和指南: https://doitong.com/developers/llms.txt