Saltar al cuntegna

Phota

Integrar

ID dal model phota/edit
# 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/phota/edit?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",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# 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,09 90 credits API Lantschar sin questa pagina

Obtegna ina clav API
Open model Modificaziun da maletgs Output 4Kfin a 4K #edit#personalization#typography#phota

Modificaziun da fotografias che mantegna l'identitad, da 1 fin 10 maletgs d'input, cun profils trenads opziunals

Open model · 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 88 / 8000

Prompt per la generaziun dal maletg che po cuntegnair referenzas a profilst sco [[profile_id_1]] e [[profile_id_2]] sper ina descripziun da quai che duai vegnir creà.

•obligatori image_urls
Trametta in datoteca u

Maletgs per editar, furnids sco URLs u data URIs Base64; entradas suenter las emprimas 10 vegnan ignoradas. Furnescha almain in maletg u utilisescha l'endpoint `/` empè da quai per ina generaziun mo ord text.

resolution standard 1K

Resoluziun da duvrar per il maletg generà.

aspect_ratio standard auto

Relaziun larghezza-altezza dal maletg d'output.

num_images standard 1

Dumber da maletgs da producir.

Avanzà output_format · base_model · enable_safety_checker · profile_ids
output_format standard jpeg

Format da datoteca dal maletg final.

base_model standard nb2

Selecziun dal model da renderisaziun, cun `4K` disponibel mo tras `nb2`. Ils identity layers vegnan surpostads sur mintga model da basa tschernì, uschia che mintga tscherna è cumpatibla cun profilst trenads.

Selecziun da profilst per la generaziun dal maletg, furnida sco glista dad IDs; il prompt po marcar quests profilst cun @Profile1, @Profile2, e.u.v.

POST /run/phota/edit?wait=20 calculaziun → $0,09
# 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/phota/edit?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",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# 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 Phota

Modifitgescha fotografias existentas a partir d'in `prompt` da fin a 8000 caracters e da `image_urls`, che sto cuntegnair almain in maletg; maximalmain 10 vegnan utilisads. Transmetta `profile_ids` per mantegnair persunas specificas renconuschiblas. `base_model` po esser nb2, qwen-image-2, flux-2 u seedream-5-pro, e l'output 4K funcziuna mo cun nb2. Il resultat cuntegna 1 fin 4 maletgs en JPEG u PNG.

Parameters

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

NumTip StandardPermess Descripziun
promptobligatori
Tipstring
≤ 8 000 caracters
Prompt per la generaziun dal maletg che po cuntegnair referenzas a profilst sco [[profile_id_1]] e [[profile_id_2]] sper ina descripziun da quai che duai vegnir creà.
num_imagesopziunal num_outputs
Tipinteger
Standard1
1 – 4
Dumber da maletgs da producir.
profile_idsopziunal
Tipstring[]
Selecziun da profilst per la generaziun dal maletg, furnida sco glista dad IDs; il prompt po marcar quests profilst cun @Profile1, @Profile2, e.u.v.
output_formatopziunal
Tipenum
Standardjpeg
jpegpng
Format da datoteca dal maletg final.
resolutionopziunal
Tipenum
Standard1K
1K4K
Resoluziun da duvrar per il maletg generà.
aspect_ratioopziunal
Tipenum
Standardauto
auto1:116:94:33:49:16
Relaziun larghezza-altezza dal maletg d'output.
base_modelopziunal
Tipenum
Standardnb2
nb2qwen-image-2flux-2seedream-5-pro
Selecziun dal model da renderisaziun, cun `4K` disponibel mo tras `nb2`. Ils identity layers vegnan surpostads sur mintga model da basa tschernì, uschia che mintga tscherna è cumpatibla cun profilst trenads.
image_urlsobligatori images
Tipurl[] · image
Maletgs per editar, furnids sco URLs u data URIs Base64; entradas suenter las emprimas 10 vegnan ignoradas. Furnescha almain in maletg u utilisescha l'endpoint `/` empè da quai per ina generaziun mo ord text.
enable_safety_checkeropziunal
Tipboolean
Standardtrue
La controlla po vegnir schluccada cun definir false, premess che l'appelant saja autorisà.
obligatori Num canonic, er acceptà

Ils parameters da datotecas acceptan ina URL publica https://, ina URI data: fin a 10 MB u il file_url d'ina chargiada. Datotecas

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "phota/edit",
  "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": 90,
    "usd": "0.09",
    "charged": 90,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "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
      }
    ]
  },
  "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}URL che mussa sin il maletg edità.

Dapli models: Modificaziun da maletgs

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