API Documentation

Complete API reference for StreamCloud video hosting platform

Authentication

All API requests require authentication using an API key. Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

Get your API key from your dashboard after logging in.

Endpoints

POST /api/upload

Upload a video file to StreamCloud

Request

Content-Type: multipart/form-data

file: (binary)
title: "My Video"
description: "Video description"

Response

{
  "success": true,
  "video_id": "abc123xyz",
  "embed_url": "https://streamcloud.com/v/abc123xyz",
  "stream_url": "https://streamcloud.com/v/abc123xyz.mp4"
}

GET /api/video/{video_id}

Get information about a specific video

Response

{
  "video_id": "abc123xyz",
  "title": "My Video",
  "duration": 3600,
  "size": 1073741824,
  "views": 1234,
  "status": "active",
  "created_at": "2024-01-01T00:00:00Z"
}

GET /v/{video_id}.mp4

Stream video content with CDN delivery

This endpoint supports HTTP range requests for seeking and resuming playback.

Headers

Range: bytes=0-1048575

GET /api/videos

List all your videos

Query Parameters

  • page - Page number (default: 1)
  • limit - Results per page (default: 20)
  • sort - Sort by: views, date, title

DELETE /api/video/{video_id}

Delete a video

Response

{
  "success": true,
  "message": "Video deleted successfully"
}

Rate Limiting

API requests are limited to:

Rate limit headers are included in all responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

Error Codes

Code Description
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid API key
404 Not Found - Video doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

SDKs & Libraries

Official SDKs available for: