Bỏ qua

API giải nén

Giải nén một file nén nằm ở URL công khai và nhận link tải cho từng file bên trong.

Endpoint POST https://revidapi.com/v1/extract
Giá 25 credit mỗi file nén
Định dạng zip, tar, tar.gz, tgz, tar.bz2, tbz2
Kết quả dạng task — hỏi GET /v1/caption/task/{task_id}

Endpoint này dùng để giải nén, không tách âm thanh khỏi video — việc đó dùng Chuyển video sang mp3.

1. Tạo job

Tham số Kiểu Bắt buộc Mô tả
file_url string ✅ URL công khai của file nén. Cổng tự tải về và gửi đi giúp bạn
curl -X POST "https://revidapi.com/v1/extract" \
  -H "x-api-key: $REVID_KEY" -H "Content-Type: application/json" \
  -d '{"file_url": "https://example.com/tai-nguyen.zip"}'
{
  "success": true,
  "task_id": "530bac52-c290-45de-8ab4-96b3262eb40d",
  "status": "pending",
  "message": "Extraction started",
  "archive_type": "zip",
  "endpoints": {
    "check_status": "https://revidapi.com/v1/caption/task/530bac52-c290-45de-8ab4-96b3262eb40d"
  }
}

2. Lấy danh sách file

curl "https://revidapi.com/v1/caption/task/530bac52-c290-45de-8ab4-96b3262eb40d" \
  -H "x-api-key: $REVID_KEY"
{
  "task_id": "530bac52-c290-45de-8ab4-96b3262eb40d",
  "status": "completed",
  "type": "extract",
  "progress": 100,
  "message": "Extraction completed: 1 files extracted",
  "result": {
    "archive_type": "zip",
    "total_files": 1,
    "files": [
      {"filename": "a.txt", "path": "a.txt", "size": 6, "compressed_size": 6,
       "download_url": "https://edit.revidapi.com/output/530bac52-..._extracted/a.txt"}
    ]
  }
}

File nhỏ xong trong 1–2 giây; hỏi lại mỗi 2–3 giây tới khi status là completed hoặc failed.

Lỗi

Mã Nghĩa
400 Thiếu file_url, hoặc file không phải định dạng nén được hỗ trợ
401 Thiếu hoặc sai API key
402 Không đủ credit
502 Không tải được file từ URL

Job lỗi được hoàn credit tự động.