New: a fresh demo video from every deploy, called from your CIRelease demos

Record demos from your code or your agent.

One REST API and an MCP server with the same tools: record demos, save sign-ins, read the Product Graph and publish help articles. Here's every field, result and error.

basics
Base URL   https://api.director.screenforge.co/api
Auth       X-API-Key: dir_…   (or Authorization: Bearer dir_…)
Keys       https://app.director.screenforge.co/api-keys
Success    { "message": "…", "data": { … } }
Errors     { "code": "…", "message": "…", "remediation": { … } }

record a demo

Start it, then poll until it's done.

A demo is a job. The first call returns its id straight away, and the status tells you when to ask again.

1. start
curl -X POST https://api.director.screenforge.co/api/demos \
  -H "X-API-Key: $DIRECTOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target": { "type": "url", "url": "https://app.example.com" },
    "instruction": "Create a project, then invite a teammate.",
    "authorized": true,
    "options": { "language": "en" }
  }'

# → data: { "id": "…", "status": "queued", "pollAfterSeconds": 15 }
2. poll
curl https://api.director.screenforge.co/api/demos/$DEMO_ID \
  -H "X-API-Key: $DIRECTOR_API_KEY"

# → data: {
#     "status": "complete",
#     "videoUrl": "https://…",        signed, valid for an hour
#     "outcome": { "goalMet": true, "stepsCompleted": 6, … },
#     "pollAfterSeconds": null
#   }

request

POST /api/demos fields.

Only instruction is always required. Send a target, an environmentId, or both.

Request fields for POST /api/demos
FieldTypeNotes
instructionstring, 3–2,000 charactersRequired. What to show, in plain language. Director plans the steps.
target{ type: "url" | "tunnel", url }Where to record. Required unless you pass environmentId.
environmentIdUUIDA saved product. Director signs in with its stored login, and the demo joins its Product Graph.
pathstringThe page to start on, resolved against the environment's URL.
credentials{ username, password }A test account for this run. Send literal values, never production ones.
authorizedbooleanConfirms you own the product or may demo it. Needed once per new domain, and on every tunnel call.
confirmDestructivebooleanLets the run take steps such as deleting or revoking, once you've confirmed them.
options.languagelocale, such as "es"Language for the narration and captions.
options.presetIdUUIDA saved recording preset: background, cursor, aspect ratio, voice and language.
options.watermarkboolean, default trueBurns the Screenforge mark into the render.
options.fps1–60, default 60Frame rate of the finished video.
options.scaleHeight120–2160Output height in pixels.
options.maxSteps1–60, default 40A step budget, so a run ends instead of wandering.

result

What GET /api/demos/:id returns.

Agents read the verdict and the remediation to decide whether to retry before they report back.

status
queued, running, complete or failed.
pollAfterSeconds
How long to wait before asking again. null once the demo has finished.
videoUrl
A signed link to the finished MP4, valid for an hour. Read the demo again for a fresh one.
outcome
goalMet, stepsCompleted and whatWasShown, plus stoppedBefore when the run halted ahead of a step it wasn't cleared to take.
question
A choice Director needs before it records. Answer it, or the recommended option is used.
failure
code, message and remediation.action, such as use_tunnel, provide_credentials, refine_instruction or upgrade_plan, with a hint.

endpoints

The rest of the API.

Everything below takes the same API key. Product Graph routes are scoped to an environment.

