This document describes the REST API endpoints for the video editor platform.
Development: http://localhost:3000/api/v1
Production: https://api.videdit.com/api/v1
All authenticated endpoints require a JWT token in the Authorization header:
Authorization: Bearer <token>
Register a new user account.
Request Body:
{
"email": "user@example.com",
"password": "securePassword123",
"username": "johndoe"
}Response: 201 Created
{
"user": {
"id": "user-uuid",
"email": "user@example.com",
"username": "johndoe"
},
"token": "jwt-token"
}Login to existing account.
Request Body:
{
"email": "user@example.com",
"password": "securePassword123"
}Response: 200 OK
{
"user": {
"id": "user-uuid",
"email": "user@example.com",
"username": "johndoe"
},
"token": "jwt-token"
}List all projects for authenticated user.
Query Parameters:
page(optional): Page number (default: 1)limit(optional): Items per page (default: 20)sort(optional): Sort field (default: updated_at)
Response: 200 OK
{
"projects": [
{
"id": "project-uuid",
"name": "My Video Project",
"description": "Project description",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-02T00:00:00Z",
"thumbnail": "https://cdn.videdit.com/thumbnails/project-uuid.jpg"
}
],
"pagination": {
"total": 42,
"page": 1,
"pages": 3
}
}Create a new project.
Request Body:
{
"name": "My New Project",
"description": "Project description",
"settings": {
"resolution": "1920x1080",
"framerate": 30,
"aspectRatio": "16:9"
}
}Response: 201 Created
Get project details.
Response: 200 OK
{
"id": "project-uuid",
"name": "My Video Project",
"description": "Project description",
"settings": {
"resolution": "1920x1080",
"framerate": 30,
"aspectRatio": "16:9"
},
"timeline": {
"tracks": [...]
},
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-02T00:00:00Z"
}Update project details.
Delete a project.
List all assets in a project.
Request upload URL for new asset.
Request Body:
{
"filename": "video.mp4",
"filesize": 104857600,
"mimetype": "video/mp4"
}Response: 200 OK
{
"assetId": "asset-uuid",
"uploadUrl": "https://storage.videdit.com/upload/signed-url",
"expiresAt": "2024-01-01T01:00:00Z"
}Notify that upload is complete.
Get asset details.
Delete an asset.
List commit history.
Response: 200 OK
{
"commits": [
{
"id": "commit-hash",
"message": "Added intro sequence",
"author": {
"id": "user-uuid",
"username": "johndoe"
},
"timestamp": "2024-01-01T12:00:00Z",
"parent": "parent-commit-hash"
}
]
}Create a new commit.
Request Body:
{
"message": "Added intro sequence",
"timeline": {
"tracks": [...]
}
}List all branches.
Create a new branch.
Request Body:
{
"name": "experimental-edit",
"fromCommit": "commit-hash"
}Merge two branches.
Request Body:
{
"source": "experimental-edit",
"target": "main",
"strategy": "auto"
}Response: 200 OK or 409 Conflict
{
"status": "success|conflict",
"conflicts": [
{
"type": "clip-overlap",
"track": 1,
"timeRange": [10.5, 15.2]
}
]
}Request AI analysis of video.
Request Body:
{
"assetId": "asset-uuid",
"analyses": ["scene-detection", "object-recognition", "transcription"]
}Response: 202 Accepted
{
"jobId": "job-uuid",
"status": "queued"
}Get AI job status.
Apply AI effect to video.
Get AI recommendations.
List project collaborators.
Add collaborator to project.
Get all comments on project.
Add a comment.
Connect to: ws://localhost:3000/collaborate/:projectId
join-session
{
"event": "join-session",
"projectId": "project-uuid"
}timeline-update
{
"event": "timeline-update",
"delta": {
"operation": "add-clip",
"track": 1,
"clip": {...}
}
}cursor-move
{
"event": "cursor-move",
"position": {
"x": 100,
"y": 200
}
}user-joined
{
"event": "user-joined",
"user": {
"id": "user-uuid",
"username": "johndoe",
"color": "#FF5733"
}
}timeline-updated
{
"event": "timeline-updated",
"userId": "user-uuid",
"delta": {...}
}cursor-updated
{
"event": "cursor-updated",
"userId": "user-uuid",
"position": {...}
}All errors follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable error message",
"details": {}
}
}400Bad Request - Invalid input401Unauthorized - Missing or invalid token403Forbidden - Insufficient permissions404Not Found - Resource not found409Conflict - Version conflict or merge conflict429Too Many Requests - Rate limit exceeded500Internal Server Error - Server error
- Free Tier: 100 requests/hour
- Pro Tier: 1000 requests/hour
- Enterprise: Unlimited
Rate limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1609459200