Skip to content

Web 音声・動画取得 API (/v1/files/fetch-url) ​

OneASR は yt-dlp および ffmpeg をベースにしたストリーミングメディア取得エンジンを内蔵しており、Web 上の動画を標準化された音声形式へ直接変換できます。


1. 取得タスクの投入 ​

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

レスポンスボディ: ​

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

2. 取得進捗ステータスのポーリング ​

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

レスポンスボディ(取得完了時): ​

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