Vid Kraken — YouTube Download API

For AI agents: docs index at /docs/llms.txt; any page as Markdown by adding .md to its URL.

REST API to download videos from YouTube and to fetch direct download links from YouTube, Instagram, TikTok, and Facebook.

Getting Started

  • Sign up at vidkraken.com

  • Grab your API key from the dashboard

  • Pass it on every request as: Authorization: Bearer YOUR_API_KEY

Usage & billing

You pay for bandwidth only. Every plan includes a monthly bandwidth allowance; each download counts its actual file size against it, with a 20 MB minimum per download. There are no per-download fees. Downloads and metadata lookups are counted against generous per-plan quotas that are sized so bandwidth always runs out first. Failures are never charged.

Endpoint Counts against
POST /download Bandwidth at actual file size (20 MB minimum)
POST /info 1 info request
POST /list-channel Account add-on — contact us to enable
POST /client-download Account add-on — contact us to enable

Polling endpoints (GET /download/{jobId}, GET /info/{jobId}, GET /client-download/{jobId}) are free, as is GET /me for checking your plan and remaining balances. Failed jobs, auth failures (401) and limit errors (403, 429) are not charged.

Each account may have at most 100 downloads queued or in progress at once; POST /download returns 429 beyond that until some finish. Every POST /download response carries the IETF RateLimit-Policy and RateLimit headers for this cap ("pending";r=37 means 37 more downloads can be queued now), and the 429 adds Retry-After.

Safe retries (Idempotency-Key)

POST /download and POST /info accept an optional Idempotency-Key header (any unique string, e.g. a UUID). If a request times out or the connection drops, retry it with the same key: you get the original job back instead of starting, and paying for, a second one. Keys are kept for 24 hours per account. Reusing a key with a different body returns 422; retrying while the first request is still running returns 409 (wait Retry-After seconds). Failed requests aren't stored, so retrying one with the same key runs it again. A replayed response carries Idempotent-Replayed: true.

Errors

Every error response is JSON with a human-readable error and a machine-readable code (see ApiError); some add details. Branch on code, not on the message:

code Status What to do
INVALID_REQUEST 400 Fix the request; retrying it unchanged fails again
UNAUTHORIZED 401 Send a valid API key
LIMIT_REACHED 403 The plan's allowance is used up; upgrade or wait for the next cycle
NOT_FOUND 404 The job does not exist, has expired or is not yours
VIDEO_NOT_FOUND 404 No such video: private, deleted or a wrong id
IDEMPOTENCY_CONFLICT 409 A request with this Idempotency-Key is still running; retry after Retry-After seconds
IDEMPOTENCY_KEY_REUSED 422 This Idempotency-Key was used with a different body; use a new key
TOO_MANY_PENDING 429 Wait Retry-After seconds or until some downloads finish
INTERNAL_ERROR 500 Our fault; retry after a short backoff
UNAVAILABLE 503 Temporarily unavailable; retry after a short backoff

A download that was accepted but then failed is not an HTTP error: its status response says FAILED with an errorCode for the video (see DownloadErrorCode).

Versioning and deprecation

The API is versioned in the path (/api/v2). Within v2 we only make backward-compatible changes: new endpoints, new optional request fields, new response fields and new enum values, so handle unknown code, errorCode and status values gracefully. Breaking changes ship as a new version (/api/v3), and v2 keeps working alongside it.

Before an endpoint, field or version is removed, you get at least 3 months' notice: account owners are emailed, the change is documented here, and affected responses carry a Deprecation header (RFC 9745) and a Sunset header (RFC 8594) with the removal date, plus a Link to migration notes. Nothing is deprecated today.

API Endpoints

All endpoints

SDKs and CLI

Official clients wrap these endpoints with typed errors, safe retries, polling and file saving, and include a vidkraken command-line tool:

  • JavaScript / TypeScript: npm install vidkraken (npm)
  • Python: pip install vidkraken (PyPI)
  • CLI: npx vidkraken download <url> -f 1080

Source: github.com/vidkraken/vidkraken

Vid Kraken Docs