WAN 2.7 Image
Overview
WAN 2.7 Image is an image generation model that supports both text-to-image and image-to-image workflows.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The input prompt (e.g., “a portrait in cinematic lighting”) |
| image_urls | array | Conditional | ["https://cdn.pixwithapi.online/example.jpg"]. Provide 1-4 images for image-to-image mode. Omit for text-to-image mode. |
| model_id | string | Yes | 0-45 |
| options | object | Yes | Configuration options for the task |
| options.prompt_optimization | boolean | Yes | If true, all prompt words will be automatically translated into English. |
| options.resolution | string | Yes | Output resolution. Valid values: '1K', '2K'. Default: '1K'. |
Example Request - Text-to-Image
{
"prompt": "a portrait in cinematic lighting",
"model_id": "0-45",
"options": {
"prompt_optimization": true,
"resolution": "2K"
}
}Example Request - Image-to-Image
{
"prompt": "keep the character, switch to watercolor style",
"image_urls": [
"https://cdn.pixwithapi.online/example-1.jpg",
"https://cdn.pixwithapi.online/example-2.jpg",
"https://cdn.pixwithapi.online/example-3.jpg",
"https://cdn.pixwithapi.online/example-4.jpg"
],
"model_id": "0-45",
"options": {
"prompt_optimization": true,
"resolution": "1K"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages |
| data | object | |
| data.task_id | string | |
| data.estimated_time | int | Estimated time in seconds |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 18
}
}Constraints
- Image-to-image mode supports up to 4 input images.
- 4K is not available for this variant.
Last updated on