Saltar al cuntegna

PuLID

Integrar

ID dal model 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"

Questa dumonda: ≈$0,009 9 credits API Lantschar sin questa pagina

Obtegna ina clav API
ByteDance Modificaziun da maletgs Inputs da referenza #editing#customization#personalization

Generescha novas imagens che mantegnan il fatscha d’ina persuna da fotos da referenza, senza tunaziun per persuna

ByteDance · Maletg

Tes emprim resultat vegn qua

Construis ina dumonda sutvart e l'exequescha cun tia clav API. Outputs vegnan copiads en nossa memorisaziun, conservads per adina u 7 dis gratuitamain.

Construir ina dumonda

Ils controls vegnan generads dal schema dal model. Il code e ​​il pretsch s'actualiseschan durant che ti als midas.

•obligatori

Prompt utilisà per generar la fatscha.

image_size standard {"height":1024,"width...

Dimensiuns dal maletg generà.

num_images standard 1

Dumber da maletgs da producir.

•obligatori

Glista da maletgs da referenza da la fatscha; 4 maletgs èn ideals.

Avanzà negative_prompt · mode · guidance_scale · num_inference_steps · id_scale · seed · id_mix · enable_safety_checker
standard flaws in the eyes, fl...

Prompt negativ per la generaziun da la fatscha.

mode standard fidelity

Modus da generaziun.

standard 1.2

Scala per la guidanza.

standard 4

Dumber total da pass da far.

standard 0.8

Scala per ID.

Seed utilisà per ina generaziun casuala reproducibla.

POST /run/pulid?wait=20 calculaziun → $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"

Executar questa dumonda

Tia clav resta en quest browser: ella vegn tramessa mo al Doitong API e memorisada (localStorage) mo sch'ella scheccas Tiar a memoria. Obtegnair ina clav API

Davart PuLID

Prenda `reference_images` d'ina fatscha (circa 4 èn recumandads) ed in `prompt`, e crea maletgs che mantegnan l'identitad. `mode` è fidelity u extreme stil, `id_scale` va da 0 fin 5, e `id_mix` permetta da maschadar duas identitads. Fin a 8 maletgs pon vegnir generads, cun 1 fin 12 pass e `guidance_scale` da 1 fin 1.5.

Parameters

Invia u il num canonic u il num nativ, betg omaduas. Nums canonics

NumTip StandardPermess Descripziun
reference_imagesobligatori
Tipobject[]
Glista da maletgs da referenza da la fatscha; 4 maletgs èn ideals.
reference_images[].image_urlobligatori
Tipurl · image
URL dal maletg da referenza da la fatscha.
promptobligatori
Tipstring
Prompt utilisà per generar la fatscha.
negative_promptopziunal
Tipstring
Standardflaws 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
Prompt negativ per la generaziun da la fatscha.
num_imagesopziunal num_outputs
Tipinteger
Standard1
1 – 8
Dumber da maletgs da producir.
guidance_scaleopziunal
Tipnumber
Standard1.2
1 – 1,5
Scala per la guidanza.
num_inference_stepsopziunal
Tipinteger
Standard4
1 – 12
Dumber total da pass da far.
seedopziunal
Tipinteger | null
Seed utilisà per ina generaziun casuala reproducibla.
image_sizeopziunal
Tipobject
Standard{"height":1024,"width":768}
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Dimensiuns dal maletg generà.
id_scaleopziunal
Tipnumber
Standard0.8
≤ 5> 0
Scala per ID.
modeopziunal
Tipenum
Standardfidelity
fidelityextreme style
Modus da generaziun.
id_mixopziunal
Tipboolean
Standardfalse
Inditga, sch'ils dus maletgs ID duain vegnir maschadads. Activescha per maschadar; uschiglio deactivescha.
enable_safety_checkeropziunal
Tipboolean
Standardtrue
La controlla po vegnir schluccada cun definir false, premess che l'appelant saja autorisà.
obligatori Num canonic, er acceptà

Output

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"
  }
}
Tias datotecas, tia decisiunMintga outputs[].url è ina copia en nossa memorisaziun: conservada per adina (pajà per GB-mes) u 7 dis gratuitamain, tenor la configuraziun dal conto u ?storage=.
La medema structura per mintga modeltype, url, content_type, width, height e duration, tant per maletgs sco per video e audio. output è l'object da resultat dal model sez.
Champs da l'output
images
array of object {url, content_type, file_name, file_size, width, height}Maletgs generads, returnads sco glista.
seed
integerSem casual per reproducir ils resultats.

Per agents AI: questa pagina sco Markdown è disponibla sut https://doitong.com/rm/developers/models/pulid.md. Tut ils models e las guidas: https://doitong.com/developers/llms.txt