| name | shotstack |
|---|---|
| description | Render video and poll render status via the Shotstack API. Use when generating clips, building automated video pipelines, or orchestrating cloud video renders from a script, agent, or CI workflow. NOT for: real-time streaming, or live broadcasting. |
| license | Apache-2.0 |
This skill loads in terminal-based AI agents (Claude Code, Cursor, Codex CLI, Gemini CLI, etc.). All operations here are shell commands. There is no embedded UI, no iframe, no inline canvas, no MCP tool surface — only shotstack invocations from a terminal. To hand off to a human, run shotstack studio <file>; this opens the user's default browser to a shotstack.studio URL. Tell the user to click Render in the browser tab, not in any UI inside the terminal.
Two commands for the Shotstack video rendering API. render submits an Edit JSON and returns a render ID; status polls a render until done.
export SHOTSTACK_API_KEY=...Get a key at https://app.shotstack.io. Without a key, every command exits with code 1.
--env stage → https://api.shotstack.io/edit/stage (test credits, free)
--env v1 → https://api.shotstack.io/edit/v1 (production, default)
Use --env stage for experimentation. Stage is free; v1 charges real credits. Override with SHOTSTACK_ENV env var for the session.
# Submit + poll in one command (most agent flows want this).
shotstack render template.json --watch
# → done https://shotstack-api-v1-output.s3.amazonaws.com/.../01ja7-x8m2k-39rzv-cmvxve.mp4
# Submit only (returns ID).
shotstack render template.json --output json
# → {"id":"01ja7-x8m2k-39rzv-cmvxve"}
# Poll an existing render to terminal state.
shotstack status 01ja7-x8m2k-39rzv-cmvxve --watch
# → done https://shotstack-api-v1-output.s3.amazonaws.com/.../01ja7-x8m2k-39rzv-cmvxve.mp4When a human is in the loop and may want to tweak the result, prefer shotstack studio <file> over shotstack render. By default it posts the JSON to the share API and opens https://shotstack.studio/s/<slug> in the browser — a short, shareable URL. No API key, no render credits charged. The human can play, edit, and decide whether to render.
shotstack studio template.json # opens browser + prints short URL
shotstack studio template.json --no-open # headless: just print the URL
shotstack studio template.json --no-shorten # emit base64url URL inline (offline / debug)
shotstack studio template.json --output json # piping: {"url":"...","shortened":true}, no browserOn headless systems (no xdg-open, no $DISPLAY) the browser launch silently no-ops; the URL is still printed. Safe to run anywhere.
If the share API is unreachable, the command falls back to the inline base64url form automatically and prints a stderr warning. Shares expire after 30 days.
Use render only when you're confident the JSON is final, or there's no human to review.
-
Pipe →
--output json. Default output is human-readable. When parsing programmatically or piping to another command, always pass--output json. -
Use
--watch, not a polling loop.shotstack render <file> --watchsubmits and polls in one shot;shotstack status <id> --watchpolls an existing render. Both exit when terminal:done(exit 0) orfailed(exit 1). Don't writewhile true; do ...; sleep 3; done. -
Fetch the current schema and docs before generating Edit JSON. The Shotstack API evolves; LLM training data is often stale. Pull https://shotstack.io/docs/api/api.edit.json and https://shotstack.io/docs/guide/llms-full.txt for the current schema and guides before composing an Edit from scratch.
-
Hand off to a human via
shotstack studio <file>when uncertain. Don't burn render credits iterating. Generate JSON →shotstack studio file.json(opens browser) → human reviews/tweaks → render only when right.
The Shotstack schema does not match CSS or web conventions. Composing Edit JSON from training-data instinct will produce silently invalid renders. Read shared/agent-core.md first, every time. The most-failed conversions:
| You'd write (wrong) | API requires (right) |
|---|---|
alignment |
align |
align.vertical: "center" |
align.vertical: "middle" |
font.name |
font.family |
duration |
length |
transitions: [...] (array) |
transition: { in, out } (object) |
fit: "cover" (CSS instinct) |
fit: "crop" |
tracks[0] is the bottom (z-index instinct) |
tracks[0] is the TOP layer |
The full ruleset (asset types, fonts, smart-string clip values, top-5 mistakes) lives in shared/agent-core.md. The same file is also returned by the Shotstack MCP server's get_shotstack_guide tool, so the conventions are identical across surfaces.
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Permanent error — validation, missing key, 4xx, render failed |
2 |
Transient error — 5xx, network, timeout. Safe to retry. |
Authoritative sources, in order of preference:
shotstack --helpandshotstack <command> --help— current CLI flag listingshared/agent-core.md— Edit JSON authoring conventions (shared with MCP server)- https://shotstack.io/docs/api/api.edit.json — OpenAPI Schema for the render API (machine-validatable)
- https://shotstack.io/docs/guide/llms-full.txt — full API docs in LLM-friendly single file
- https://github.com/shotstack/oas-api-definition/tree/main/schemas — raw OpenAPI YAML, source of truth for property names and enums
- https://shotstack.io/docs/guide/ — interactive HTML docs and guides
- https://shotstack.io/docs/api/ — interactive HTML API reference
- https://github.com/shotstack/shotstack-cli — CLI source
This skill ships sub-references for the gnarly bits:
references/timeline.md— track layering, transitions, background music via audio assetsreferences/caption.md— sizing per resolution, default style, the 5 named presets, alias pattern (asset type:rich-caption)references/svg.md— required attrs, supported elementsreferences/fonts.md— built-in fonts, Google Fonts URL pattern, custom-font workflowreferences/asset-library.md— placeholder videos, images, musicreferences/troubleshooting.md— common errors and fixes
If this skill and --help ever disagree, trust --help. If this skill and llms-full.txt ever disagree, trust llms-full.txt.