Skip to content

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

ParameterTypeRequiredDescription
modelstringYesVidu model name, such as vidu1.5 or vidu1.0
stylestringNoVideo style, either general or anime. Default: general
promptstringYesText prompt describing the scene, up to 1500 characters
durationintegerYesVideo duration. Supported values: 4 or 8
seedintegerNoRandom seed. Use 0 for random output or set a fixed value for repeatable results
aspect_ratiostringNoAspect ratio, one of 16:9, 9:16, or 1:1. Default: 16:9
resolutionstringYesOutput resolution. Options: 360p, 720p, 1080p (vidu1.0 only supports 360p)
movement_amplitudestringNoMotion intensity: auto, small, medium, or large
callback_urlstringNoOptional 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"
}