Screen Compositor

API

Base URL https://screen-compositor.vercel.app. JSON in, JSON out. $0.10 per second of finished video, billed per started second, up to 60 s per shot. Failed jobs cost nothing. Up to 5 jobs run at once per account.

Use it from your AI assistant

Copy these instructions, paste them into Claude, ChatGPT, Cursor or any other assistant, and add your API key. It can then run your shots for you.

Authentication

Create a key in the dashboard. Send it as a Bearer token on every call.

Authorization: Bearer sc_live_…

1 · Upload (optional)

If your files are not already at public https links, ask for an upload URL, then PUT the file to it. Use the returned ref as the input.

curl -X POST https://screen-compositor.vercel.app/api/v1/uploads -H "Authorization: Bearer $SC_KEY" \
  -H "Content-Type: application/json" -d '{"kind": "plate", "filename": "shot.mp4"}'
# -> {"ref": "storage:inputs/…/…-plate.mp4", "upload_url": "https://…", "method": "PUT"}

curl -X PUT -H "Content-Type: video/mp4" --data-binary @shot.mp4 "<upload_url>"

2 · Start a job

plate = the shot with a green screen in it; insert = the recording (video or image) to put on that screen. Both are refs or https URLs.

curl -X POST https://screen-compositor.vercel.app/api/v1/jobs -H "Authorization: Bearer $SC_KEY" \
  -H "Content-Type: application/json" -d '{
    "plate": "storage:inputs/…-plate.mp4",
    "insert": "https://example.com/app-recording.mp4",
    "options": {"insert_start_s": 0, "loop_insert": false, "matte": false},
    "webhook_url": "https://your.app/hooks/screen-compositor"
  }'
# -> 202 {"id": "…", "status": "running", …}

3 · Get the result

Poll the job (or wait for the webhook, which posts this same body). Download links are valid for one hour; fetch the job again for fresh ones.

curl https://screen-compositor.vercel.app/api/v1/jobs/<id> -H "Authorization: Bearer $SC_KEY"
# -> {"status": "done", "seconds": 4.2, "cost_cents": 50,
#     "report": {"geometry": "pin", "confidence": 1.0, …},
#     "files": {"composite.mp4": "https://…", "track.json": "https://…",
#               "cornerpin.nk": "https://…", "cornerpin_ae.txt": "https://…"}}

Balance

Credit left, in cents and in seconds of video.

curl https://screen-compositor.vercel.app/api/v1/me -H "Authorization: Bearer $SC_KEY"

What you get

  • composite.mp4: the finished shot (H.264), with the plate’s audio.
  • master.mov: ProRes 422 HQ, when the plate is 10-bit or you ask with "master": true.
  • track.json: the screen’s four corners per frame, with a per-frame confidence (ok / low).
  • cornerpin.nk and cornerpin_ae.txt: the same track for Nuke and After Effects.
  • matte.mp4: the screen matte, with "matte": true.

Errors

Errors return {"error": {"code", "message"}}: 400 bad_request, 401 unauthorized, 402 insufficient_credit, 403 account_frozen (a card dispute on one of your payments is open), 404 not_found, 429 too_many_jobs, 503 compute_unavailable. A job that can’t be processed (no green screen found, unreadable file, longer than your credit covers) ends with status failed and a plain-English error, and is not charged.