Video Editor
Create editable videos, upload media, add clips, and apply edits.
The editor API lets an MCP client create editable videos, upload media from chat, add existing media to the timeline, and apply direct edits.
POST /editor/videos
Creates an editable draft.
Requires generations:write.
curl -X POST https://videotok.app/api/v1/editor/videos \
-H "Authorization: Bearer vt_live_..." \
-H "Content-Type: application/json" \
-d '{
"title": "TikTok ad draft",
"aspect_ratio": "9:16",
"fps": 30
}'
GET /editor/videos
Lists editable videos.
Requires generations:read or generations:write.
curl https://videotok.app/api/v1/editor/videos \
-H "Authorization: Bearer vt_live_..."
GET /editor/videos/{id}
Returns one editable video.
Requires generations:read or generations:write.
curl https://videotok.app/api/v1/editor/videos/1234 \
-H "Authorization: Bearer vt_live_..."
POST /editor/media
Uploads media to the workspace media library.
It can also add the uploaded media directly to an editor video.
Requires generations:write.
curl -X POST https://videotok.app/api/v1/editor/media \
-H "Authorization: Bearer vt_live_..." \
-H "Content-Type: application/json" \
-d '{
"media_type": "image",
"title": "Product image",
"video_id": 1234,
"add_to_editor": true,
"media": {
"filename": "product.png",
"content_type": "image/png",
"data": "iVBORw0KGgo..."
},
"placement": {
"from_seconds": 0,
"duration_seconds": 4,
"fit": "cover"
}
}'
GET /editor/media
Lists media available to the editor.
Requires generations:read or generations:write.
| Parameter | Notes |
|---|---|
media_type | image, video, or audio. |
query | Searches filename and indexed text. |
limit | 1 to 100. Default is 30. |
curl "https://videotok.app/api/v1/editor/media?media_type=image&limit=20" \
-H "Authorization: Bearer vt_live_..."
POST /editor/videos/{id}/media
Adds existing media or a direct URL to an editor timeline.
Requires generations:write.
curl -X POST https://videotok.app/api/v1/editor/videos/1234/media \
-H "Authorization: Bearer vt_live_..." \
-H "Content-Type: application/json" \
-d '{
"media_id": "0c2796d2-43ef-4e13-b1d4-4187696929d6",
"from_seconds": 0,
"duration_seconds": 5,
"fit": "cover"
}'
Direct URL:
{
"url": "https://example.com/clip.mp4",
"media_type": "video",
"filename": "clip.mp4",
"duration_seconds": 8,
"from_seconds": 0,
"fit": "cover"
}
PATCH /editor/videos/{id}
Applies direct edits.
Requires generations:write.
curl -X PATCH https://videotok.app/api/v1/editor/videos/1234 \
-H "Authorization: Bearer vt_live_..." \
-H "Content-Type: application/json" \
-d '{
"instructions": "Move the product image later and rename the project.",
"operations": [
{
"type": "set_title",
"title": "Final TikTok ad"
},
{
"type": "set_item_timing",
"item_id": "item_abc",
"from_seconds": 1.5,
"duration_seconds": 4
}
]
}'
Supported Edit Operations
| Type | Fields |
|---|---|
set_title | title |
remove_item | item_id |
set_item_timing | item_id, from_seconds, duration_seconds |
set_item_transform | item_id, left, top, width, height, opacity |
move_item_to_track | item_id, track_id |