All endpoints are called via the Gradio Client. Use the interactive testers below.
| Field | Type | Required |
|---|---|---|
url | string | Yes |
{
"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
}
}
| Field | Type | Required |
|---|---|---|
url | string | Yes |
{
"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"
}
| Field | Type | Default | Required |
|---|---|---|---|
url | string | — | Yes |
format_id | string | — | Yes* |
is_audio | boolean | false | No |
audio_quality | string | "128" | No |
* format_id not needed when is_audio=true (uses bestaudio).
{ "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}.
| Field | Type | Required |
|---|---|---|
task_id | string | Yes |
{
"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.
| Field | Type | Default | Required |
|---|---|---|---|
url | string | — | Yes |
lang | string | "en" | No |
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