API Documentation
Integrate high-performance audio and video streaming protocols, instant index queries, and predictive CDN caching into your production pipelines.
Overview
The AloneMusic API engine is architected to perform direct index processing, audio transcoding extraction, and instant logging directly to distributed storage networks. The platform isolates caching mechanisms dynamically, delivering content with sub-millisecond playback initiation under any consumer environment.
Authentication
API actions are verified using active credential keys provisioned securely on your developer console dashboard. You must supply your key as a query parameter or path segment.
GET https://yt.riteshyt.in/download?query=lofi&api_key=your_api_key
// Or directly structured in direct stream routes
GET https://yt.riteshyt.in/downloads/your_api_key/youtube.com/dQw4w9WgXcQ.mp3
Search Tracks
Query YouTube and internal audio metadata databases simultaneously for titles, artist streams, and duration logs.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | The text search query or YouTube video watch URL. |
| limit | integer | No | The maximum number of search results to return (Default: 1). |
curl -G "https://yt.riteshyt.in/search" \ --data-urlencode "query=lofi hip hop" \ --data-urlencode "limit=1"
{
"result": [
{
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg"
}
],
"duration": "03:32"
}
]
}
Track Details
Resolves high-accuracy metadata and starts background prefetching of the targeted track automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
| link | string | Yes | The full YouTube video URL or 11-character video ID. |
curl -G "https://yt.riteshyt.in/details" \ --data-urlencode "link=https://youtu.be/dQw4w9WgXcQ"
{
"title": "Never Gonna Give You Up",
"duration_min": "03:32",
"duration_sec": 212,
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"vidid": "dQw4w9WgXcQ",
"link": "https://youtu.be/dQw4w9WgXcQ"
}
Playlist Query
Retrieves high-speed bulk details of tracks loaded inside a targeted YouTube Playlist link.
| Parameter | Type | Required | Description |
|---|---|---|---|
| link | string | Yes | The full YouTube playlist URL. |
| limit | integer | No | Maximum tracks to parse from the playlist (Default: 10). |
curl -G "https://yt.riteshyt.in/playlist" \ --data-urlencode "link=https://www.youtube.com/playlist?list=PL4fGSI1pDJn6jxs_ZHmAs9DKNX98g9089" \ --data-urlencode "limit=5"
Streaming and Direct Download
High-efficiency streaming route that returns raw media binary streams. Supports range-headers for instant seeking in HTML5 audio or video engines.
| Path Parameter | Type | Description |
|---|---|---|
| api_key | string | Your provisioned AVRYA developer credentials token. |
| vidid | string | The 11-character YouTube video ID. |
| ext | string | Output format: mp3 (Audio extraction) or mp4 (Video stream). |
curl -O -L "https://yt.riteshyt.in/downloads/your_api_key/youtube.com/dQw4w9WgXcQ.mp3"
Unified Playback & Redirect
Highly flexible unified endpoint. It auto-detects video IDs, sanitizes keywords, resolves search terms on YouTube dynamically, and automatically redirects to direct streaming outputs.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query or video URL. |
| dl_type | string | No | The output format type: audio or video (Default: audio). |
| api_key | string | Yes | Your provisioned developer API credentials token. |
curl -L "https://yt.riteshyt.in/download?query=perfect+edsheeran&api_key=your_api_key"
Prefetch Bulk Buffer
Warm up regional caching nodes in the background. Highly useful for preloading music lists or queues before the consumer initiates actual playback.
| Request Body Parameter | Type | Required | Description |
|---|---|---|---|
| queries | array of strings | Yes | List of search queries or video links to prefetch. |
| dl_type | string | No | Set to audio. |
curl -X POST "https://yt.riteshyt.in/prefetch_bulk" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_session_token" \
-d '{"queries": ["lofi", "ambient space music"], "dl_type": "audio"}'