Text to Video API

Transform text descriptions into high-quality videos using AI

Authentication

All API requests require authentication using your API key. You can find your API key in your dashboard.

curl --request POST \
  --url "https://veo2api.com/api/index.php" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "prompt": "Your text description"
  }'

Endpoints

Generate Video

Create a new video from a text description.

POST https://veo2api.com/api/index.php

Request Body

{
  "prompt": "A stylish woman walks down a Tokyo street",
  "aspect_ratio": "16:9",
  "resolution": "720p",
  "duration": "5",
  "camera_fixed": false
}

Parameters

Parameter Type Required Description
prompt string Yes Text description of the video to generate
aspect_ratio string No Video aspect ratio: "16:9", "9:16", "1:1", "4:3" (default: "16:9")
resolution string No Video resolution: "720p", "480p" (default: "720p")
duration string No Video duration: "5", "10" seconds (default: "5")
camera_fixed boolean No Whether to fix camera position (default: false)

Response

{
  "request_id": "f2021ee8-e30c-4d39-b1f8-9d21774e548c",
  "status": "processing",
  "progress": 25
}

Status Values

  • processing - Video is being generated
  • completed - Video generation is complete
  • failed - Video generation failed

Check Generation Status

Check the status of a video generation request.

GET https://veo2api.com/api/index.php/status?request_id=REQUEST_ID

Response

{
  "status": "completed",
  "progress": 100
}

Get Generation Result

Get the final video URL once generation is complete.

GET https://veo2api.com/api/index.php?request_id=REQUEST_ID

Response

{
  "video": {
    "url": "https://v2.fal.media/files/video_output.mp4"
  }
}

Complete Example

Generate and retrieve a video

# 1. Generate the video
curl --request POST \
  --url "https://veo2api.com/api/index.php" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{
    "prompt": "A stylish woman walks down a Tokyo street",
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration": "5",
    "camera_fixed": false
  }'

# 2. Check the status
curl --request GET \
  --url "https://veo2api.com/api/index.php/status?request_id=YOUR_REQUEST_ID" \
  --header "Authorization: Bearer YOUR_API_KEY"

# 3. Get the result
curl --request GET \
  --url "https://veo2api.com/api/index.php?request_id=YOUR_REQUEST_ID" \
  --header "Authorization: Bearer YOUR_API_KEY"

Credits

  • Each video generation request costs 100 credits
  • Status checks and result retrievals are free
  • Credits can be purchased from your dashboard
  • The API will return a 402 error if you have insufficient credits