API reference
TubeMP4 Developer API
All API responses use JSON. Keep keys server-side and authenticate with an HTTP Bearer header. The base URL is https://tubemp4.com.
Authentication
Authorization: Bearer tubemp4_live_your_keyKeys are shown once when created. Revoke a leaked key from your account immediately.
Endpoints
/api/v1/video/metadata?url=…Fetch title, thumbnail, duration, and available formats.
/api/v1/video/downloadQueue a download with url, format, and quality.
/api/v1/video/status?id=…Poll a job until status is completed and downloadUrl is present.
/api/v1/creditsInspect plan limits and current-period usage.
/api/account/api-keysCreate a key from an authenticated TubeMP4 account.
Download jobs
POST /api/v1/video/download
{
"url": "https://youtube.com/watch?v=…",
"format": "mp4",
"quality": "1080p"
}The response includes a job ID. Poll the status endpoint until it returns completed. Delivery links are temporary; store the source URL and request a new job when needed.
YouTube format mapping
For video, send format: "mp4" with a quality such as 720p, 1080p, 1440p, or 4K. For audio, send format: "mp3" with quality: "128" or "320", or use format: "m4a". The source and provider still determine which outputs are available.
Quota windows
Developer API allowances reset at the beginning of each UTC calendar month. Metadata and download quotas are tracked separately, and only responses below HTTP 400 are counted.
Errors
TubeMP4 uses normal HTTP status codes: 400 invalid input, 401 invalid key, 402 exhausted allowance, 404 missing job, and 5xx provider or configuration failures. Security throttling may return 429 when enabled at the edge.