Saltar al cuntegna

Wan v2.6 Image to Image

Integrar

ID dal model wan/v2.6/image-to-image
# 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/wan/v2.6/image-to-image?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,03 30 credits API Lantschar sin questa pagina

Obtegna ina clav API
Alibaba · 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

Instrucziuns per la generaziun da maletgs en chinais u englais, fin a 2000 caracters. Exempel: 'Generate an image using the style of image 1 and background of image 2'.

•obligatori image_urls
Trametta in datoteca u

Furnir 1–3 maletgs da referenza per l'elavuraziun en format JPEG, JPG, PNG (senza alpha), BMP u WEBP. Mintga datoteca sto esser pli pitschna che 10MB, cun ladezza ed autezza tranter 384–5000px. Far referenza ad els en il prompt sco 'image 1', 'image 2' ed 'image 3', tenor l'urden furnì.

image_size standard square_hd

Definir las dimensiuns da l'output entaifer in dumber total da pixels da 768*768 fin 1280*1280. Tscherner in preset sco 'square_hd', 'landscape_16_9' u 'portrait_9_16', u inditgar dimensiuns exactas cun ImageSize(width=1280, height=720).

num_images standard 1

Dumber da maletgs per la generaziun, da 1 fin 4.

Avanzà negative_prompt · seed · enable_prompt_expansion · enable_safety_checker
standard

Cuntengut da excluir dal maletg final, limità a 500 caracters.

Seed casual che megliera la consistenza cura ch'el vegn reutilisà, e sustegna la reproducibilitad cun valurs da 0 fin 2147483647.

POST /run/wan/v2.6/image-to-image?wait=20 calculaziun → $0,03
# 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/wan/v2.6/image-to-image?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 Wan v2.6 Image to Image

Model image-to-image che prenda in `prompt` da fin a 2000 caracters en chinais u englais e 1 a 3 maletgs da referenza en `image_urls`. Far referenza ad els sco image 1, image 2 ed image 3 en il prompt, per exempel per cumbinar in stil cun in auter fund. Sis predefiniziuns `image_size` èn disponiblas, e `num_images` è 1-4. `negative_prompt` opzional ed extensiun dal prompt.

Parameters

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

NumTip StandardPermess Descripziun
promptobligatori
Tipstring
Instrucziuns per la generaziun da maletgs en chinais u englais, fin a 2000 caracters. Exempel: 'Generate an image using the style of image 1 and background of image 2'.
image_urlsobligatori images
Tipurl[] · image
Furnir 1–3 maletgs da referenza per l'elavuraziun en format JPEG, JPG, PNG (senza alpha), BMP u WEBP. Mintga datoteca sto esser pli pitschna che 10MB, cun ladezza ed autezza tranter 384–5000px. Far referenza ad els en il prompt sco 'image 1', 'image 2' ed 'image 3', tenor l'urden furnì.
negative_promptopziunal
Tipstring | null
Standard
Cuntengut da excluir dal maletg final, limità a 500 caracters.
image_sizeopziunal
Tipobject
Standardsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Definir las dimensiuns da l'output entaifer in dumber total da pixels da 768*768 fin 1280*1280. Tscherner in preset sco 'square_hd', 'landscape_16_9' u 'portrait_9_16', u inditgar dimensiuns exactas cun ImageSize(width=1280, height=720).
num_imagesopziunal num_outputs
Tipinteger
Standard1
1 – 4
Dumber da maletgs per la generaziun, da 1 fin 4.
enable_prompt_expansionopziunal
Tipboolean
Standardtrue
Activar l'optimisaziun LLM dals prompts cun custs da 3–4 secundas d'elavuraziun supplementaras. Prompts simpels profitan da resultats considerablamain meglers.
seedopziunal
Tipinteger | null
Seed casual che megliera la consistenza cura ch'el vegn reutilisà, e sustegna la reproducibilitad cun valurs da 0 fin 2147483647.
enable_safety_checkeropziunal
Tipboolean
Standardtrue
Moderaziun da l'input e l'output, applitgada a mintga dumonda, nun che il conto saja autorisà da la deactivar e l'opziun saja deactivada.
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": "wan/v2.6/image-to-image",
  "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": 30,
    "usd": "0.03",
    "charged": 30,
    "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
      }
    ],
    "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}Maletgs d'output en format PNG.
seed
integerValur seed utilisada durant la generaziun.

Dapli models: Modificaziun da maletgs

Per agents AI: questa pagina sco Markdown è disponibla sut https://doitong.com/rm/developers/models/wan/v2.6/image-to-image.md. Tut ils models e las guidas: https://doitong.com/developers/llms.txt