Skip to main content
POST
/
v1
/
uploads
/
videos
curl --request POST \
  --url https://toapis.com/v1/uploads/videos \
  --header 'Authorization: Bearer <token>' \
  --form 'file=@/path/to/your/video.mp4'
{
  "success": true,
  "message": "",
  "data": {
    "id": "upload_abc12345",
    "url": "https://files.toapis.com/uploads/123/videos/1737568800_abc12345.mp4",
    "mime_type": "video/mp4",
    "size": 1892345
  }
}
The docs Playground does not support file uploads: Please use the cURL, Python, or JavaScript code examples below for testing.

Why Upload First?

  1. Unified input flow - Upload local videos once and reuse the returned public URL
  2. Less repeated transfer - The same uploaded video can be referenced by multiple generation requests

Authorizations

Authorization
string
required
Use Bearer Token for authenticationGet your API Key: Visit API Key Management
Authorization: Bearer YOUR_API_KEY

Body

file
file
required
Video fileSupported formats:
  • MP4 (.mp4)
  • WebM (.webm)
  • MOV (.mov)
Limits:
  • Maximum file size: 50MB
purpose
string
Upload purpose (optional)Default: generation

Response

success
boolean
Whether the request succeeded
data
object
curl --request POST \
  --url https://toapis.com/v1/uploads/videos \
  --header 'Authorization: Bearer <token>' \
  --form 'file=@/path/to/your/video.mp4'
{
  "success": true,
  "message": "",
  "data": {
    "id": "upload_abc12345",
    "url": "https://files.toapis.com/uploads/123/videos/1737568800_abc12345.mp4",
    "mime_type": "video/mp4",
    "size": 1892345
  }
}