Video API
AVCaption ships a REST API for programmatic video management. Available on Enterprise tier; preview access for Premium on request.
Authentication
Two methods:
Bearer token (JWT) — issued on login, sent as Authorization: Bearer <token> header. Used by your authenticated dashboard sessions.
API key — generated in your settings page. Format avc_<64-hex-chars>. Send as X-API-Key: <key> header or ?api_key=<key> query param. Useful for server-to-server.
Endpoints
GET /api/v1/videos List videos (paginated, ?page=1)
GET /api/v1/videos/:id Video metadata + embed token
POST /api/v1/upload Direct upload (small files)
POST /api/v1/upload/init Begin chunked upload session
POST /api/v1/upload/chunk Upload one chunk
POST /api/v1/upload/complete Finalize chunked upload
PUT /api/v1/videos/:id Update title, allowed_domains
DELETE /api/v1/videos/:id Delete video
GET /api/v1/stats Account stats: total videos, views, storage used
GET /api/v1/embed/:token Public embed metadata (no auth needed for public videos)
POST /api/v1/videos/:id/subtitles Upload subtitle track (Enterprise)
GET /api/v1/presets List player presets (Enterprise)
POST /api/v1/presets Create player preset (Enterprise)
Chunked upload pattern
# Step 1: init
curl -X POST https://dashboard.avcaption.com/api/v1/upload/init \
-H "X-API-Key: avc_..." \
-d '{"filename":"course-lesson-1.mp4","size":1234567890,"title":"Lesson 1"}'
# Returns: {"upload_id":"abc123","chunk_size":5242880}
# Step 2: upload chunks (parallel possible)
curl -X POST https://dashboard.avcaption.com/api/v1/upload/chunk \
-H "X-API-Key: avc_..." \
-H "X-Upload-ID: abc123" \
-H "X-Chunk-Index: 0" \
--data-binary @chunk-0.bin
# ...repeat for each chunk
# Step 3: complete
curl -X POST https://dashboard.avcaption.com/api/v1/upload/complete \
-H "X-API-Key: avc_..." \
-d '{"upload_id":"abc123"}'
# Returns: {"video_id":"...","embed_token":"...","status":"processing"}
Webhook events (Enterprise)
Subscribe to events at any HTTPS endpoint:
video.uploaded— chunked upload completevideo.encoded— encoding finished, ready to playvideo.failed— encoding failed (with error details)view.threshold— viewer count crossed configured thresholdsubtitle.translated— AI translation complete
Webhook payload signed with HMAC-SHA256.
Rate limits
- Read endpoints (list, get): 300 req/min per API key
- Write endpoints (update, delete): 60 req/min
- Upload endpoints: 60 req/min on init/complete; chunks themselves are not rate limited
- Stats: 60 req/min
Limits scale automatically for Enterprise customers; contact sales for custom rates.
Error format
{
"error": "human readable error message",
"code": "machine_readable_error_code",
"request_id": "x-request-id-for-support-tickets"
}
Get started
REST API is included in Enterprise. Generate your API key in dashboard Settings → API Keys. Open an Enterprise account and run a single chunked-upload call against a real source file before you script the bulk migration. Common API-driven deployments: LMS video hosting, agency client video, digital products.