Neidio i'r cynnwys

Wan · v2.7 · Text to Image

Integreiddio

ID y model wan/v2.7/text-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.7/text-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"
  }'

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

Y cais hwn: $0.03 30 o gredydau API Ei redeg ar y dudalen hon

Cael allwedd API
Alibaba Testun i Ddelwedd #wan#text-to-image#image-generation

Testun-i-ddelwedd Wan 2.7 safonol gyda hyd at bum delwedd fesul cais a fformat allbwn dewisadwy

Alibaba · Delwedd

Mae eich canlyniad cyntaf yn mynd yma

Adeiladwch gais isod a'i redeg gyda'ch allwedd API. Mae allbynnau'n cael eu copïo i'n storio, wedi'u cadw am byth neu am 7 diwrnod am ddim.

Adeiladu cais

Cynhyrchir rheolyddion o sgema'r model. Mae'r cod a'r pris yn diweddaru wrth i chi eu newid.

•gofynnol 88 / 2000

Disgrifiad o'r allbwn arfaethedig, wedi'i ysgrifennu yn Tsieinëeg neu Saesneg.

image_size rhagosodedig square_hd

Dimensiynau'r allbwn delwedd.

num_images rhagosodedig 1

Nifer y delweddau a gynhyrchir, o 1 i 5.

Uwch negative_prompt · output_format · seed · enable_safety_checker
0 / 500

Cynnwys i'w eithrio o'r ddelwedd sy'n deillio, wedi'i gyfyngu i 500 nod.

output_format rhagosodedig jpeg

Fformat ffeil ar gyfer delweddau allbwn.

Hadau ar hap sy'n galluogi canlyniadau atgynhyrchadwy, yn amrywio o 0 i 2147483647.

POST /run/wan/v2.7/text-to-image?wait=20 dyfynbris → $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.7/text-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"
  }'

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

Rhedeg y cais hwn

Mae'ch allwedd yn aros yn y porwr hwn: caiff ei hanfon at Doitong API yn unig a'i chadw (localStorage) dim ond os ticiwch Cofio. Cael allwedd API

Ynglŷn â Wan · v2.7 · Text to Image

Trawsnewidia `prompt` testun hyd at 2000 o nodau, yn Tsieinëeg neu Saesneg, yn ddelweddau. Dewiswch un o chwe rhagosodiad `image_size`, cynhyrchwch 1 i 5 delwedd gyda `num_images`, a dewiswch jpeg, png neu webp gyda `output_format`. Cefnogir `negative_prompt` hyd at 500 o nodau a `seed`.

Paramedrau

Anfonwch naill ai'r enw canonaidd neu'r enw brodorol, nid y ddau. Enwau canonaidd

EnwMath RhagosodedigCaniateir Disgrifiad
promptgofynnol
Mathstring
≤ 2,000 nod
Disgrifiad o'r allbwn arfaethedig, wedi'i ysgrifennu yn Tsieinëeg neu Saesneg.
negative_promptdewisol
Mathstring | null
Rhagosodedig
≤ 500 nod
Cynnwys i'w eithrio o'r ddelwedd sy'n deillio, wedi'i gyfyngu i 500 nod.
image_sizedewisol
Mathobject
Rhagosodedigsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Dimensiynau'r allbwn delwedd.
num_imagesdewisol num_outputs
Mathinteger
Rhagosodedig1
1 – 5
Nifer y delweddau a gynhyrchir, o 1 i 5.
seeddewisol
Mathinteger | null
Hadau ar hap sy'n galluogi canlyniadau atgynhyrchadwy, yn amrywio o 0 i 2147483647.
enable_safety_checkerdewisol
Mathboolean
Rhagosodedigtrue
Cymedroli'r mewnbwn a'r allbwn, wedi'i orfodi ar bob cais oni bai bod yr account wedi'i awdurdodi i'w analluogi a bod yr opsiwn wedi'i ddiffodd.
output_formatdewisol
Mathenum
Rhagosodedigjpeg
jpegpngwebp
Fformat ffeil ar gyfer delweddau allbwn.
gofynnol Enw canonaidd, derbyniol hefyd

Allbwn

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "wan/v2.7/text-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"
  },
  "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
      }
    ],
    "generated_text": "string",
    "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"
  }
}
Eich ffeiliau, eich dewisMae pob outputs[].url yn gopi ar ein storio: wedi'i gadw am byth (telir fesul GB-mis) neu am 7 diwrnod am ddim, yn ôl gosodiad eich cyfrif neu ?storage=.
Yr un siâp ar bob modeltype, url, content_type, width, height a duration, ar gyfer delweddau, fideo a sain fel ei gilydd. Gwrthrych canlyniad y model ei hun yw output.
Meysydd yr allbwn
images
array of object {url, content_type, file_name, file_size}Delweddau a gynhyrchir.
generated_text
string | nullTestun dewisol a gynhyrchir gan y model ac a gynhwysir yn ei ymateb.
seed
integerGwerth hedyn a gymhwysir wrth gynhyrchu.

Mwy o fodelau: Testun i Ddelwedd

Ar gyfer asiantau AI: mae'r dudalen hon fel Markdown ar gael yn https://doitong.com/cy/developers/models/wan/v2.7/text-to-image.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt