curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.7-text-to-video",
"prompt": "A small kitten running under the moonlight",
"aspect_ratio": "16:9",
"duration": 5
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "wan2.7-text-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 120
},
"type": "video",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 5
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: wan2.7-text-to-video",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Wan2.7 Text to Video
- WAN2.7 (wan2.7-text-to-video) model supports text-to-video generation, producing fluent videos from textual prompts
- Multi-shot narrative: Control shot structure via natural language in
prompt- Single shot: state “generate a single-shot video” in the prompt
- Multi shot: use “generate a multi-shot video” or timestamped shot lists (e.g. “Shot 1 [0-3s] wide angle: rainy night street”)
- Default: when unspecified, the model interprets
promptcontent on its own
- Audio handling:
- With
audio_urls: the model uses the provided audio as the driving source - Without
audio_urls: the model auto-generates background music or sound effects matching the visual content
- With
- Asynchronous processing mode, use the returned task ID to query status
- Generated video links are valid for 7 days, please save them promptly
- In rare cases, generated results are delivered via official original links, which may expire in less than 7 days. Download and save them promptly.
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.7-text-to-video",
"prompt": "A small kitten running under the moonlight",
"aspect_ratio": "16:9",
"duration": 5
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "wan2.7-text-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 120
},
"type": "video",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 5
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: wan2.7-text-to-video",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Authorizations
All APIs require Bearer Token authentication
Get your API Key:
Visit the API Key management page to obtain your API Key
Add to request headers:
Authorization: Bearer YOUR_API_KEY
Body
Text prompt for video generation. Supports both Chinese and English; each character/letter counts as 1, with overflow auto-truncated. Maximum length: 5000 characters
Multi-shot narrative: Control shot structure via natural language
- Single shot: state "generate a single-shot video" in the prompt
- Multi shot: use "generate a multi-shot video" or timestamped shot lists (e.g. "Shot 1 [0-3s]")
5000"A small kitten running under the moonlight"
Driving audio URL array (optional). Currently supports only 1 element
Behavior:
- Provided: the model uses this audio as the driving source
- Omitted: the model auto-generates background music or sound effects matching the visual content
Format requirements:
- Supported formats:
wav,mp3 - Duration range:
2 ~ 30seconds - File size: up to
15MB
Truncation handling:
- If audio length exceeds
duration, the first N seconds are extracted and the rest discarded - If audio length is shorter than the video duration, the remaining portion is silent. For example: if audio is 3s and video duration is 5s, the first 3s have sound and the last 2s are silent
1 element["https://example.com/audio.mp3"]
Whether to enable intelligent prompt rewriting. When enabled, a large model will optimize the prompt, which significantly improves results for simple or insufficiently descriptive prompts.
Note: Default is false. Omitting the field or sending false will not trigger rewriting; explicitly send true to enable.
false
HTTPS callback URL for task completion
Callback Timing:
- Triggered when task is completed, failed, or cancelled
- Sent after billing confirmation
Security Restrictions:
- Only HTTPS protocol is supported
- Callbacks to internal IP addresses are prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
- URL length must not exceed
2048characters
Callback Mechanism:
- Timeout:
10seconds - Up to
3retries after failure (retries at1/2/4seconds after failure) - Callback response format is consistent with the task query API response
- 2xx status codes are considered successful, other status codes trigger retries
"https://your-domain.com/webhooks/video-task-completed"
Response
Video task created successfully