curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.7-image-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic portrait of a traveler in golden sunset light",
"size": "1024x1024",
"n": 1,
"seed": 12345
}
}
'
{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}Alibaba
Wan-2.7-Image-Pro
High-quality image generation with unified text-to-image and image editing support, including custom image sizes
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.7-image-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic portrait of a traveler in golden sunset light",
"size": "1024x1024",
"n": 1,
"seed": 12345
}
}
'
{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the response result through the unified Query Task Status endpoint.
Wan-2.7-Image-Pro
wan-2.7-image-pro is a high-quality image model for generation and editing.
It uses a unified request shape:
- If
input.image_urlsis omitted, the request is handled as text-to-image - If
input.image_urlsis provided, the request is handled as edit mode automatically
Available Model
- wan-2.7-image-pro - Unified text-to-image and image editing model
Size Parameter
input.size supports these preset values:
512x5121024x1024768x10241024x768576x10241024x576
1024x1024
Custom Size
For custom image sizes, you can passwidth and height as an object:
"size": {
"width": 1280,
"height": 720
}
Supported Parameters
prompt- Required promptsize- Output image size preset, or a custom{ width, height }objectn- Number of images,1-4seed- Optional random seedimage_urls- Reference images for editing,1-4images required. Order matters: reference them as image 1, image 2, image 3, image 4 in the prompt
How to Call
Use the unified submit endpoint:POST /api/generate/submit
Text-to-image example:
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan-2.7-image-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic portrait of a traveler in golden sunset light",
"size": "1024x1024",
"n": 1,
"seed": 12345
}
}'
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan-2.7-image-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Turn the scene into a snowy night with neon reflections",
"image_urls": ["https://example.com/reference1.jpg"],
"size": "1024x576",
"n": 2
}
}'
{
"model": "wan-2.7-image-pro",
"input": {
"prompt": "A dramatic fashion editorial scene",
"size": {
"width": 1280,
"height": 720
},
"n": 1
}
}
Authorizations
All API endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Wan-2.7-Image-Pro model identifier
Available options:
wan-2.7-image-pro Input parameters for generation. When image_urls is present, the request is routed to edit mode automatically.
Show child attributes
Show child attributes
Webhook callback URL for result notifications
Example:
"https://your-domain.com/callback"
