wan2.5-t2i-preview

circle-info

This documentation is valid for the following list of our models:

  • alibaba/wan2.5-t2i-preview

Model Overview

A text-to-image model capable of producing high-fidelity, visually accurate images.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guidearrow-up-right.

API Schema

post
Body
modelstring · enumRequiredPossible values:
promptstring · max: 2000Required

The text prompt describing the content, style, or composition of the image to be generated.

negative_promptstring · max: 500Optional

The description of elements to avoid in the generated image.

num_imagesinteger · min: 1 · max: 4Optional

The number of images to generate.

Default: 1
image_sizeany ofOptional

The size of the generated image.

Default: landscape_4_3
or
string · enumOptional

The size of the generated image.

Possible values:
enhance_promptbooleanOptional

Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment.

Default: true
watermarkbooleanOptional

Add an invisible watermark to the generated images.

Default: false
seedinteger · max: 2147483647Optional

The same seed and the same prompt given to the same version of the model will output the same image every time.

Responses
chevron-right
200Success
application/json
post
/v1/images/generations
200Success

Quick Example

Let's generate an image of the specified size using a simple prompt.

chevron-rightResponsehashtag

We obtained the following 1440x512 image by running this code example:

"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses."

Last updated

Was this helpful?