POST
Generate Scenes
Generation
3 min read
Generate script, images, and audio for video scenes. This processes the video prompt into individual scenes with media.
POST
https://api.videopilot.app/api/videos/{id}/generate-scenes
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 |
---|---|---|---|---|
id path | string | Required | - | The unique identifier of the video Example: "video_123abc" |
sceneDuration | number | Optional | 4 | Duration for each scene in seconds Example: 4 Min: 2, Max: 10 |
regenerateScript | boolean | Optional | false | Whether to regenerate the script if it already exists Example: false |
Code Examples
Example requests in multiple programming languages:
curl -X POST https://api.videopilot.app/api/videos/video_123abc/generate-scenes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sceneDuration": 4,
"regenerateScript": false
}'
Responses
Possible responses from this endpoint:
200
Scene generation started
Example Response
JSON
{
"message": "Scene generation started",
"jobIds": [
"job_123",
"job_124",
"job_125"
]
}
400
Video not ready for scene generation
401
Authentication required
404
Video not found
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/{id}/generate-scenes
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/{id}/generate-scenes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sceneDuration": 4,
"regenerateScript": false
}'
Response
Make a request to see the response here