REST · JSON · GET only · free key
Twitter / X Video and Image Downloader API
Send an x.com or twitter.com post link and get the video and image links from that post as JSON.
Try it in the playground Read the docs
Endpoints
GET /api/download/twitter· Twitter / X: Video & images. Params:apikey, url
Example request
curl "https://knightbotapi.stream/api/download/twitter?apikey=knight&url=https://x.com/WholesomeMeme/status/2107101246687461385"
Use it in a WhatsApp bot (Node.js + Baileys)
const axios = require('axios');
const { data } = await axios.get('https://knightbotapi.stream/api/download/twitter', {
params: {
"apikey": "knight",
"url": "https://x.com/WholesomeMeme/status/2107101246687461385"
},
});
if (data.success) {
// Baileys: send the file straight to the chat
await sock.sendMessage(jid, { video: { url: data.result.download }, caption: data.result.title });
}Response
Check for HTTP 200 and success: true, then read result.download.
{
"status": 200,
"success": true,
"creator": "KnightBot",
"result": {
"title": "…",
"thumbnail": "https://…",
"download": "https://knightbotapi.stream/files/<id>.mp4"
}
}Limits
- Returns result.download for the main media, plus videos and images lists.
- Hosted files under /files/ expire after 5 minutes, so send them to the chat right away.
Authentication
Pass your key as ?apikey= or the X-API-Key header. The public demo key knight works for testing; per-key minute, hour and day limits apply, and a blocked request returns 429. See the docs for status codes.