Generate viral TikTok videos automatically. Give this URL to your AI agent — it has everything it needs to create and manage videos.
tiktok. This starts the API on localhost:7841 automatically.http://localhost:7841/api/generate. You get a jobId back.GET /api/jobs/{jobId} every 2 seconds. State will be completed or failed when done (usually 1–3 minutes).GET /api/videos/{resultPath}. Ready to upload to TikTok directly.// Minimal example
{
"videoSubject": "bit-chat.me — Send Bitcoin via Telegram. Zero fees.",
"aiModel": "qwen3:4b",
"voice": "en-US-AriaNeural",
"paragraphNumber": 1,
"useMusic": true,
"color": "#FFFF00",
"subtitlesPosition": "bottom",
"customSearchTerms": ["bitcoin phone", "telegram chat", "crypto payment"],
"customPrompt": "Start with a 3-second hook. End with: visit bit-chat.me"
}
| Parameter | Type | Default | Description |
|---|---|---|---|
| videoSubject | required | – | What the video is about. Include product name, key benefit, URL. |
| aiModel | string | qwen3:4b | Ollama model for script generation. qwen3:4b is fast and local. |
| voice | string | en-US-AriaNeural | EdgeTTS voice for the narration. See voices list below. |
| paragraphNumber | int | 1 | Script length. 1 = ~15s (TikTok), 2 = ~30s, 3 = ~45s. |
| useMusic | bool | false | Add background music. Songs are pre-loaded TikTok-style tracks. |
| color | string | #FFFF00 | Subtitle hex color. Yellow is most readable on TikTok. |
| subtitlesPosition | string | bottom | "bottom", "center", or "top". |
| customSearchTerms | array | [] | Pexels search terms for background video. If empty, AI picks. |
| customPrompt | string | "" | Extra instruction added to the AI script generation prompt. |
| threads | int | 2 | Render threads. Higher = faster but more CPU. |
{ "status": "success", "jobId": "3f2a1b4c-..." }
{
"job": {
"state": "completed", // "queued" | "running" | "completed" | "failed"
"resultPath": "3f2a1b4c-....mp4",
"errorMessage": null
}
}
Poll every 2 seconds. Typical generation time: 1–3 minutes.
// GET /api/jobs → returns all jobs, newest first
{ "jobs": [{ "id": ..., "state": ..., "subject": ..., "resultPath": ... }] }
Streams the MP4 file. Download it or pipe directly into a TikTok upload script.
# Download the finished video
curl -o video.mp4 http://localhost:7841/api/videos/{resultPath}
import requests, time
BASE = "http://localhost:7841"
# 1. Generate the video
resp = requests.post(f"{BASE}/api/generate", json={
"videoSubject": "bit-chat.me — Send Bitcoin via Telegram to AI agents. Zero fees.",
"aiModel": "qwen3:4b",
"voice": "en-US-AriaNeural",
"paragraphNumber": 1,
"useMusic": True,
"color": "#FFFF00",
"subtitlesPosition": "bottom",
"customSearchTerms": ["bitcoin telegram", "crypto phone", "lightning payment"],
"customPrompt": "Open with a shocking hook. End with: visit bit-chat.me"
})
job_id = resp.json()["jobId"]
# 2. Poll until done
while True:
job = requests.get(f"{BASE}/api/jobs/{job_id}").json()["job"]
if job["state"] == "completed":
video_url = f"{BASE}/api/videos/{job['resultPath']}"
print(f"✓ Video ready: {video_url}")
break
elif job["state"] == "failed":
print(f"✗ Failed: {job['errorMessage']}")
break
time.sleep(2)
Bitcoin payments via Telegram, WhatsApp, Signal, and Email — for humans and AI agents. Built on Lightning Network. Zero fees for early users.