Tài liệu API
Gọi Auto Sub qua API
Tự động tạo job reup từ link bằng curl, script hay n8n. Mọi request xác thực bằng API token cá nhân.
1. Xác thực
Lấy token ở Cài Đặt → API Token. Gắn vào header mọi request:
Authorization: Bearer <API_TOKEN>Base URL: https://auto-sub.io.vn
2. Tạo job reup
POST
/api/jobs| Trường | Bắt buộc | Mô tả |
|---|---|---|
| url | có | Link video TikTok / Douyin cần reup. |
| target_language | có | Ngôn ngữ đích, vd "Vietnamese". |
| auto_processing_enabled | không | true = chạy tự động toàn bộ (không dừng xác nhận). Khuyên dùng cho n8n. |
| voice | không | Mã giọng đọc (bỏ trống = mặc định theo cài đặt). |
| voice_provider | không | "vbee" (cao cấp) hoặc "edge-tts" (tiêu chuẩn). |
| speed_adjustment | không | Điều chỉnh tốc độ giọng (-20..20). |
| fb_page_id | không | page_id Facebook để tự đăng (nếu đã cấu hình). |
curl -X POST https://auto-sub.io.vn/api/jobs \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@user/video/123",
"target_language": "Vietnamese",
"auto_processing_enabled": true,
"voice_provider": "vbee"
}'Trả về id của job để theo dõi.
3. Kiểm tra trạng thái
GET
/api/jobs/:idcurl https://auto-sub.io.vn/api/jobs/123 \
-H "Authorization: Bearer <API_TOKEN>"status: pending → processing → completed / failed. Khi xong, final_video_url là link tải video.
4. Dùng trong n8n
- Node HTTP Request: Method
POST, URLhttps://auto-sub.io.vn/api/jobs. - Header
Authorization: Bearer <API_TOKEN>, Body JSON như trên (đặtauto_processing_enabled: true). - Lấy
idtừ response → node tiếp theo gọiGET /api/jobs/{id}để poll tới khicompleted. - Dùng
final_video_urlđể tải / đăng tiếp.
Workflow n8n mẫu (miễn phí)
Tải workflow mẫu, import vào n8n và thay API token của bạn là chạy được ngay.
⬇️ Tải workflow n8n mẫu