Skip to content

API d’Extraction Audio depuis URL Distante (/v1/files/fetch-url) ​

OneASR inclut un extracteur multimédia distant intégré (propulsé par yt-dlp et ffmpeg) qui télécharge et extrait l’audio 16 kHz à partir de liens vidéo et audio web.


1. Soumettre une Tâche d’Extraction Distante ​

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"
}

Réponse : ​

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

2. Suivre la Progression du Téléchargement ​

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

Réponse (Terminée) : ​

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