The CoreReflex SDK turns the agentic film studio into a set of typed methods you can call from your own apps, script a video, generate an image, narrate with a brand voice, all in code. Instead of clicking through an editor, your backend describes what it wants and gets back a finished, graded cut with a provenance trace attached, this is how teams move from making one video at a time to running creative as infrastructure.
What the CoreReflex SDK is, and what it wraps
The SDK is a typed client over the CoreReflex public API. Everything the studio can do, board shots through the agentic Director, run the per-shot quality gate, assemble a timeline, generate images in Image Studio, write copy with {{slot}} templates, narrate with a named HD voice, is reachable as a method. Underneath, it drives the same Director loop you would use by hand: PLAN, PRODUCE, CRITIQUE, ASSEMBLE.
Two properties make it suited to automation:
- Planning, scoring, and editing are free. Only generation spends credits. Your code can plan and score aggressively, then commit credits only when a shot is worth rendering.
- The whole stack runs on Google Vertex AI. Gemini, Veo, Kling, Lyria, Imagen, plus embeddings, STT, and TTS, behind one client, you are not stitching five vendor SDKs together.
If you have not picked up an API key yet, start with the API keys and auth guide before you write a line of code.
Install, authenticate, and make your first call
You authenticate with an API key scoped to your workspace. Keep it server-side; the SDK is built to run from your backend, a worker, or a scheduled job, never in a browser bundle.
A first call looks like creating a film from a one-line brief, then waiting for the job. Something like client.films.create({ brief: "30s launch teaser for our running shoe", aspect: "9:16" }) kicks off the Director, and client.jobs.wait(jobId) blocks until the cut is assembled. The response hands back the asset URL, the per-shot scores, and the trace.
For a guided walk-through with a runnable example, the SDK quickstart takes you from install to first render, and the API quickstart for developers covers the raw HTTP surface if you would rather call it directly.
Describe a film as a JSON recipe
The most powerful pattern is not calling one method at a time. It is handing the Director a JSON recipe. CoreReflex runs a programmable JSON engine over editor state, so a recipe is a portable document that describes the whole job: the brief, the boarded shots (role, camera move, prompt), brand kit, voice, music, aspect ratios, and the quality thresholds each shot must clear.
Because the recipe is just data, you can:
- Template it. Store one recipe per format, a vertical ad, a 16:9 explainer, a square social cut, and fill in product fields at runtime.
- Diff and version it. Recipes live in your repo next to the code that generates them.
- Generate it. Have a model produce the recipe from a content brief, then validate it against the schema before you spend a single credit.
This is the same engine that powers scheduled, hands-off runs. Once a recipe is solid, you can hand it to the scheduler covered in scheduling hands-off content generation and let it produce on a cadence without anyone touching the editor.
Running batch jobs at scale
Batch is where the SDK earns its keep. Pass a list of recipes, one per SKU, per market, per audience, and the SDK fans them out as a batch job. Each item runs the full Director loop independently, so a soft or off-brief shot in one video never blocks the others.
A practical batch pattern looks like this:
- Pull your source rows (products, listings, episodes) from your own database.
- Map each row onto a recipe template, filling slots like product name, key feature, and price.
- Submit the batch and capture the returned job IDs.
- Poll the batch status, or register a webhook, and collect finished assets as they land.
Because scoring and planning are free, you can run a dry plan across the whole batch first, see how many shots the Director boards, estimate credits, and only then approve the generate step. Teams that run this regularly tend to formalize it into a repeatable video production line, where the same batch shape ships every week. It is the backbone of our wider automation playbook.
Handling long-running renders
Generation and rendering are asynchronous by nature, a multi-shot film with a 4K upscale pass is not an HTTP request you hold open. The SDK models this with jobs.
- Every create call returns a job handle immediately.
client.jobs.wait()is a convenience that polls with backoff until the job reaches a terminal state.- For production, prefer webhooks: register an endpoint and the platform calls you when a job succeeds, fails, or is dead-lettered.
The render itself runs on a deterministic path, a real Remotion render-worker claims the job, renders, uploads to your storage, and writes an asset row, with retry and a dead-letter queue behind it. The same manifest renders to the same cut, every time, which is exactly the property you want when a job is driven by code instead of a human watching a progress bar.
Provenance you can replay
Every generation the SDK triggers carries a portable trace: the model used, the prompt, the parameters, and the quality-gate score for each shot. That trace travels with the asset, so an automated pipeline is just as auditable as hand-made work.
This matters for three reasons:
- Reproducibility. Replay a trace and you get the same result, useful for regression-testing your recipes.
- Review. Hand a stakeholder the score breakdown instead of "trust me, the AI did it."
- Governance. When creative is generated at volume. You can prove what produced each frame.
Where the SDK fits in your stack
Reach for the SDK when creative needs to live inside a larger system: a marketplace that generates a listing video on upload, a CMS that renders a social cut when an article publishes, or an internal tool that lets non-technical teammates trigger branded videos from a form. For agent-driven workflows, you can also expose CoreReflex to an LLM directly, connect Claude to CoreReflex over MCP and let a model plan and trigger renders through the same primitives the SDK uses.
The full method reference, schemas, and webhook payloads live in the developer docs, and you can see how programmatic usage maps to plans on the pricing page.
Frequently asked questions
What languages does the CoreReflex SDK support?
The SDK is a typed client over the public API, so it fits naturally into JavaScript and TypeScript backends. Because everything is built on the documented HTTP API, any language that can make authenticated requests can drive the same flows, the SDK simply saves you from hand-writing the request and polling logic.
Can the SDK run batch jobs?
Yes. Submit a list of JSON recipes and the SDK fans them out as a batch, running each film through the full Director loop independently. A failed or off-brief shot in one item is selectively regenerated without restarting the rest of the batch, which is what makes large per-SKU or per-market runs practical.
How does the SDK handle long-running renders?
Renders are asynchronous. Every create call returns a job handle, and you either poll with the built-in wait helper or register a webhook to be notified on completion. The render runs on a deterministic render-worker with retry and a dead-letter queue, so the same manifest always produces the same cut.
Does automated output keep a provenance trace?
Every generation carries the model, prompt, parameters, and per-shot quality score. The trace is portable and replayable, so anything your code produces is as auditable and reproducible as work made by hand in the studio.
Start scripting your creative
If creative is a bottleneck because it only happens when a human opens an editor, the SDK removes the human from the loop without removing the quality bar. Plan and score for free, spend credits only on shots worth rendering, and collect finished, traceable cuts straight from your own backend. Start free with no credit card and make your first scripted render today.