Skip to content

API Documentation Home ​

Welcome to the Xvid MediaHub API documentation. This guide provides an overview of the available APIs, their structure, and common conventions.

Overview ​

The MediaHub API is a RESTful service using OAuth 2.0 bearer tokens for secure access control. API requests should always be made over HTTPS to protect the bearer token and ensure secure communication.

Base Endpoint:
https://api.xvid.com/v1/

Authorization ​

Most endpoints require an OAuth 2.0 token, which is obtained using your client credentials via the /oauth2/token endpoint.

Common API Conventions ​

All endpoints support common query parameters for flexible data handling:

  • format: (json or xml) – Overrides the Accept header to specify response format.
  • human: (true or false) – Renders JSON responses in a more human-readable format, useful for debugging or direct browser access.
  • start and limit: Used for pagination, where start specifies the offset and limit sets the maximum number of records to return.

API Resources ​

Authorization ​

Manage API access by obtaining OAuth tokens using your application’s credentials.

Backtraces ​

Trace copies of AutoGraph-protected videos back to a specific download or viewer.

Users ​

Access and update information related to your user account and profile.

Pipelines ​

Define storage and access settings for input/output files, configure notifications, and queue settings for job management.

Codecs ​

Define audio and video encoding standards with properties relevant to compatibility and performance.

Presets ​

Reusable configurations for video conversion, defining codecs, formats, and additional settings like resizing, cropping, and watermarking.

Playlists ​

Generate HLS or MPEG-DASH playlists for MP4 video files, enabling smooth video streaming.

Jobs ​

Submit and manage video conversion tasks with customizable input, output, and processing settings.

Files ​

Store and manage metadata for files uploaded or created by Jobs. Access binary file content via /files/downloads.

Statistics ​

Retrieve usage metrics (e.g., bandwidth, storage, encoding) for your account or specific applications.

Uploads and Downloads ​

Files can be stored internally or externally. AutoGraph watermarking is only available for files stored on our MediaHub servers. To upload or download files, use the /files/uploads and /files/downloads endpoints, specifying a pipeline_id to manage file paths relative to the pipeline's root folder.

Responses and Error Handling ​

All successful requests return a 200 status with JSON data. Errors return 4xx status codes with a structured JSON error response, including:

  • error_code
  • error_message
  • error_description