Setup · API and commands · Integrations · Comparisons
agentic-clip is an open-source video rendering SDK for developers who use Remotion, Shotstack, or Creatomate. It validates clip specifications and previews vendor requests before live rendering. It also uploads local files to Cloudflare R2 or Cloudflare Stream.
npm install agentic-clipNode.js 18 or later is required. TypeScript declarations are included.
Save this as preview.mjs, then run node preview.mjs.
import { renderClip } from 'agentic-clip';
const preview = await renderClip({
title: 'Hello',
scenes: [{ texts: [{ text: 'Hello', lengthSec: 2 }], lengthSec: 2 }],
}, { vendor: 'shotstack', dryRun: true });
console.log(JSON.stringify(preview, null, 2));Success prints dryRun: true, vendor: "shotstack", and an edit with a two-second text clip. No credentials or network calls are needed.
For a live Shotstack render, export SHOTSTACK_API_KEY and change dryRun to false after reviewing the preview.
The SDK polls until completion and returns a render id with a url when available.
Environment variables must exist in the process; the package does not load .env files.
Clip spec -> validation -> dry-run preview
-> render adapter -> poll -> id / URL / local file
Local file -> upload -> Cloudflare R2 or Cloudflare Stream
Direct Remotion and Shotstack APIs expose different render inputs. agentic-clip adds one entry point, request previews, and file upload helpers. Vendor behavior still differs; a clip specification does not produce identical output across adapters.
Scope checked on 2026-10-14 against Remotion renderer documentation and Shotstack edit concepts.
| Surface | agentic-clip | Remotion renderer | Shotstack API |
|---|---|---|---|
| Scope | Adapter orchestration | Programmatic video rendering | Cloud video editing |
| Render configuration | Clip spec plus vendor options | Composition and render options | JSON timeline, tracks, clips |
| Execution | Node.js; vendor-dependent rendering | Server-side rendering | Cloud API |
| Integration | Status | Implemented path |
|---|---|---|
| Remotion | ✓ | Bundle/select/render an existing composition |
| Shotstack | ✓ | Submit edit; poll render status |
| Creatomate | ✓ | Submit template modifications; poll status |
| Cloudflare R2 | ✓ | Signed S3-compatible PUT |
| Cloudflare Stream | ✓ | Direct upload; optional playback links |
The code contains three render adapters and two upload integrations. These are implemented paths, not scaffolds. Tests use mocks or injected functions. This rewrite includes no credential-backed verification of the five integrations.
- Content developers: preview Shotstack timeline JSON before a paid render.
- Template teams: fill Creatomate title and scene-text modifications from a script.
- React video developers: render an existing Remotion composition on their own machine.
- Media operators: upload local MP4 files to Cloudflare R2 or Cloudflare Stream.
- Validation: check titles, aspect ratios, scene lengths, and optional duration caps.
- Preview: inspect a vendor request before live rendering.
- Polling: wait for Shotstack or Creatomate completion.
- Storage: upload local files with the storage setup.
- Cost records: track render units in the current process, without invoice reconciliation.
The Node.js SDK exports renderClip, clipStatus, parseClipSpec, request builders, adapter classes, and upload helpers.
It also re-exports shared agentic-core utilities.
The command-line interface (CLI) provides render, status, upload, costs, and mcp.
Use --help or -h for usage, and --version or -V for the version.
npx agentic-clip render --spec-file clip.json --vendor shotstack
npx agentic-clip status --vendor shotstack --id YOUR_RENDER_ID
npx agentic-clip upload --file clip.mp4 --to r2
npx agentic-clip costsThe Model Context Protocol (MCP) server exposes four tools: render_clip, clip_status, upload_clip, and get_cost_report.
Start it with npx agentic-clip mcp or npx agentic-clip-mcp.
{"mcpServers":{"agentic-clip":{"command":"npx","args":["-y","agentic-clip","mcp"]}}}A Worker source entry provides GET /health and preview-only POST /render. It never performs live rendering.
The package does not provide a managed Worker deployment.
- Dry run is the default. Live rendering requires
dryRun: falseor CLI--live. - The schema accepts 1–20 scenes, each at most 60 seconds. Text timing is not checked against scene boundaries.
- Creatomate maps title, scene text, and audio. It does not map scene image, video, timing, or aspect fields.
- Remotion uses your composition and
inputProps; it does not build a composition from clip scenes. - CLI Remotion input properties contain only the title. SDK callers can provide their own properties.
- Remote polling defaults to two-second intervals and a ten-minute timeout. HTTP render requests default to 30-second timeouts without retries.
- Remotion status returns
donewithout checking the file. Remote status calls query the vendor. - CLI
--storeuploads only local render files. It does not download remote render URLs. - R2 returns an
r2://identifier, not a public playback URL. Stream upload does not wait for video processing. - Cost records live in memory. A separate CLI invocation starts a new report; records do not represent vendor bills.
- Shotstack rendering: export
SHOTSTACK_API_KEY; preview first, then use--vendor shotstack --live. - Creatomate templates: export
CREATOMATE_API_KEY; pass--template-idand use--vendor creatomate. - Remotion local rendering: pass
--serve-urlor--entry-point, plus--compositionand--out. - Cloudflare R2 uploads: export
R2_ACCOUNT_ID,R2_ACCESS_KEY_ID,R2_SECRET_ACCESS_KEY, andR2_BUCKET. - Cloudflare Stream uploads: export
STREAM_ACCOUNT_IDandSTREAM_API_TOKEN. SetSTREAM_CUSTOMER_SUBDOMAINfor playback links.
Version 0.1.0 is an early release. APIs and vendor mappings can change before 1.0. Use GitHub issues for support. Public case studies are not yet published in this repository.
agentic-clip is a Node.js video rendering SDK with CLI and MCP interfaces. It wraps three render adapters and two upload paths.
agentic-clip has mocked adapter tests for the implemented integrations. Live credential-backed verification was not performed for this rewrite.
agentic-clip runs in your process. Remotion runs locally; Shotstack and Creatomate use your vendor accounts.
agentic-clip wraps Remotion rendering and exposes other vendor adapters. Remotion supplies the composition renderer; you still create the composition.
agentic-clip converts a limited clip specification into Shotstack edit JSON. Shotstack provides the cloud rendering API and its wider edit format.
agentic-clip previews explicit Shotstack requests without credentials. Creatomate previews need a template ID, and Remotion previews need configuration.
agentic-clip reads process environment variables. Export them before starting the process or load them with your application.
agentic-clip uploads a local render file when CLI --store r2 or --store stream is set. Remote URLs need a separate download.
agentic-clip stores render cost records in process memory. Vendor invoices and earlier CLI sessions are not reconciled.
Follow the fleet contribution guide.
MIT.