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.

POSThttps://api.videopilot.app/api/videos/{id}/generate-scenes

Parameters

The following parameters are supported for this endpoint:

NameTypeRequiredDefaultDescription
idpath
stringRequired-

The unique identifier of the video

Example:"video_123abc"
sceneDuration
numberOptional4

Duration for each scene in seconds

Example:4
Min: 2, Max: 10
regenerateScript
booleanOptionalfalse

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:

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