Skip to content

Remote URL Audio Extraction (/v1/files/fetch-url) ​

OneASR includes a built-in remote media extractor (powered by yt-dlp and ffmpeg) that downloads and extracts 16kHz audio from web video and audio links.


1. Submit Remote Fetch Task ​

http
POST /v1/files/fetch-url
Authorization: Bearer sk-oneasr-...
Content-Type: application/json

{
  "url": "https://www.youtube.com/watch?v=example",
  "extract_audio": true,
  "format": "mp3"
}

Response: ​

json
{
  "task_id": "fetch_9d8e7f6a5b4c3d2e",
  "status": "downloading",
  "url": "https://www.youtube.com/watch?v=example"
}

2. Poll Download Progress ​

http
GET /v1/files/fetch-url/fetch_9d8e7f6a5b4c3d2e
Authorization: Bearer sk-oneasr-...

Response (Completed): ​

json
{
  "task_id": "fetch_9d8e7f6a5b4c3d2e",
  "status": "completed",
  "file_id": "file_4a2c9b1e0f3d5a7b",
  "title": "Engineering Keynote 2026",
  "duration": 3600.0
}