POST
Create Video
Videos
3 min read
Create a new video project with basic information. This endpoint creates a draft video that you can then generate content for.
POST
https://api.videopilot.app/api/videos
This endpoint requires authentication. Include your API key in the Authorization header.
Parameters
The following parameters are supported for this endpoint:
Name | Type | Required | Default | Description |
---|---|---|---|---|
title | string | Optional | - | Video title (auto-generated if not provided) Example: "Epic Space Adventure" |
prompt | string | Required | - | The story or content description for the video Example: "A thrilling space adventure about an astronaut discovering a mysterious alien artifact" |
description | string | Optional | - | Additional context or description Example: "A sci-fi story with dramatic tension and discovery" |
style | string enum | Optional | "cinematic" | Visual style for the video Example: "cinematic" Options:cinematiccartoonrealisticfantasyanimeoil-paintingwatercolor |
voiceType | string enum | Optional | "echo" | Voice type for narration Example: "echo" Options:echoalloyfableonyxnovashimmer |
voiceProvider | string enum | Optional | "openai" | TTS provider Example: "openai" Options:openaihiggs |
Code Examples
Example requests in multiple programming languages:
curl -X POST https://api.videopilot.app/api/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Space Discovery",
"prompt": "A thrilling space adventure about an astronaut discovering a mysterious alien artifact",
"description": "A sci-fi story with dramatic tension and discovery",
"style": "cinematic",
"voiceType": "echo",
"voiceProvider": "openai",
"duration": 90,
"orientation": "portrait"
}'
Responses
Possible responses from this endpoint:
200
Video created successfully
400
Invalid request data
Example Response
JSON
{
"error": "Bad Request",
"message": "Prompt is required",
"code": "MISSING_REQUIRED_FIELD"
}
401
Authentication required
Example Response
JSON
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "INVALID_API_KEY"
}
422
Validation error
Example Response
JSON
{
"error": "Validation Error",
"message": "Duration must be between 15 and 300 seconds",
"code": "VALIDATION_ERROR"
}
Try It Out
Test this endpoint directly from your browser:
Your API key is only used for this session and never stored or logged.
POST
/api/videos
Generated cURL Command
Copy this command to use in your terminal
"text-blue-400 font-semibold">curl -X POST https://api.videopilot.app/api/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"style": "cinematic",
"voiceType": "echo",
"voiceProvider": "openai",
"duration": 60,
"orientation": "portrait"
}'
Response
Make a request to see the response here