Skip to main content
POST
/
timeline
Compile timeline
curl --request POST \
  --url https://api.videodb.io/timeline \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "request_type": "compile",
  "timeline": [
    {
      "video_id": "m-12345",
      "clips": [
        {
          "start": 0,
          "end": 30,
          "volume": 1
        }
      ]
    }
  ]
}
'
{
  "success": true,
  "data": {
    "stream_url": "https://stream.videodb.io/compiled/12345"
  }
}
Create a video timeline by adding video clips inline and overlaying audio, images, or text assets on top.
import videodb
from videodb.timeline import Timeline
from videodb.asset import VideoAsset, AudioAsset

conn = videodb.connect(api_key="your_api_key")

# Create a timeline
timeline = Timeline(conn)

# Add videos inline (sequentially)
video_asset = VideoAsset(asset_id="m-abc123def")
timeline.add_inline(video_asset)

# Add audio overlay (starts at 5 seconds)
audio_asset = AudioAsset(asset_id="a-xyz789")
timeline.add_overlay(start=5, asset=audio_asset)

# Generate stream
stream_url = timeline.generate_stream()
print(f"Stream: {stream_url}")
  • Timeline v1 uses simple inline and overlay operations
  • Video IDs start with m-, audio with a-, images with img-
  • For advanced editing with tracks and effects, use Timeline v2
  • generate_stream() returns a playable stream URL

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Body

application/json
request_type
enum<string>
required
Available options:
compile
Example:

"compile"

timeline
object[]
required

Response

200 - application/json

Timeline compilation result

success
boolean
Example:

true

data
object