Skip to main content
POST
/
video
/
{video_id}
/
index
/
scene
Create video scene index
curl --request POST \
  --url https://api.videodb.io/video/{video_id}/index/scene/ \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "scene_type": "shot",
  "segmentation_threshold": 0.8,
  "callback_url": "https://webhook.example.com/callback"
}
'
{
  "success": true,
  "status": "processing",
  "data": {
    "id": "job-123",
    "output_url": "https://api.videodb.io/async-response/job-123"
  }
}
Create an AI-powered index of scenes in the video with descriptions, enabling visual search and scene understanding.
import videodb

conn = videodb.connect(api_key="your_api_key")
coll = conn.get_collection()
video = coll.get_videos()[0]

# Index scenes for visual search
scene_index_id = video.index_scenes()

print(f"Scene index created: {scene_index_id}")
  • Analyzes video frames and creates AI descriptions for scenes
  • Supports shot-based and time-based extraction strategies
  • Can use custom prompts to guide scene description
  • Generates visual embeddings for semantic search
  • Returns scene index ID for later retrieval and searching
  • Extraction configuration controls frame sampling and scene detection

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Path Parameters

video_id
string
required
Example:

"m-12345"

Body

application/json
scene_type
enum<string>
Available options:
shot,
time_based
Example:

"shot"

segmentation_threshold
number
Example:

0.8

callback_url
string
Example:

"https://webhook.example.com/callback"

Response

200 - application/json

Scene index creation started

success
boolean
Example:

true

status
enum<string>
Available options:
processing,
done,
failed
Example:

"processing"

data
object