Developers & agents
Everything ReacTok does in the browser is available programmatically. Automate it from your terminal, wire it into your backend, or hand it to an AI agent. One API key powers all of them.
Overview
All the tools below sit on top of one REST API and authenticate with the same key. Pick the layer that fits how you work:
ReactokClient) for your own code.reactok commands in a terminal or script.Batch and script generation from your shell.
Embed ReacTok in your product or backend.
Structured tools for AI agents.
"Just ask in chat" playbooks for agents.
Get an API key
Create a key in the app under Settings → API access. The raw key (starts with eugc_) is shown once, so store it securely. Then export it so every tool below can read it:
export REACTOK_API_KEY=eugc_your_key_hereexport REACTOK_BASE_URL=http://localhost/easyugcai/public/api/v1Install
The CLI, SDK, and MCP server all ship in one Python package (Python 3.9+):
pip install reactok # CLI + SDK
pip install "reactok[mcp]" # also install the MCP serverVerify the CLI can see your key:
reactok usageCLI
Every command prints JSON to stdout, so it composes with jq and shell scripts. The headline command generates a video end to end and waits for the render:
# Generate a reaction video from a text prompt and print the URL
reactok generate --product 42 --method prompt \
--prompt "founder reacts to the dashboard" --hook "this changed everything" \
| jq -r .urlChoosing a method
# Reuse a saved reaction clip (skips the AI render; still costs 1 credit)
reactok generate --product 42 --method reuse --reaction 7
# Animate an avatar from a TikTok reference clip
reactok generate --product 42 --method motion --avatar 3 \
--reference "https://www.tiktok.com/@user/video/123" --hook "wait for it"Preview, then approve
Review the AI reaction before the app demo is stitched on:
reactok generate --product 42 --method prompt --prompt "..." --mode preview
# note the job id, then:
reactok videos job <job_id> --stop-on-preview # wait until preview_ready
reactok reactions save <job_id> # (optional) keep this reaction
reactok videos approve <job_id> # finalize into a video
reactok videos regenerate <job_id> # or re-roll the reactionManage assets & publish
reactok products list | jq
reactok products create "Cal AI" --description "AI calorie tracking"
reactok avatars create --prompt "friendly founder in her 20s"
reactok videos list
reactok social connections # find a provider + account ids
reactok social publish --provider postiz --video 123 \
--accounts acc_1,acc_2 --caption "new drop"
reactok social delete <post_id> # cancel/delete a postreactok --help (or reactok <group> --help) for the full command list. Full request/response details are in the API reference.Python SDK
Use ReactokClient to embed generation in your own code. It reads REACTOK_API_KEY / REACTOK_BASE_URL from the environment (or pass them in), polls jobs for you, and raises typed errors.
from reactok import ReactokClient
rt = ReactokClient() # or ReactokClient(api_key="eugc_...")
# One-shot: generate and wait for the finished video
video = rt.generate_video(
product_id=42,
method="prompt",
prompt="founder reacts to the dashboard",
hook_text="this changed everything",
)
print(video["url"])
# Preview / approve flow
job = rt.preview_video(product_id=42, method="prompt", prompt="...")
rt.save_reaction(job["job_id"]) # optional
video = rt.approve_and_wait(job["job_id"])MCP server (for AI agents)
The Model Context Protocol server exposes ReacTok as tools an agent can call — generate, preview/approve, manage products and avatars, publish and delete posts, and more. Install the MCP extra (pip install "reactok[mcp]"), then add it to your agent's MCP config.
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
{
"mcpServers": {
"reactok": {
"command": "reactok-mcp",
"env": { "REACTOK_API_KEY": "eugc_your_key_here" }
}
}
}Claude Desktop
Add the same block to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude.
Once connected, just ask: "Make a ReacTok reaction video for product 42 about an excited founder, then show me the preview."
Agent skills
Skills are portable instruction packs that teach an agent to drive the reactok CLI — the same capability as the MCP server, delivered as "just ask in chat" playbooks. They need the CLI installed and REACTOK_API_KEY set.
reactok-create-video— generate a video and return its URL.reactok-review-reaction— preview, then approve / regenerate / save.reactok-publish-video— publish, schedule, or delete a post.reactok-manage-assets— full CRUD over products, avatars, reactions, and videos.
Install via the skills registry (cross-agent):
npx skills add reactok/reactokOr copy the skill folders into your agent's skills directory:
# Cursor (project-scoped)
cp -r skills/reactok-* .cursor/skills/
# Claude Code / Claude Desktop
cp -r skills/reactok-* ~/.claude/skills/