API Guide

All endpoints are called via the Gradio Client. Use the interactive testers below.

POST /api/get_video_info Fetch video metadata

Parameters

FieldTypeRequired
urlstringYes

Response

{
  "success": true,
  "info": {
    "id": "dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up",
    "author": "Rick Astley",
    "duration": 212,
    "duration_string": "3:32",
    "views": 1500000000,
    "description": "...",
    "upload_date": "2009-10-25",
    "thumbnail": "https://i.ytimg.com/vi/...",
    "keywords": ["rick astley", "pop"],
    "captions": ["en", "es"],
    "is_live": false
  }
}

Try It

POST /api/get_streams List all available formats

Parameters

FieldTypeRequired
urlstringYes

Response

{
  "success": true,
  "progressive": [{ "format_id": "18", "resolution": "360p", "ext": "mp4", "filesize_mb": 15.2, "label": "360p MP4" }],
  "video_only": [{ "format_id": "137", "resolution": "1080p", "ext": "mp4", "filesize_mb": 85.0, "vcodec": "avc1", "label": "1080p MP4 (avc1)" }],
  "audio_only": [{ "format_id": "140", "resolution": "audio", "ext": "m4a", "abr": "128kbps", "label": "128kbps M4A" }],
  "available_resolutions": ["2160p", "1080p", "720p", "360p"],
  "best_resolution": "2160p"
}
POST /api/download Start a download task

Parameters

FieldTypeDefaultRequired
urlstringYes
format_idstringYes*
is_audiobooleanfalseNo
audio_qualitystring"128"No

* format_id not needed when is_audio=true (uses bestaudio).

Response

{ "success": true, "task_id": "a1b2c3d4e5f6", "message": "Download started" }

After getting a task_id, poll /api/get_progress to track status. When complete, download the file via /serve/{video_id}/{filename}.

POST /api/get_progress Poll download progress

Parameters

FieldTypeRequired
task_idstringYes

Response

{
  "success": true,
  "status": "downloading",   // "starting" | "downloading" | "completed" | "error"
  "percent": 45.2,
  "speed": "5.67MiB/s",
  "eta": "00:15",
  "filename": null,
  "filepath": null
}

When status is "completed", filename and filepath will be set.

POST /api/download_subtitles Download subtitles as SRT

Parameters

FieldTypeDefaultRequired
urlstringYes
langstring"en"No
GET /serve/{video_id}/{filename} Download a completed file

After a download completes, use this endpoint to retrieve the file. The response includes a Content-Disposition: attachment header for direct browser download.

GET /serve/dQw4w9WgXcQ/Rick_Astley_18.mp4