VideoGen API
  1. Text to Video
VideoGen API
  • Text to Video
    • Prompt to video
      POST
    • Prompt to outline
      POST
    • Outline to video
      POST
    • Get file
      GET
  • Resources
    • Get voices
    • Get languages
    • Get fonts
  • Examples
    • Interacting with the Video Outline
    • Polling vs Webhooks
  • v1
    • Text to Video
      • Script to video
      • Prompt to script
      • Get file
    • Resources
      • Get voices
      • Get languages
      • Get fonts
    • Examples
      • Generate a Video
  1. Text to Video

Prompt to video

POST
https://ext.videogen.io/v2/prompt-to-video
This endpoint begins by converting your text prompt and chosen background footage into a complete video script, which is then used to create the video. Upon successful creation, you receive a unique identifier (apiFileId). You can use this apiFileId with the GET /get-file endpoint to monitor the video's export status—the export process generally takes about as long as the video's duration.
For a more automated approach, you may also provide a webhook URL. With this option, status updates are sent directly to your endpoint, eliminating the need for manual polling of the GET /get-file endpoint.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "prompt": "Best restaurants in San Francisco",
    "targetScriptWordCount": 50,
    "websiteUrls": [
        "https://www.chezmamanrestos.com/"
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ext.videogen.io/v2/prompt-to-video' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "Best restaurants in San Francisco",
    "targetScriptWordCount": 50,
    "websiteUrls": [
        "https://www.chezmamanrestos.com/"
    ]
}'

Responses

🟢200Successfully initiated video generation
application/json
Body

Examples
{
    "apiFileId": "874d3150-f0e3-435c-be3d-0936d892b7e7"
}
🟠400Failed to initiate video generation
Modified at 2025-04-18 02:35:23
Next
Prompt to outline