Wan 25 Preview

wan-25-preview-image-to-image

post

Wan 2.5 image-to-image model.

Header parameters
AuthorizationstringRequiredExample: sk-XIl7IWyv0rWebaWIlTJwGsLtfxH1bCh1lA4p6eXDtDaScfOF
Body
modelstringRequired

model is the model name

Example: wan-25-preview-image-to-image
promptstringRequired

The text description of how to edit the provided image.

Example: Give him a friend
image_urlsstring[] · min: 1 · max: 2Required

URLs of images to edit. For single-image editing, provide 1 URL. For multi-reference generation, provide up to 2 URLs. If more than 2 URLs are provided, only the first 2 will be used.

negative_promptstringOptional

Negative prompt to describe content to avoid. Max 500 characters.

image_sizestring · enumOptional

The size of the generated image. Width and height must be between 384 and 1440 pixels. Default value: square

Possible enum values: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9

Note: For custom image sizes, you can pass the width and height as an object:

"image_size": {
  "width": 1280,
  "height": 720
}
Default: squareExample: squarePossible values:
seedintegerOptional

Random seed for reproducibility. If None, a random seed is chosen.

Example: 1
enable_safety_checkerbooleanOptional

If set to true, the safety checker will be enabled. Default value: true

Default: false
ninteger · enumOptional

n is the number of images to generate, default value is 1.

Default: 1Example: 1Possible values:
output_formatstring · enumOptional

output_format indicate the output format, default value is url.

Default: urlExample: urlPossible values:
Responses
200Success
application/json
post
/v1/images/edits
POST /v1/images/edits HTTP/1.1
Host: image.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 296

{
  "model": "wan-25-preview-image-to-image",
  "prompt": "Give him a friend",
  "image_urls": [
    "https://resource.trustai.sg/image/generated%2Fonerouter_a146ee8a-1fe2-43ce-803a-fb1e7f3f6949.png"
  ],
  "negative_prompt": "",
  "image_size": "square",
  "seed": "1",
  "enable_safety_checker": false,
  "n": 1,
  "output_format": "url"
}
200Success
{
  "data": [
    {
      "url": "https://resource.onerouter.pro/image/generated%2Fonerouter_07f5c817-20ce-4b9e-ab44-c2d8d5e95fe1.png",
      "b64_json": "",
      "revised_prompt": ""
    }
  ],
  "created": 1761222404
}

Last updated