KnightBot API Documentation

Everything you need to call the KnightBot API.

Introduction

A public REST API for media downloads, AI chat, lyrics, screenshots, speech, QR codes, image cards and image effects. Every endpoint is a plain GET request. Downloaders return JSON; card and image-effect routes return a PNG by default.


https://knightbotapi.stream

Quick start

Send one request with your key.

Authentication

Pass your key on every request, either way works.

Query?apikey=knight
HeaderX-API-Key: knight
Missing keyReturns 401
Disabled or expiredReturns 403

Responses

Check for HTTP 200 and success: true, then use result.

{
  "success": true,
  "result": { "download": "/files/a1b2.mp4" }
}

Universal download

One route for any supported link: /api/download?url=…&type=mp3|mp4. The six main sites use their own fast downloaders; every other supported site is handled automatically. SoundCloud, Mixcloud and Bandcamp always return MP3. Same limits as YouTube: max 10 minutes and 100MB. Direct file links and unknown sites return 400.

YouTubehttps://youtu.be/DTbfw8_SMmI?si=YPUgUhtZSSYvdZ27
TikTokhttps://vt.tiktok.com/ZSbF9V9Eh/
Instagramhttps://www.instagram.com/reel/DdviNYUpmsw/
Facebookhttps://www.facebook.com/share/r/19axMcades/
Twitter / Xhttps://x.com/WholesomeMeme/status/2107101246687461385
Pinteresthttps://pin.it/<id>
SoundCloudhttps://soundcloud.com/forss/flickermood
Reddithttps://www.reddit.com/r/<sub>/comments/<id>/<title>/
Twitch clipshttps://clips.twitch.tv/<clip-slug>
Vimeohttps://vimeo.com/<id>
Dailymotionhttps://www.dailymotion.com/video/<id>
Bilibilihttps://www.bilibili.com/video/BV<id>
Blueskyhttps://bsky.app/profile/<user>/post/<id>
Snapchat Spotlighthttps://www.snapchat.com/spotlight/<id>
Tumblrhttps://<user>.tumblr.com/post/<id>
Streamablehttps://streamable.com/<id>
Mixcloudhttps://www.mixcloud.com/<user>/<show>/
Bandcamphttps://<artist>.bandcamp.com/track/<track>
Likeehttps://likee.video/@<user>/video/<id>
Douyinhttps://www.douyin.com/video/<id>
9GAGhttps://9gag.com/gag/<id>
Imgurhttps://imgur.com/<id>
LinkedInhttps://www.linkedin.com/posts/<post-slug>
Google Drivehttps://drive.google.com/file/d/<id>/view

Plus 1000+ more sites.

Image cards

Card routes render PNG on the server (Satori). Default response is the image itself so a bot can send the URL as a photo. Add json=1 for the usual { success, result.download } (file expires in 5 minutes).

Welcome/api/card/welcome · name, group, pic, count, theme=aurora neon ticket split royal comic ocean light
Goodbye/api/card/goodbye · same params & themes as welcome
Rank/api/card/rank · xp / needed progress bar
Quote/api/card/quote · Hindi/Hinglish via Noto Devanagari
Wanted/api/card/wanted · photo, crime, reward
Jail/api/card/jail · photo, crime, sentence, cell, number
YouTube/api/yt/card?url= · now-playing card
Fake tweet / comment/api/fake/tweet · /api/fake/ytcomment

Image effects

All routes need a public url. PNG by default (max 8MB / 40MP in). Add json=1 for { success, result.download }. ascii and colors always return JSON. Upscale is lanczos resize, not AI.

Blur/api/img/blur · level 1–100
Pixelate/api/img/pixelate · size 2–100
Grayscale/api/img/grayscale
Circle/api/img/circle · size 64–2048
Upscale/api/img/upscale · scale 2–4, max 4096px
Meme/api/img/meme · top, bottom
ASCII/api/img/ascii · width 20–160 · JSON
Colors/api/img/colors · count 2–12 · hex / rgb / percent JSON
Remove BG/api/img/removebg · first call downloads the model and can be slow

Limits & files

  • Per-key minute / hour / day caps return 429.
  • Check /api/usage?apikey=… any time.
  • Hosted files under /files/ expire after 5 minutes.
  • Free YouTube: max 10 minutes, 100MB, and up to 720p. 1080p / best need a premium / custom key.

Status codes

200Successsuccess is true; read result.
400Bad requestMissing or invalid parameter.
401UnauthorizedKey missing or unknown.
403ForbiddenKey disabled, expired, or free-tier limit.
404Not foundNothing matched.
429Rate limitMinute, hour or day cap hit.
500Server errorFailed handling the request.
502Upstream failedSource returned nothing.

FAQ

Which HTTP methods are supported?

GET only.

How long can an AI prompt be?

The q parameter is limited to 800 characters.

My download link stopped working

Hosted files expire after 5 minutes. Request it again.