Skip to main content
POST
/
v1
/
veo
/
text-to-video
curl -N -X POST https://genaipro.vn/api/v1/veo/text-to-video \
  --header 'Authorization: Bearer <token>' \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cat playing with a ball in a garden",
    "aspect_ratio": "VIDEO_ASPECT_RATIO_LANDSCAPE",
    "number_of_videos": 2
  }'
event: video_generation_status
data: "starting"

event: video_generation_status
data: "processing"

event: video_generation_complete
data: [{"id":"abc123","prompt":"A cat playing with a ball in a garden","file_url":"https://example.com/video1.mp4","status":"completed","created_at":"2026-03-30T10:00:00+07:00"}]
Generate one or more videos from a text prompt. Response is streamed via Server-Sent Events (SSE).

Body Parameters

prompt
string
required
Text description of the video to generate
aspect_ratio
string
required
Video aspect ratio. Must be one of:
  • VIDEO_ASPECT_RATIO_LANDSCAPE — 16:9
  • VIDEO_ASPECT_RATIO_PORTRAIT — 9:16
number_of_videos
integer
required
Number of videos to generate (1–4)
curl -N -X POST https://genaipro.vn/api/v1/veo/text-to-video \
  --header 'Authorization: Bearer <token>' \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cat playing with a ball in a garden",
    "aspect_ratio": "VIDEO_ASPECT_RATIO_LANDSCAPE",
    "number_of_videos": 2
  }'

SSE Events

The response streams the following events:
EventDataDescription
video_generation_status"starting"Generation has started
video_generation_status"processing"Video is being processed
video_generation_completeArray of history objectsGeneration complete
errorError objectAn error occurred
event: video_generation_status
data: "starting"

event: video_generation_status
data: "processing"

event: video_generation_complete
data: [{"id":"abc123","prompt":"A cat playing with a ball in a garden","file_url":"https://example.com/video1.mp4","status":"completed","created_at":"2026-03-30T10:00:00+07:00"}]