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",
  "duration": "5",
  "aspect_ratio": "16:9"
}

Response

{
  "status": "IN_QUEUE",
  "request_id": "f2021ee8-e30c-4d39-b1f8-9d21774e548c"
}

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",
    "duration": "5",
    "aspect_ratio": "16:9"
  }'

# 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