Create a Vidu Text-to-Video Task
Brief: Create a new text-to-video generation task using the Vidu model.
Overview
- Method:
POST - Path:
/task/vidu/text2video - Content-Type:
application/json - Tags: Video Models (Video) / Vidu Video
Authentication
- Header:
Authorization: Bearer <token>
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Vidu model name, such as vidu1.5 or vidu1.0 |
| style | string | No | Video style, either general or anime. Default: general |
| prompt | string | Yes | Text prompt describing the scene, up to 1500 characters |
| duration | integer | Yes | Video duration. Supported values: 4 or 8 |
| seed | integer | No | Random seed. Use 0 for random output or set a fixed value for repeatable results |
| aspect_ratio | string | No | Aspect ratio, one of 16:9, 9:16, or 1:1. Default: 16:9 |
| resolution | string | Yes | Output resolution. Options: 360p, 720p, 1080p (vidu1.0 only supports 360p) |
| movement_amplitude | string | No | Motion intensity: auto, small, medium, or large |
| callback_url | string | No | Optional notification callback URL for status updates |
Request Examples
curl
bash
curl -X POST "https://api.gpt.ge/task/vidu/text2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"model":"vidu1.5",
"style":"general",
"prompt":"A calm sunset over a mountain lake with gentle waves.",
"duration":4,
"resolution":"720p",
"aspect_ratio":"16:9"
}'JavaScript (fetch)
javascript
fetch('https://api.gpt.ge/task/vidu/text2video', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
},
body: JSON.stringify({
model: 'vidu1.5',
style: 'general',
prompt: 'A calm sunset over a mountain lake with gentle waves.',
duration: 4,
resolution: '720p',
aspect_ratio: '16:9'
})
}).then(res => res.json()).then(console.log);Python (requests)
python
import requests
response = requests.post(
'https://api.gpt.ge/task/vidu/text2video',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-xxxx'
},
json={
'model': 'vidu1.5',
'style': 'general',
'prompt': 'A calm sunset over a mountain lake with gentle waves.',
'duration': 4,
'resolution': '720p',
'aspect_ratio': '16:9'
}
)
print(response.json())Response Example (200)
json
{
"task_id": "SPC6X7SLGD0HCJMWFQ3RTLRUNZZV4I1M",
"state": "created",
"model": "vidu1.5",
"style": "general",
"prompt": "A calm sunset over a mountain lake with gentle waves.",
"duration": 4,
"seed": 1234,
"aspect_ratio": "16:9",
"resolution": "720p",
"movement_amplitude": "auto",
"created_at": "2025-01-01T15:41:31.968916Z"
}