Async tasks
Create a background download task and poll for status. Best for long-running downloads or when you don't want to hold a long HTTP connection.
/downloader/tasksCreates a new download task. Returns task_id and polling URLs. Credits are charged immediately.
Parameters
urlrequiredstringMedia URL to download.
modeoptionalselectauto | audio | videoPreferred download mode. 'auto' picks video for video URLs, audio for audio URLs.
qualityoptionalselectmax | 2160 | 1440 | 1080 | 720 | 480 | 360Preferred video quality. 'max' picks the highest available.
use_cookiesoptionalbooleanUse authenticated cookies for private content (premium feature).
max_file_size_mboptionalnumberMaximum file size in megabytes. Files larger than this will be rejected or truncated.
Code examples
curl -X POST 'https://api.anysave.click/downloader/tasks' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://youtu.be/dQw4w9WgXcQ",
"mode": "auto",
"quality": "max",
"use_cookies": false,
"max_file_size_mb": 1990
}'Response example
{
"status": "ok",
"data": {
"task_id": "018f9b4e-...",
"status": "queued",
"created_at": "2025-01-15T12:00:00Z",
"status_url": "https://api.example.com/downloader/tasks/018f9b4e-...",
"result_url": "https://api.example.com/downloader/tasks/018f9b4e-.../result"
}
}/downloader/tasks/{task_id}Returns the current lifecycle status of a task: queued, processing, or finished.
Parameters
task_idrequiredstringThe task ID returned by POST /downloader/tasks.
Code examples
curl -X GET 'https://api.anysave.click/downloader/tasks/018f9b4e-...' \
-H 'Authorization: Bearer YOUR_API_KEY'Response example
{
"status": "ok",
"data": {
"task_id": "018f9b4e-...",
"status": "processing",
"result_status": null,
"created_at": "2025-01-15T12:00:00Z",
"started_at": "2025-01-15T12:00:01Z",
"finished_at": null,
"expires_at": "2025-01-15T12:15:00Z",
"poll_after_ms": 1000
}
}/downloader/tasks/{task_id}/resultReturns the download result. Returns 202 if the task is still processing. The result envelope matches the sync endpoint.
Parameters
task_idrequiredstringThe task ID returned by POST /downloader/tasks.
Code examples
curl -X GET 'https://api.anysave.click/downloader/tasks/018f9b4e-.../result' \
-H 'Authorization: Bearer YOUR_API_KEY'Response example
{
"status": "ok",
"data": {
"source_url": "https://youtu.be/dQw4w9WgXcQ",
"service": "youtube",
"is_truncated": false,
"status": "tunnel",
"file": {
"type": "video",
"url": "https://api.example.com/media/abc123.mp4",
"filename": "abc123.mp4",
"file_size_bytes": 15728640
}
}
}