Skip to content

文件上传与存储管理接口 (/v1/files) ​

在发起批量转录任务前,管理已暂存至 OneASR 服务端的音频文件。


1. 上传音频文件 (POST /v1/files/upload) ​

http
POST /v1/files/upload
Authorization: Bearer sk-oneasr-...
Content-Type: multipart/form-data

响应体: ​

json
{
  "file_id": "file_4a2c9b1e0f3d5a7b",
  "filename": "interview.mp3",
  "size_bytes": 14502300,
  "duration_seconds": 1820.5,
  "created_at": "2026-09-28T15:00:00Z"
}

2. 查询文件列表 (GET /v1/files/list) ​

http
GET /v1/files/list?limit=20&offset=0
Authorization: Bearer sk-oneasr-...

3. 删除文件 (DELETE /v1/files/{file_id}) ​

http
DELETE /v1/files/file_4a2c9b1e0f3d5a7b
Authorization: Bearer sk-oneasr-...