Op den Inhalt sprangen

Phota

Integréieren

Modell-ID 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"

Dës Ufro: 0,09 $ 90 API-Kreditter Op dëser Säit ausféieren

API-Schlëssel kréien
Open model Bildbearbechtung 4K-Outputbis zu 4K #edit#personalization#typography#phota

Identitéitsbehalend Fotobearbechtung vun 1 bis 10 Inputbiller, mat optionalen trainéierte Profiler

Open model · Bild

Äin éischt Resultat kënnt hei hin

Baut hei drënner eng Ufro a féiert se mat Ärem API-Schlëssel aus. Output gëtt an eis Späicherung kopéiert, fir ëmmer oder 7 Deeg gratis gespäichert.

Eng Ufro erstellen

D'Kontrolle ginn aus dem Modellschema generéiert. De Code an de Präis aktualiséiere sech, wann s du se ännerst.

•obligatoresch 88 / 8000

Bildgeneratiouns-Prompt, dee Profilreferenze wéi [[profile_id_1]] an [[profile_id_2]] nieft enger Beschreiwung vum gewënschte Resultat enthalen kann.

•obligatoresch image_urls
Fichier erofzéien, oder

Biller fir d'Ännerung, als URLs oder Base64-Daten-URIs geliwwert; Entréen iwwer déi éischt 10 ginn ignoréiert. Gitt op d'mannst ee Bild un, oder benotzt amplaz den `/`-Endpunkt fir d'Generatioun nëmmen aus Text.

resolution Standard 1K

Opléisung fir dat generéiert Bild.

aspect_ratio Standard auto

Verhältnis vu Breet zu Héicht vum Output-Bild.

num_images Standard 1

Unzuel vun de Biller, déi erstallt ginn.

Erweidert output_format · base_model · enable_safety_checker · profile_ids
output_format Standard jpeg

Dateiformat vum resultéierende Bild.

base_model Standard nb2

Auswiel vum Render-Modell, mat `4K`, dat nëmmen iwwer `nb2` disponibel ass. Identitéitschichte leien iwwer all ausgewielte Basismodell a maachen all Choix mat trainéierte Profiller kompatibel.

Profilauswiel fir d'Bildgeneratioun, als Lëscht vun IDs geliwwert; de Prompt kann dës Profiller mat @Profile1, @Profile2 a sou weider markéieren.

POST /run/phota/edit?wait=20 Präis → 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"

Dës Ufro ausféieren

Äre Schlëssel bleift an dësem Browser: e gëtt nëmmen un d'Doitong API geschéckt an nëmme gespäichert (localStorage), wann s du „Erënneren“ aktivéiers. En API-Schlëssel kréien

Iwwer Phota

Bearbecht bestehend Fotoe mat engem `prompt` vu bis zu 8000 Zeechen an `image_urls`, déi mindestens ee Bild brauchen; méi wéi 10 gi net benotzt. Gitt `profile_ids` un, fir bestëmmte Persounen erkennbar ze halen. `base_model` kann nb2, qwen-image-2, flux-2 oder seedream-5-pro sinn; 4K-Ausgab funktionéiert nëmme mat nb2. Gëtt 1 bis 4 Biller als JPEG oder PNG zeréck.

Parameteren

Schéck entweder den kanoneschen Numm oder den natierlechen Numm, net béid. Kanonesch Nimm

NummTyp StandardErlaabt Beschreiwung
promptobligatoresch
Typstring
≤ 8.000 Zeechen
Bildgeneratiouns-Prompt, dee Profilreferenze wéi [[profile_id_1]] an [[profile_id_2]] nieft enger Beschreiwung vum gewënschte Resultat enthalen kann.
num_imagesoptional num_outputs
Typinteger
Standard1
1 – 4
Unzuel vun de Biller, déi erstallt ginn.
profile_idsoptional
Typstring[]
Profilauswiel fir d'Bildgeneratioun, als Lëscht vun IDs geliwwert; de Prompt kann dës Profiller mat @Profile1, @Profile2 a sou weider markéieren.
output_formatoptional
Typenum
Standardjpeg
jpegpng
Dateiformat vum resultéierende Bild.
resolutionoptional
Typenum
Standard1K
1K4K
Opléisung fir dat generéiert Bild.
aspect_ratiooptional
Typenum
Standardauto
auto1:116:94:33:49:16
Verhältnis vu Breet zu Héicht vum Output-Bild.
base_modeloptional
Typenum
Standardnb2
nb2qwen-image-2flux-2seedream-5-pro
Auswiel vum Render-Modell, mat `4K`, dat nëmmen iwwer `nb2` disponibel ass. Identitéitschichte leien iwwer all ausgewielte Basismodell a maachen all Choix mat trainéierte Profiller kompatibel.
image_urlsobligatoresch images
Typurl[] · image
Biller fir d'Ännerung, als URLs oder Base64-Daten-URIs geliwwert; Entréen iwwer déi éischt 10 ginn ignoréiert. Gitt op d'mannst ee Bild un, oder benotzt amplaz den `/`-Endpunkt fir d'Generatioun nëmmen aus Text.
enable_safety_checkeroptional
Typboolean
Standardtrue
D'Kontroll kann duerch false gelackert ginn, wann den Uruffer autoriséiert ass.
obligatoresch Kanoneschen Numm, och akzeptéiert

Fichierparameter akzeptéieren eng ëffentlech https:// URL, eng data: URI bis zu 10 MB oder de file_url vun engem Upload. Fichieren

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"
  }
}
Är Fichieren, Är WielAll outputs[].url ass eng Kopie an eiser Späicherung: fir ëmmer gespäichert (bezuelbar pro GB-Mount) oder 7 Deeg gratis, jee no Ärer Kontastellung oder ?storage=.
D'selwecht Struktur bei all Modelltype, url, content_type, width, height an duration, fir Biller, Video an Audio gläichermoossen. output ass dem Modell säin eegent Resultatobjet.
Output-Felder
images
array of object {url, content_type, file_name, file_size, width, height}URL op dat geännert Bild.

Méi Modeller: Bildbearbechtung

Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/phota/edit.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt