ByteDance PuLID: tuning-free identity customization on SDXL. Give it one face photo and a prompt to generate portraits in any scene or style โ no training, 4-step fast sampling, and even two-identity blending. Extremely cost-effective at 2 credits per image.
Test this model instantly in the Console Playground โ no code required
Copy usage instructions for Claude, ChatGPT, or other AI
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "bytedance/pulid",
"input": {
"main_face_image": "https://example.com/face.webp",
"prompt": "portrait, impressionist painting, loose brushwork, vibrant color, light and shadow play",
"num_samples": 4,
"identity_scale": 0.8,
"generation_mode": "fidelity"
}
}'| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | No | portrait,color,cinematic,in garden,soft light,detailed face | Text prompt describing the scene and style |
main_face_image | string | Yes | - | ID image (main face photo) |
auxiliary_face_image1 | string | No | - | Additional ID image โ the second face when mix_identities is on |
auxiliary_face_image2 | string | No | - | Additional ID image (auxiliary) |
auxiliary_face_image3 | string | No | - | Additional ID image (auxiliary) |
negative_prompt | string | No | 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 | Negative Prompt |
cfg_scale | number | No | 1.2 | CFG, recommend value range [1, 1.5], 1 will be faster |
num_steps | integer | No | 4 | Sampling steps (1-100). 4 is the fast lightning default |
image_height | integer | No | 1024 | Output height in pixels (512-2024) |
image_width | integer | No | 768 | Output width in pixels (512-2024) |
identity_scale | number | No | 0.8 | ID scale (0-5). Higher preserves the face more strongly |
generation_mode | string | No | fidelity | 'fidelity' prioritizes likeness; 'extremely style' prioritizes stylization fidelityextremely style |
mix_identities | boolean | No | false | Turn on to mix two ID images into one identity (use auxiliary_face_image1) |
seed | integer | No | - | Random seed. Leave blank to randomize |
num_samples | integer | No | 4 | Number of images to generate (1-8). Billed at 2 credits per image |
output_format | string | No | webp | Format of the output images webpjpgpng |
output_quality | integer | No | 80 | Quality of the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. |
There are 3 ways to provide files for the main_face_imageauxiliary_face_image1 parameters:
Attach files directly to POST /v1/predictions/upload. No separate upload step needed.
curl -X POST "https://api.core.today/v1/predictions/upload" \
-H "X-API-Key: cdt_your_api_key" \
-F "model=bytedance/pulid" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:main_face_image=@your_file.png"Pass a publicly accessible URL directly. You can also use file_url from the Storage API.
{
"model": "bytedance/pulid",
"input": {
"prompt": "your prompt here",
"main_face_image": "https://example.com/image.jpg"
}
}Common parameters used when calling POST /v1/predictions.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | - | Model identifier |
input | object | Yes | - | Object containing the model-specific parameters from the table above |
output_folder | string | No | - | Folder path for output files (max 256 chars, '..' not allowed) |
webhook_url | string | No | - | Webhook URL to call on completion |
is_public | boolean | No | false | If true, output files are also available via permanent public URLs |
Four impressionist-painting portraits of the same person from one photo
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "bytedance/pulid",
"input": {
"main_face_image": "https://example.com/face.webp",
"prompt": "portrait, impressionist painting, loose brushwork, vibrant color, light and shadow play",
"num_samples": 4,
"identity_scale": 0.8,
"generation_mode": "fidelity"
}
}'Blend two face photos into a single new character
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "bytedance/pulid",
"input": {
"main_face_image": "https://example.com/face-a.jpg",
"auxiliary_face_image1": "https://example.com/face-b.jpg",
"mix_identities": true,
"prompt": "portrait, color, cinematic, soft light, detailed face",
"num_samples": 2
}
}'POST /v1/predictions