Back to home

Documentation

Everything you need to upload, transcode, and stream video with the StreamiX API. Start with the quick start below, then dive into the endpoint reference.

Getting started

StreamiX is a distributed video transcoding and streaming platform. Upload a video once, and we generate adaptive bitrate HLS renditions and serve them from the edge — no infrastructure to manage. Every request below is made to your NEXT_PUBLIC_API_BASE_URL.

Use the base URL https://api.streamix.dev to follow the examples here.
  1. Register an account or log in to obtain a JWT access token.
  2. Include the token in the Authorization header on every request.
  3. Upload a video and poll its status until processing completes.
  4. Play the generated HLS stream from any web or mobile player.

Authentication

StreamiX uses JSON Web Tokens. Register and log in to receive an access_token and a refresh_token. Send the access token as a bearer token:

Header
Authorization: Bearer <access_token>

Create an account

bash
curl -X POST https://api.streamix.dev/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your-password"}'

Log in

bash
curl -X POST https://api.streamix.dev/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your-password"}'

Access tokens eventually expire. Use the refresh token to obtain a new pair without forcing the user to log in again.

POST/auth/refresh

Exchange a refresh token for a fresh access token.

Uploading videos

Upload a video as multipart/form-data. The file is streamed directly to object storage, which avoids proxy bottlenecks and arbitrary size limits.

bash
curl -X POST https://api.streamix.dev/videos \
  -H "Authorization: Bearer <access_token>" \
  -F "file=@movie.mp4"
GET/videos

List the current user's videos.

GET/videos/{id}

Get details for a single video.

DELETE/videos/{id}

Permanently delete a video and its outputs.

Processing

Once uploaded, a video moves through a distributed FFmpeg pipeline. Its status transitions as it is picked up and transcoded into multiple HLS renditions.

StatusMeaning
queuedWaiting for a worker to pick it up.
processingActively transcoding into renditions.
completedAll outputs generated and ready to stream.
failedProcessing errored — check the error details.

Check processing status

bash
curl https://api.streamix.dev/videos/<video_id>/status \
  -H "Authorization: Bearer <access_token>"
json
{
  "id": "9f1c2f3e-7a6b-4c0d-9e1f-0a1b2c3d4e5f",
  "name": "movie.mp4",
  "status": "completed",
  "renditions": ["480p", "720p", "1080p"],
  "playlistUrl": "https://stream.streamix.dev/9f1c2f3e-7a6b-4c0d-9e1f-0a1b2c3d4e5f/playlist.m3u8",
  "createdAt": "2026-08-03T09:15:00Z"
}

Streaming

Once a video is complete, point any HLS-compatible player at its playlist URL. On browsers without native HLS support, use a library such as hls.js.

html
<video id="video" controls></video>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
<script>
  if (Hls.isSupported()) {
    const video = document.getElementById("video");
    const hls = new Hls();
    hls.loadSource("https://stream.streamix.dev/<video_id>/playlist.m3u8");
    hls.attachMedia(video);
  }
</script>
Playback URLs are edge-cached and adaptive — bandwidth shifts to lower or higher renditions automatically during playback.

Errors

The API returns conventional HTTP status codes. Errors include a structured body to help you respond gracefully.

CodeMeaning
400Invalid request body or parameters.
401Missing or invalid access token.
404The requested resource does not exist.
429Too many requests — slow down or paginate.
500Something went wrong on our side.
json
{
  "error": {
    "code": "validation_failed",
    "message": "Invalid request body"
  }
}
Keep your access tokens out of version control. Expose them only through your server or a secure client secret.