CoreReflex API Quickstart for Developers

A developer quickstart for the CoreReflex API: get an API key, make your first request, and turn a text prompt into a rendered cut in just a few calls.

This CoreReflex API quickstart takes you from an empty terminal to a finished, graded cut in just a few calls. CoreReflex is an agentic AI film studio, you describe a film or asset in a sentence and an autonomous Director plans the shots, generates them, scores each one, and assembles the result. The public API exposes that same pipeline as programmable infrastructure, so your app, your backend, or a scheduled job can produce video without anyone sitting in the editor.

What the CoreReflex API actually does

The API is a thin, honest surface over the production pipeline. You authenticate with an API key, submit a job, either a plain-text brief or a structured JSON manifest, and poll until the render worker hands back a finished asset. Underneath, the agentic Director runs its full loop: PLAN → PRODUCE → CRITIQUE → ASSEMBLE. It boards the shots, generates each one on Google Vertex AI, scores it against concrete quality checks, regenerates the failures, and assembles a graded cut on a deterministic render path.

Every model the pipeline uses lives on Vertex: Gemini for reasoning and planning, Veo and Kling for video (Kling carries real camera moves), Imagen for stills, Lyria for music, plus STT and TTS for voice. Planning, scoring, and editing are free, only the generation steps spend credits, so you can iterate on a plan programmatically before you ever pay for pixels.

In practice, the API lets you:

  • Generate a complete cut from a single sentence.
  • Drive the editor state as data through the JSON engine.
  • Submit, queue, and poll render jobs to completion.
  • Pull finished assets and their portable provenance trace.
  • Wire CoreReflex into agents and automations as a callable tool.

The paths shown below are illustrative. The exact routes, request shapes, and base URL live in the API reference, always check there before you wire anything up.

Step 1. Create and scope an API key

Every request authenticates with a key, so start there.

  1. Sign in to your workspace and open the API keys area.
  2. Create a new key and give it a name you will recognize later (for example, prod-backend or zapier-bridge).
  3. Scope it to only what the integration needs, least privilege keeps blast radius small if a key ever leaks.
  4. Copy the secret once and store it as an environment variable. You will not see it again.
export COREREFLEX_API_KEY="sk_live_..."
export COREREFLEX_API="https://api.corereflex.com"  # see the docs for the live base URL

Keys are meant to be rotated, named, and revoked without downtime. For the full lifecycle, including how to split read and write scopes and roll a key with zero interruption, see our guide to creating, scoping, and rotating API keys safely.

Step 2. Make your first request

Before generating anything, prove your key works with a cheap, read-only call. Authenticate with a bearer token in the Authorization header:

curl -s "$COREREFLEX_API/v1/account" \
  -H "Authorization: Bearer $COREREFLEX_API_KEY"

A healthy response returns JSON describing your account and remaining credits. If you get a 401, the key is wrong or unscoped for this route; a 403 means the key is valid but lacks the scope. The complete list of routes, parameters, and response schemas lives in the API reference, keep it open in a second tab while you build.

Step 3. Turn a prompt into a rendered cut

This is the call that earns the quickstart its name. Submit a one-sentence brief and let the Director do the rest:

curl -s -X POST "$COREREFLEX_API/v1/jobs" \
  -H "Authorization: Bearer $COREREFLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A 20-second product teaser for a minimalist running shoe, cinematic, golden hour",
    "format": "16:9",
    "duration": 20
  }'

The API accepts the brief, kicks off the PLAN step, and immediately returns a job identifier rather than blocking while the film renders. Generation is asynchronous on purpose, boarding shots, producing them on Vertex, scoring each one, and rendering a graded cut takes real time, and you do not want an HTTP connection held open for it.

What you get back

{
  "id": "job_8f3a...",
  "status": "planning",
  "created_at": "2026-06-28T17:04:00Z"
}

That id is your handle for everything that follows. Hold onto it.

Step 4. Poll the job until it is done

A job moves through the Director's stages, planning, producing, critiquing, assembling, rendering, before it lands on a terminal state. Poll the status route until it reads complete or failed:

curl -s "$COREREFLEX_API/v1/jobs/job_8f3a..." \
  -H "Authorization: Bearer $COREREFLEX_API_KEY"

A simple backoff loop is all you need in code:

async function waitForCut(jobId) {
  while (true) {
    const res = await fetch(`${process.env.COREREFLEX_API}/v1/jobs/${jobId}`, {
      headers: { Authorization: `Bearer ${process.env.COREREFLEX_API_KEY}` },
    });
    const job = await res.json();
    if (job.status === "complete") return job.asset;
    if (job.status === "failed") throw new Error(job.error);
    await new Promise((r) => setTimeout(r, 5000)); // poll every 5s
  }
}

When the job completes, the response carries the finished asset, a URL to the rendered file plus its provenance trace. For production systems, prefer webhooks over tight polling so you are not hammering the status route; either way, the patterns and status meanings are covered in detail in our walkthrough on polling render job status via the API.

Edit video as data with the JSON engine

A sentence is the fastest way in, but it is not the most precise. When you need control over individual shots, their roles, camera moves, timing, and prompts, submit a structured manifest instead of free text. The JSON engine treats your edit as data, which means you can template it, diff two versions, generate it programmatically, and check it into source control like any other artifact.

Because the render path is deterministic, the same manifest produces the same cut every time, that makes your video builds reproducible: a manifest committed today renders identically next quarter. To go deeper on the model and why it matters, read how CoreReflex lets you edit video as data with the JSON engine.

Use the SDK, MCP, and webhooks

Raw HTTP works everywhere, but you have lighter options:

  • The SDK wraps authentication, request building, and the poll-until-done loop, so generating a cut is a single typed call instead of a handful of fetches.
  • MCP exposes CoreReflex as a tool to agent frameworks. An LLM agent can plan a film, call the studio, and reason over the result without bespoke glue code.
  • Webhooks push job completions to your endpoint, which is the right pattern for queues, schedulers, and any flow where polling would be wasteful.

Layer in the platform primitives, the knowledge base for RAG, batch for bulk runs, and context cache for repeated prompts, and the API becomes the backbone of a hands-off generation pipeline rather than a one-off script.

Frequently asked questions

How do I make my first CoreReflex API call?

Create and scope an API key, export it as an environment variable, then send an authenticated GET to a read-only route like the account endpoint to confirm the key works. Once you get a 200, you are ready to POST your first generation job.

What endpoints does the CoreReflex API expose?

At a high level: authentication and account, job submission (text prompt or JSON manifest), job status for polling, asset retrieval, and the JSON engine for programmatic editor control. The reference also documents API key management, webhooks, and MCP. Check the live docs for exact paths and request schemas, since those are the source of truth.

Do API generations cost credits?

Planning, scoring, and editing are free, only the generation steps that produce actual pixels and audio on Vertex spend credits. That means you can build and validate a plan or manifest programmatically before committing to a paid render. See your account response for your current balance.

Can I call the API from an AI agent?

Yes. The MCP integration exposes CoreReflex as a tool, so an agent can plan a film, submit the job, poll for completion, and use the finished asset within its own workflow. The SDK is the simplest path for application code, while MCP fits agent frameworks.

Start building

You now have the whole loop: key, request, job, poll, asset. The fastest way to internalize it is to run it once against your own workspace and watch a sentence turn into a graded cut. You can find more developer guides in the CoreReflex developer blog as you scale your integration. When you are ready, start free with no credit card, grab a key, and make your first call today.

Share this article

Pass it to someone who is still editing by hand.

Ready to direct your own film? It is free to start — no credit card.

Start free

← All articles