Every VidTube API endpoint is reachable under a single base URL, and every request follows the same content-type rules. JSON bodies power most operations; multipart uploads handle media. Endpoints that return lists support consistent pagination and sorting query parameters, so you can page through results and control ordering with the same pattern across resources.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Pragyat-Nikunj/VidTube/llms.txt
Use this file to discover all available pages before exploring further.
The live demo API is hosted on Render’s free tier at
https://vidtube-ke5w.onrender.com. The instance may spin down after inactivity and take up to 30 seconds to cold-start on the first request.Base URL
/api/v1 — you never need to add a version segment yourself.
Content types
JSON requests
For all non-file requests, setContent-Type: application/json and send a JSON body. The server enforces a 16 kb body size limit.
File uploads
Endpoints that accept binary files — video, thumbnail, avatar, or cover image — requireContent-Type: multipart/form-data. The field names expected by each endpoint are documented in the respective resource reference.
Pagination
Endpoints that return lists (such asGET /videos/getAllVideos and GET /comments/videoComments/:videoId) support standard page-based pagination via query parameters.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | 1-indexed page number to retrieve. |
limit | integer | 10 | Number of items per page. Maximum is 100 for video listings. |
data object includes metadata alongside the items:
totalPages— total number of pages given the currentlimit.totalVideos— total number of matching records (on video endpoints).
Sorting
TheGET /videos/getAllVideos endpoint supports sorting via two additional parameters:
| Parameter | Options | Default | Description |
|---|---|---|---|
sortBy | createdAt, views, likes | createdAt | Field to sort results by. |
sortType | asc, desc | desc | Sort direction. |
Filtering
You can narrow video listings with these filter parameters onGET /videos/getAllVideos:
| Parameter | Description |
|---|---|
query | Searches video title and description using a case-insensitive regex. |
userId | Restricts results to videos uploaded by a specific user (owner ID). |