Director REST endpoints
EndpointWhat it does
POST/api/demosStart a demo.
GET/api/demos/:idStatus, progress, video link, verdict and failure.
GET/api/demos/:id/transcriptThe narration, line by line with timestamps, once complete.
POST/api/demos/:id/question/answerAnswer the question asked before recording: { "optionId": "a" }.
POST/api/demos/:id/cancelCancel a demo that hasn't finished.
GET/api/demosRecent demos, up to 100.
POST/api/environmentsSave a product: a name, its URL and how to sign in (none, a username and password, or a captured session).
POST/api/environments/:id/sessionAttach a captured browser session, for SSO, MFA or magic-link sign-ins.
POST/api/environments/:id/verifyCheck the stored sign-in still works.
POST/api/domains/attestConfirm once that you may record a domain.
POST/api/domains/verificationGet the DNS or file record that proves you own a domain. POST /api/domains/verification/check checks it.
GET/api/environments/:id/graph/flowsEvery flow in a product's Product Graph, with its status.
POST/api/environments/:id/graph/flows/:flowId/reverifyRe-check a flow against the live product without recording.
POST/api/articles/from-flowWrite a help article from a flow: { "flowId", "channel": "help_center" | "internal_training" }.
POST/api/articles/:id/publishPublish an article, and sync it to Zendesk if connected.
GET/api/presetsRecording presets. GET /api/presets/voices lists the narration voices.

errors

Errors say what to do next.

Each error has a stable code, and most carry a remediation your agent can act on.

Common Director API errors
CodeStatusWhat to do
INSUFFICIENT_CREDITS402The workspace is out of minutes. Add a plan or a pack.
TARGET_UNREACHABLE400The URL is local or private. Record it through a tunnel.
DOMAIN_AUTHORIZATION_REQUIRED409A new domain. Resend with authorized: true once you've confirmed.
DESTRUCTIVE_ACTIONS_CONFIRMATION_REQUIRED409The plan includes a step like deleting. Resend with confirmDestructive: true to allow it.
CONCURRENCY_LIMIT_REACHED429Your plan's demos are all running. Retry when one finishes.
ENVIRONMENT_SESSION_EXPIRED409The saved sign-in no longer works. Capture a new session.
DOMAIN_BLOCKED403Director doesn't record this domain.

MCP server

The same tools, for your agent.

Point any client that supports remote MCP servers at this URL. Send an API key, or sign in with OAuth if your client offers it.

connection
URL        https://api.director.screenforge.co/api/mcp
Transport  streamable HTTP
Auth       X-API-Key: dir_…  (or OAuth)
tools
Demos         create_demo, get_demo_status, wait_for_demo, answer_demo_question,
              get_demo_transcript, cancel_demo, list_demos
Products      create_environment, get_environment, update_environment,
              list_environments, verify_environment, create_login_code, delete_session
Product Graph list_graph_flows, get_graph_flow, reverify_flow
Domains       list_domains, attest_domain, start_domain_verification,
              check_domain_verification
Articles      create_article_from_flow, create_article, update_article, get_article,
              list_articles, regenerate_article, publish_article, unpublish_article,
              resync_article, delete_article, list_article_categories,
              create_article_category, create_article_section
Presets       list_recording_presets, create_recording_preset, update_recording_preset
Integrations  list_integrations

CLI

Set up agents and capture sign-ins.

The CLI connects Director to Claude Code, Cursor or Claude Desktop, and captures a browser sign-in for products that use SSO or MFA. It needs Node 20 or later.

terminal
# connect your coding agent (signs you in and creates a key)
npx @screenforge/director-cli mcp --create-key --agent claude-code

# or install it
curl -fsSL https://screenforge.co/director/cli/install.sh | sh

director session DIR-XXXX-XXXX-XXXX   # capture a sign-in with a login code
director doctor                       # check this machine is set up
director update                       # update the CLI

local development

Record your dev server through a tunnel.

Demo a branch before it ships by pointing Director at a tunnel to your machine.

  1. 01

    Director records in the cloud, so it can't reach localhost or private network addresses. Those requests return TARGET_UNREACHABLE with remediation use_tunnel.

  2. 02

    Open a tunnel, for example cloudflared tunnel --url http://localhost:3000, and send its URL as a target of type tunnel.

  3. 03

    Tunnel URLs need authorized: true on every call, and a workspace can record up to 30 tunnel demos a day.

faq

Questions, answered.

  • No. Poll GET /api/demos/:id, waiting pollAfterSeconds between calls. Over MCP, wait_for_demo waits up to three minutes for you. Your team can also get a Slack message when a demo finishes.