Skip to content

API: Audio and video tools

Report what a platform says about a URL

The title, the uploader, the duration, the thumbnail, the available formats and the expected size, without downloading anything. The size cap is checked against estimated_bytes, so too_large tells you the download will be refused before you submit it. A POST rather than a GET because a URL in a query string ends up in every log between here and the caller.

POST/api/v1/tools/video-download/metadata

Authentication#

Send your API key as Authorization: Bearer <key>. The X-API-Key header works too, and Authorization wins when both are present. The key needs the video:download ability.

Request body#

Content type application/json.

NameTypeRequiredDescription
urlstringyesA YouTube, Instagram, X or TikTok URL. min length 1; max length 2048

Responses#

200 OK#

Content type application/json. Schema: MediaView.

NameTypeRequiredDescription
duration_secondsnumber (double)-How long it is
estimated_bytesinteger (int64)-The expected size at best quality. The cap is checked against this for quality=best
formatsarray of MediaFormat-Every stream the platform offers
max_bytesinteger (int64)-The largest download this server allows
platformstring-Youtube, instagram, x or tiktok
smallest_bytesinteger (int64)-The expected size at quality=smallest, 0 when the platform declares none
thumbnailstring-A link to the platform's own thumbnail
titlestring-The video's title, as the platform gives it
too_largeboolean-Whether even the smallest stream is past the cap
uploaderstring-Who posted it

401 Unauthorized#

Content type application/problem+json. Error (RFC 9457 problem details). Schema: Problem.

The error follows RFC 9457. See Errors.

422 Unprocessable Content#

Content type application/problem+json. Validation failed; errors maps each field to its messages and issues lists each problem with its code, key and params. Schema: Problem.

The error follows RFC 9457. See Errors.

Any other status#

Content type application/problem+json. Error (RFC 9457 problem details). Schema: Problem.

The error follows RFC 9457. See Errors.

curl -X POST "http://localhost:3000/api/v1/tools/video-download/metadata" \
  -H "Authorization: Bearer $VUKEM_TOOLS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/video"
}'

Response examples

{
  "duration_seconds": 212,
  "estimated_bytes": 36438016,
  "formats": [
    {
      "acodec": "mp4a.40.2",
      "bitrate_kbps": 1376.5,
      "bytes": 36438016,
      "ext": "mp4",
      "id": "22",
      "resolution": "1280x720",
      "vcodec": "avc1.64001F"
    }
  ],
  "max_bytes": 524288000,
  "platform": "youtube",
  "thumbnail": "https://example.com/thumbnail.jpg",
  "title": "Never Gonna Give You Up",
  "too_large": false,
  "uploader": "Rick Astley"
}

The examples are built from the schemas, so every value is a placeholder of its type. The tables above hold the fields that carry the real values.