# ansi — download videos by link > API for AI agents: YouTube, TikTok (incl. links from modded apps), Instagram, VK, Twitch, Pinterest, Rutube and 1800+ sites. > Send `X-Lang: ru` to get error messages in Russian (English by default). ## Get a key (two requests, email access required) 1. POST https://ansi.website/api/v1/auth/register {"email": "...", "password": "at least 8 characters"} -> an email with a 6-digit code is sent (valid for 15 min) 2. POST https://ansi.website/api/v1/auth/verify {"email": "...", "code": "123456"} -> {"api_key": "ansi_...", "session_token": "sess_...", "daily_limit": N} No code? POST https://ansi.website/api/v1/auth/resend {"email"}. Disposable mailboxes are rejected. Existing account: POST https://ansi.website/api/v1/auth/login {"email", "password"} -> session_token, then POST https://ansi.website/api/v1/account/keys {"name": "..."} with Authorization: Bearer Pass the key as: Authorization: Bearer (or X-API-Key, or ?api_key=) Without a key the REST API works anonymously: 40 requests/hour per IP. With an account: 300/day for all its keys. Requests that fail through no fault of yours (no link found, site temporarily refusing, no subtitles) are not counted. Keys can be created/revoked only with the session_token, not with an API key. ## Errors Always JSON {"error": "human-readable message"}. 401 — no/invalid key, 403 — not allowed, 404 — not found/expired, 422 — bad input or the video can't be processed, 429 — limit reached (see Retry-After), 503 — site temporarily refusing, retry later. ## MCP (recommended for agents) URL: https://ansi.website/mcp (Streamable HTTP), header Authorization: Bearer Tools: get_video_info(url), download_video(url, quality, format), get_direct_links(url, quality, format), get_transcript(url, lang, format) ## Terminal curl -s https://ansi.website/me -H "Authorization: Bearer " -> colored profile: usage bar, 7-day chart, keys (?plain=1 — no colors) ## REST POST https://ansi.website/api/v1/info {"url": "..."} -> also "details": description, tags, views, likes, chapters, subtitle languages POST https://ansi.website/api/v1/info/batch {"urls": ["...", "..."]} -> up to 10 links, each counts as one request POST https://ansi.website/api/v1/transcript {"url": "...", "lang": "en", "format": "text|segments|srt|vtt"} -> subtitles or auto-captions WITHOUT downloading the video (great for summarizing) GET https://ansi.website/api/v1/transcript?url=...&format=srt&api_key=... -> plain text body POST https://ansi.website/api/v1/jobs {"url": "...", "quality": "1080", "format": "mp4", "webhook_url": "https://..."} -> {"job_id", "status": "queued"}; GET https://ansi.website/api/v1/jobs/ until status = done | error; webhook_url (optional, public http/https address) receives the same JSON via POST when the job finishes POST https://ansi.website/api/v1/download {"url": "...", "quality": "720", "format": "mp4", "mode": "link"} quality: best|2160|1440|1080|720|480|360|240 format: mp4|webm|mp3|m4a mode: link -> {"download_url": "...", "filename": "...", "size_bytes": N, "expires_in_sec": N} file -> the file itself; direct -> direct CDN links, no proxying GET https://ansi.website/api/v1/download?url=...&quality=720&format=mp4&api_key=... -> file (curl -OJ) GET https://ansi.website/api/v1/account -> limit, today's usage, keys OpenAPI docs: https://ansi.website/docs , https://ansi.website/openapi.json