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.
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.
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 }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.
| Field | Type | Notes |
|---|---|---|
| instruction | string, 3–2,000 characters | Required. What to show, in plain language. Director plans the steps. |
| target | { type: "url" | "tunnel", url } | Where to record. Required unless you pass environmentId. |
| environmentId | UUID | A saved product. Director signs in with its stored login, and the demo joins its Product Graph. |
| path | string | The 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. |
| authorized | boolean | Confirms you own the product or may demo it. Needed once per new domain, and on every tunnel call. |
| confirmDestructive | boolean | Lets the run take steps such as deleting or revoking, once you've confirmed them. |
| options.language | locale, such as "es" | Language for the narration and captions. |
| options.presetId | UUID | A saved recording preset: background, cursor, aspect ratio, voice and language. |
| options.watermark | boolean, default true | Burns the Screenforge mark into the render. |
| options.fps | 1–60, default 60 | Frame rate of the finished video. |
| options.scaleHeight | 120–2160 | Output height in pixels. |
| options.maxSteps | 1–60, default 40 | A 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.
| Endpoint | What it does |
|---|---|
| POST/api/demos | Start a demo. |
| GET/api/demos/:id | Status, progress, video link, verdict and failure. |
| GET/api/demos/:id/transcript | The narration, line by line with timestamps, once complete. |
| POST/api/demos/:id/question/answer | Answer the question asked before recording: { "optionId": "a" }. |
| POST/api/demos/:id/cancel | Cancel a demo that hasn't finished. |
| GET/api/demos | Recent demos, up to 100. |
| POST/api/environments | Save a product: a name, its URL and how to sign in (none, a username and password, or a captured session). |
| POST/api/environments/:id/session | Attach a captured browser session, for SSO, MFA or magic-link sign-ins. |
| POST/api/environments/:id/verify | Check the stored sign-in still works. |
| POST/api/domains/attest | Confirm once that you may record a domain. |
| POST/api/domains/verification | Get the DNS or file record that proves you own a domain. POST /api/domains/verification/check checks it. |
| GET/api/environments/:id/graph/flows | Every flow in a product's Product Graph, with its status. |
| POST/api/environments/:id/graph/flows/:flowId/reverify | Re-check a flow against the live product without recording. |
| POST/api/articles/from-flow | Write a help article from a flow: { "flowId", "channel": "help_center" | "internal_training" }. |
| POST/api/articles/:id/publish | Publish an article, and sync it to Zendesk if connected. |
| GET/api/presets | Recording 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.
| Code | Status | What to do |
|---|---|---|
| INSUFFICIENT_CREDITS | 402 | The workspace is out of minutes. Add a plan or a pack. |
| TARGET_UNREACHABLE | 400 | The URL is local or private. Record it through a tunnel. |
| DOMAIN_AUTHORIZATION_REQUIRED | 409 | A new domain. Resend with authorized: true once you've confirmed. |
| DESTRUCTIVE_ACTIONS_CONFIRMATION_REQUIRED | 409 | The plan includes a step like deleting. Resend with confirmDestructive: true to allow it. |
| CONCURRENCY_LIMIT_REACHED | 429 | Your plan's demos are all running. Retry when one finishes. |
| ENVIRONMENT_SESSION_EXPIRED | 409 | The saved sign-in no longer works. Capture a new session. |
| DOMAIN_BLOCKED | 403 | Director 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.
URL https://api.director.screenforge.co/api/mcp
Transport streamable HTTP
Auth X-API-Key: dir_… (or OAuth)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_integrationsCLI
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.
# 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 CLIlocal development
Record your dev server through a tunnel.
Demo a branch before it ships by pointing Director at a tunnel to your machine.
- 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.
- 02
Open a tunnel, for example cloudflared tunnel --url http://localhost:3000, and send its URL as a target of type tunnel.
- 03
Tunnel URLs need authorized: true on every call, and a workspace can record up to 30 tunnel demos a day.
faq