typefile
{
"guidance_scale": 4,
"height": 1152,
"id_weight": 1,
"main_face_image": "https://replicate.delivery/pbxt/MayZhLThspqLqRhirB8VEjqbEX5B0PWqjd9xe3PkTv2wLMcr/woman.png",
"max_sequence_length": 128,
"negative_prompt": "bad quality, worst quality, text, signature, watermark, extra limbs",
"num_outputs": 4,
"num_steps": 20,
"output_format": "webp",
"output_quality": 80,
"prompt": "a woman holding sign with glowing green text \"PuLID for FLUX\"",
"start_step": 4,
"true_cfg": 1,
"width": 896
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HeI**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run bytedance/flux-pulid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"bytedance/flux-pulid:8baa7ef2255075b46f4d91cd238c21d31181b3e6a864463f967960bb0112525b",
{
input: {
guidance_scale: 4,
height: 1152,
id_weight: 1,
main_face_image: "https://replicate.delivery/pbxt/MayZhLThspqLqRhirB8VEjqbEX5B0PWqjd9xe3PkTv2wLMcr/woman.png",
max_sequence_length: 128,
negative_prompt: "bad quality, worst quality, text, signature, watermark, extra limbs",
num_outputs: 4,
num_steps: 20,
output_format: "webp",
output_quality: 80,
prompt: "a woman holding sign with glowing green text \"PuLID for FLUX\"",
start_step: 4,
true_cfg: 1,
width: 896
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HeI**********************************
This is your API token. Keep it to yourself.
import replicate
Run bytedance/flux-pulid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"bytedance/flux-pulid:8baa7ef2255075b46f4d91cd238c21d31181b3e6a864463f967960bb0112525b",
input={
"guidance_scale": 4,
"height": 1152,
"id_weight": 1,
"main_face_image": "https://replicate.delivery/pbxt/MayZhLThspqLqRhirB8VEjqbEX5B0PWqjd9xe3PkTv2wLMcr/woman.png",
"max_sequence_length": 128,
"negative_prompt": "bad quality, worst quality, text, signature, watermark, extra limbs",
"num_outputs": 4,
"num_steps": 20,
"output_format": "webp",
"output_quality": 80,
"prompt": "a woman holding sign with glowing green text \"PuLID for FLUX\"",
"start_step": 4,
"true_cfg": 1,
"width": 896
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HeI**********************************
This is your API token. Keep it to yourself.
Run bytedance/flux-pulid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "bytedance/flux-pulid:8baa7ef2255075b46f4d91cd238c21d31181b3e6a864463f967960bb0112525b",
"input": {
"guidance_scale": 4,
"height": 1152,
"id_weight": 1,
"main_face_image": "https://replicate.delivery/pbxt/MayZhLThspqLqRhirB8VEjqbEX5B0PWqjd9xe3PkTv2wLMcr/woman.png",
"max_sequence_length": 128,
"negative_prompt": "bad quality, worst quality, text, signature, watermark, extra limbs",
"num_outputs": 4,
"num_steps": 20,
"output_format": "webp",
"output_quality": 80,
"prompt": "a woman holding sign with glowing green text \\"PuLID for FLUX\\"",
"start_step": 4,
"true_cfg": 1,
"width": 896
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "zm4dca866nrj20cnbhmsy5bzbr",
"model": "bytedance/flux-pulid",
"version": "8baa7ef2255075b46f4d91cd238c21d31181b3e6a864463f967960bb0112525b",
"input": {
"guidance_scale": 4,
"height": 1152,
"id_weight": 1,
"main_face_image": "https://replicate.delivery/pbxt/MayZhLThspqLqRhirB8VEjqbEX5B0PWqjd9xe3PkTv2wLMcr/woman.png",
"max_sequence_length": 128,
"negative_prompt": "bad quality, worst quality, text, signature, watermark, extra limbs",
"num_outputs": 4,
"num_steps": 20,
"output_format": "webp",
"output_quality": 80,
"prompt": "a woman holding sign with glowing green text \"PuLID for FLUX\"",
"start_step": 4,
"true_cfg": 1,
"width": 896
},
"logs": "Using seeds: [3902735353, 3906845023, 3960091009, 3285723470]\nGenerating 'a woman holding sign with glowing green text \"PuLID for FLUX\"' with seeds [3902735353, 3906845023, 3960091009, 3285723470]\nDenoising time: 32.90 seconds\nDecoding time: 0.69 seconds\nTotal generate_image time: 39.42 seconds\nImage 1 generated with seed: 3902735353\nImage 2 generated with seed: 3906845023\nImage 3 generated with seed: 3960091009\nImage 4 generated with seed: 3285723470\nTotal prediction time: 39.72 seconds",
"output": [
"https://replicate.delivery/yhqm/QVmFonkKOW6BGFpwXs0IBBPej7dQIAraR4qcN7RUTQ31dbKKA/output_1.webp",
"https://replicate.delivery/yhqm/3KwUWUho1ZYlE9b7NfWW01O1QGz35ySyuJIcawIyM2h1dbKKA/output_2.webp",
"https://replicate.delivery/yhqm/vZdySqlit06dENDmsSax5TYSlqIMEGOMDQZmKrwLfTg1dbKKA/output_3.webp",
"https://replicate.delivery/yhqm/SuPGFeAD4gysaqUOtFaIdrqqwJFhfafAtxqsjTVVpKYW3tpoA/output_4.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-03T14:29:01.621Z",
"started_at": "2025-03-03T14:29:23.841552Z",
"completed_at": "2025-03-03T14:30:03.900633Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zm4dca866nrj20cnbhmsy5bzbr/cancel",
"get": "https://api.replicate.com/v1/predictions/zm4dca866nrj20cnbhmsy5bzbr",
"stream": "https://stream.replicate.com/v1/files/yswh-3kvtmf7hllngrtvsj3qjepsxynwdwzsejzodqdzpioojmtci3i2a",
"web": "https://replicate.com/p/zm4dca866nrj20cnbhmsy5bzbr"
},
"metrics": {
"predict_time": 40.05908108,
"total_time": 62.279633
}
}



