Clipbait API
Turn any video into short, captioned, viral-ready vertical clips — and auto-clip live streams — from your own code, an AI agent, the CLI, or MCP. One API key powers all of them.
Grab your key from Me → Developers / API in the app. Generating clips spends your account credits, just like the UI.
Authentication
Every request is authenticated with your API key, which looks like cbk_live_…. Send it any of three ways:
# 1. Header (recommended)
curl -H "X-API-Key: cbk_live_xxx" https://app.clipbait.ai/api/clips/jobs
# 2. Bearer token
curl -H "Authorization: Bearer cbk_live_xxx" https://app.clipbait.ai/api/clips/jobs
# 3. Query param (for tools that can't set headers)
curl "https://app.clipbait.ai/api/clips/jobs?api_key=cbk_live_xxx"
Generate clips
Kicks off an async job that finds the best moments in a video and renders vertical clips with captions. Returns a jobId immediately — poll Get a job for finished clip URLs.
| Field | Type | Description |
|---|---|---|
videoUrl required | string | YouTube, Twitch VOD, Rumble, or Ganjing World URL. |
aspectRatio | string | "9:16" (default) or "16:9". |
maxClips | number | 1–20. Default 9. |
platform | string | Source platform, e.g. "youtube". Auto-detected if omitted. |
streamerName | string | Optional label shown on clips. |
curl -X POST https://app.clipbait.ai/api/clips/generate \
-H "X-API-Key: cbk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"videoUrl":"https://youtube.com/watch?v=abc","aspectRatio":"9:16","maxClips":9}'
# → { "jobId": "6650f1a2c3..." }
Get a job
Returns a job's live status and, once ready, the finished clips with their download URLs. Poll every few seconds while status is processing.
curl -H "X-API-Key: cbk_live_xxx" \
https://app.clipbait.ai/api/clips/status/6650f1a2c3
# →
{
"status": "complete", // queued | processing | complete | failed
"progress": 100,
"currentStep": "done",
"videoTitle": "...",
"clips": [
{
"hook": "You won't believe...",
"url": "https://.../clip1.mp4",
"start_sec": 124,
"end_sec": 158
}
]
}
List recent jobs
Returns your recent clip jobs with their status and clip counts.
curl -H "X-API-Key: cbk_live_xxx" https://app.clipbait.ai/api/clips/jobs
Check credits
Sanity-check your balance and plan before starting a job. 1 credit ≈ 1 minute of source video.
curl -H "X-API-Key: cbk_live_xxx" https://app.clipbait.ai/api/clips/credits
# → { "credits_remaining": 847, "credits_total": 1200, "plan": "Pro" }
Probe a video
Get a source video's duration before you clip it — useful to validate a URL or estimate credits.
| Field | Type | Description |
|---|---|---|
url required | string | Video/VOD URL. |
curl -X POST https://app.clipbait.ai/api/clips/probe-url \
-H "X-API-Key: cbk_live_xxx" -H "Content-Type: application/json" \
-d '{"url":"https://youtube.com/watch?v=abc"}'
# → { "durationSeconds": 3720, "source": "youtube" }
Live auto-clipping
Put a live Twitch stream on autopilot: Clipbait watches it and generates clips automatically as viral moments happen. Stop with POST /api/live/:id/stop. (Pro plan.)
| Field | Type | Description |
|---|---|---|
videoUrl required | string | Twitch channel or live URL. |
cadenceMin | number | Check every N minutes. Default 7. |
curl -X POST https://app.clipbait.ai/api/live/start \
-H "X-API-Key: cbk_live_xxx" -H "Content-Type: application/json" \
-d '{"videoUrl":"https://twitch.tv/somestreamer","cadenceMin":7}'
Schedule clips to social
Schedule a finished clip to post on X (Twitter) at a future time. TikTok, Facebook, and Instagram are in progress — X is the only live platform today. Check the connection with GET /api/auth/social/status; connect at /me.
| Field | Type | Description |
|---|---|---|
clipUrl required | string | Finished clip URL (from a completed job). |
platforms required | string[] | ["x"] — X/Twitter only for now. |
scheduledTime required | ISO 8601 | Future timestamp. |
caption | string | Post caption. |
curl -X POST https://app.clipbait.ai/api/scheduled-posts \
-H "X-API-Key: cbk_live_xxx" -H "Content-Type: application/json" \
-d '{"clipUrl":"https://.../clip1.mp4","platforms":["x"],"scheduledTime":"2026-05-01T15:00:00Z","caption":"..."}'
List with GET /api/scheduled-posts, cancel with DELETE /api/scheduled-posts/:id.
Errors
Errors return the appropriate HTTP status and a JSON body with a stable error code you can branch on, plus a human-readable message.
| Status | error code | Meaning |
|---|---|---|
400 | videoUrl required | Missing or invalid request body. |
401 | Invalid API key | Missing, malformed, or revoked key. |
403 | DEMO_ACCOUNT | Demo accounts can't generate clips. Sign up first. |
403 | insufficient_credits | Not enough credits / plan limit reached. Check /api/clips/credits. |
404 | not_found | Job doesn't exist or isn't owned by this account. |
500 | server_error | Temporary error. Safe to retry idempotent GETs; do not blindly retry POSTs. |
Resubmitting an identical videoUrl + aspectRatio while a recent job is still in flight or done returns that existing job with "duplicate": true — no extra credits are charged.
Connect via MCP
Give any MCP-capable agent the full Clipbait toolset: generate_clips, get_job, list_recent_clips, get_credits, start_live_autoclip, probe_video, download_clip (saves a clip to ~/Downloads), plus scheduling — list_social_accounts, schedule_post, list_scheduled_posts, cancel_scheduled_post. So an agent can clip a video and schedule the best clips to your socials in one conversation.
Claude Code (remote, one command)
npx clipbait@latest # easiest — also installs the /clipbait command
# or: claude mcp add --transport http clipbait https://app.clipbait.ai/api/mcp/cbk_live_xxx
ChatGPT / claude.ai connectors (remote URL)
Add a custom MCP server with this URL — the key is in the path, so no headers or local install needed. Nothing runs on your machine (nothing to pin or update):
https://app.clipbait.ai/api/mcp/cbk_live_xxx
Claude Desktop / Cursor / Cline / Windsurf (local)
These run MCP servers as a local process. Drop this into the client's MCP config. This is also the only way to use download_clip, since it writes to your disk:
{
"mcpServers": {
"clipbait": {
"command": "npx",
"args": ["-y", "clipbait@latest", "mcp"],
"env": { "CLIPBAIT_API_KEY": "cbk_live_xxx" }
}
}
}
Command line
Zero-install via npx (Node 18+). Fastest path — one command wires Clipbait into Claude Code (grabs your key, installs a /clipbait slash command, connects the MCP server):
npx clipbait@latest
# then in Claude Code: /clipbait https://youtube.com/watch?v=abc
Or drive it straight from your terminal:
npx clipbait login cbk_live_xxx
npx clipbait generate "https://youtube.com/watch?v=abc" --aspect 9:16 --max 9
npx clipbait status <jobId>
npx clipbait jobs
npx clipbait live "https://twitch.tv/somestreamer"
See it on npm →
Install as a Skill
For agents that support skills, install the Clipbait skill so the agent knows how to clip on its own:
npx skills add spiritscripts/clipbait-agent
Source on GitHub →
Changelog
clipbait CLI + MCP 1.6.0
- Local stdio MCP server (
npx clipbait mcp) — works in Claude Desktop, Cursor, Cline, Windsurf. - New tools:
get_creditsanddownload_clip(saves a finished clip to~/Downloads). - New endpoint
GET /api/clips/credits. /api/clips/generatenow dedupes identical recent jobs ("duplicate": true) — no double charge.
Agent surface launch
- API-key auth on every endpoint (
cbk_live_…). - Hosted MCP server at
/api/mcp;clipbaitpublished on npm;/clipbaitClaude Code slash command.