Skip to content

Wan · v2.2 5b · Text to Image

Integrate

Model id wan/v2.2-5b/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.2-5b/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"

This request: $0.016 16 API credits Run it on this page

Get API key
Alibaba Text to Image

Compact 5B text-to-image model with six preset sizes, PNG or JPEG output and adjustable sampling steps

Made on Doitong

Public works made with Wan v22 by the Doitong community. Reuse a prompt in one click.

Public works shown: 2
Create a realistic cinematic UGC-style commercial video, exactly 30 seconds long. The entire scen... Video

Create a realistic cinematic UGC-style commercial video, exactly 30 seconds long. The entire scene takes place inside a modern passenger airplane during a daytime flight. Natural smartphone-like cinematography, realistic airplane cabin, authentic passengers, natural lighting, realistic skin...

Реалистичная бытовая сцена в советской одесской квартире зимним вечером. Женщина находится на кух... Video

Реалистичная бытовая сцена в советской одесской квартире зимним вечером. Женщина находится на кухне, мужчина — в комнате и прихожей. Атмосфера обычной советской семьи перед приходом гостей. Голоса: все персонажи говорят по-русски с естественным, выразительным одесским говором. Характерная...

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Text instructions that guide the generated image.

image_size default square_hd

Dimensions of the generated image.

Advanced negative_prompt · image_format · num_inference_steps · guidance_scale · shift · seed · enable_safety_checker · enable_output_safety_checker · enable_prompt_expansion
default

Negative prompt applied when generating a video.

image_format default jpeg

File format for the resulting image.

default 40

Sampling step count, trading longer processing time for better quality as the count increases.

default 3.5

Classifier-free guidance strength, trading possible quality loss for closer prompt matching as the scale increases.

default 2

Image shift setting, with an allowed range of 1.0–10.0.

Seed that makes generation reproducible. Setting it to None selects a seed randomly.

POST /run/wan/v2.2-5b/text-to-image?wait=20 quote → $0.016
# 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.2-5b/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"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Wan · v2.2 5b · Text to Image

Generates a still image from a text `prompt`. Pick an `image_size` preset such as square_hd, portrait_16_9 or landscape_4_3, and choose png or jpeg with `image_format`. Sampling is tunable with `num_inference_steps` (2 to 50), `guidance_scale` (1 to 10) and `shift`, and a `negative_prompt` and optional prompt expansion are available.

Parameters

NameType DefaultAllowed Description
promptrequired
Typestring
Text instructions that guide the generated image.
negative_promptoptional
Typestring
Default
Negative prompt applied when generating a video.
seedoptional
Typeinteger | null
Seed that makes generation reproducible. Setting it to None selects a seed randomly.
num_inference_stepsoptional
Typeinteger
Default40
2 – 50
Sampling step count, trading longer processing time for better quality as the count increases.
enable_safety_checkeroptional
Typeboolean
Defaultfalse
Input safety screening before processing, which only authorized accounts may turn off. Requests lacking authorization are always screened; otherwise, true enables screening.
enable_output_safety_checkeroptional
Typeboolean
Defaultfalse
Controls safety screening of the generated video; setting true enables a check after generation.
enable_prompt_expansionoptional
Typeboolean
Defaultfalse
Allow a large language model to enrich the prompt with details. Enabling this expansion leaves the prompt's meaning unchanged.
guidance_scaleoptional
Typenumber
Default3.5
1 – 10
Classifier-free guidance strength, trading possible quality loss for closer prompt matching as the scale increases.
shiftoptional
Typenumber
Default2
1 – 10
Image shift setting, with an allowed range of 1.0–10.0.
image_sizeoptional
Typeobject
Defaultsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Dimensions of the generated image.
image_formatoptional
Typeenum
Defaultjpeg
pngjpeg
File format for the resulting image.
required

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "wan/v2.2-5b/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": 16,
    "usd": "0.016",
    "charged": 16,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "image": {
      "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"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
image
object {url, content_type, file_name, file_size}Image file produced by generation.
seed
integerSeed value applied during generation.

More models: Text to Image

For AI agents: this page as Markdown is at https://doitong.com/developers/models/wan/v2.2-5b/text-to-image.md. All models and guides: https://doitong.com/developers/llms.txt