API de Extracción de Audio desde URLs Remotas (/v1/files/fetch-url)
OneASR incluye un extractor de medios remoto integrado (basado en yt-dlp y ffmpeg) que descarga y extrae audio a 16 kHz desde enlaces web de audio y video.
1. Enviar Tarea de Descarga Remota
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"
}Respuesta:
json
{
"task_id": "fetch_9d8e7f6a5b4c3d2e",
"status": "downloading",
"url": "https://www.youtube.com/watch?v=example"
}2. Consultar Progreso de la Descarga
http
GET /v1/files/fetch-url/fetch_9d8e7f6a5b4c3d2e
Authorization: Bearer sk-oneasr-...Respuesta (Completada):
json
{
"task_id": "fetch_9d8e7f6a5b4c3d2e",
"status": "completed",
"file_id": "file_4a2c9b1e0f3d5a7b",
"title": "Engineering Keynote 2026",
"duration": 3600.0
}