跳转到内容

Wan 2.5 Text to Image

集成

模型 id wan-25-preview/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-25-preview/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"

此请求: $0.05 50 API 积分 在此页面运行

获取 API 密钥
Alibaba 文生图

Wan 2.5 文生图,支持中文和英文提示词,每次调用最多生成四张图像

在 Doitong 上制作

Doitong 社区使用 Wan 2.5 制作的公开作品。一键复用提示词。

显示的公开作品:2
Create a realistic cinematic UGC-style commercial video, exactly 30 seconds long. The entire scen... 视频

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...

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

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

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填

图像生成说明,最多 2000 个字符,使用中文或英文编写。

image_size 默认 square

生成图像的尺寸受总像素数 768×768 至 1440×1440 以及 1:4 至 4:1 的宽高比限制。可直接指定尺寸,也可选择命名预设,例如 'square' 或 'landscape_16_9'。

num_images 默认 1

图像生成数量,范围为 1 到 4。

高级 negative_prompt · seed · enable_prompt_expansion · enable_safety_checker

指定不需要内容的负面提示词,最多 500 个字符。

使生成结果可复现的种子。设置为 None 时会随机选择种子。

POST /run/wan-25-preview/text-to-image?wait=20 报价 → $0.05
# 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-25-preview/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"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Wan 2.5 Text to Image

根据最多 2000 个字符的中文或英文文本 `prompt` 生成图像。`num_images` 范围为 1 到 4,`image_size` 接受预设或明确尺寸,总像素范围为 768x768 至 1440x1440。默认开启提示词扩展,该功能使用 LLM 重写提示词。还支持 `negative_prompt` 和 `seed`。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
prompt必填
类型string
图像生成说明,最多 2000 个字符,使用中文或英文编写。
negative_prompt可选
类型string | null
指定不需要内容的负面提示词,最多 500 个字符。
num_images可选 num_outputs
类型integer
默认值1
1 – 4
图像生成数量,范围为 1 到 4。
image_size可选
类型object
默认值square
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
生成图像的尺寸受总像素数 768×768 至 1440×1440 以及 1:4 至 4:1 的宽高比限制。可直接指定尺寸,也可选择命名预设,例如 'square' 或 'landscape_16_9'。
enable_prompt_expansion可选
类型boolean
默认值true
基于 LLM 的提示词重写,用额外处理时间换取短提示词的更佳结果。
seed可选
类型integer | null
使生成结果可复现的种子。设置为 None 时会随机选择种子。
enable_safety_checker可选
类型boolean
默认值true
安全检查开关,关闭此设置需要账户授权。没有该授权时,无论设置如何,每个请求都会经过检查;true 启用检查器。
必填 规范名称,也可接受

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "wan-25-preview/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": 50,
    "usd": "0.05",
    "charged": 50,
    "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,
        "width": 1024,
        "height": 768
      }
    ],
    "seeds": [
      42
    ],
    "actual_prompt": "A lone samurai standing on the edge of a cliff at twilight, overlooking a vast valley shrouded in mist. The sky burns with deep orange and purple hues from the setting sun, casting long, dramatic shadows. The samurai’s silhouette glows against the horizon, with their sword reflecting a glint of fading light. The overall style is hyper-realistic, cinematic, and moody, with dramatic contrast and atmospheric depth."
  },
  "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"
  }
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
images
array of object {url, content_type, file_name, file_size, width, height}模型生成的图像。
seeds
array of integer用于生成各个图像的种子值。
actual_prompt
string | null启用重写时实际使用的提示词。

更多模型:文生图

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/wan-25-preview/text-to-image.md. 所有模型和指南: https://doitong.com/developers/llms.txt