REST

The REST endpoints on api.parallelsandbox.com and log.parallelsandbox.com, for apps, scripts and what agents have no tool for, such as fresh URLs for a box's screenshots and recordings.

For the web and desktop apps, for anything that is not an agent, and for what agents have no MCP tool for, such as fresh URLs for a box's screenshots and recordings (GET /v1/boxes/{id}/media). Same credential, Authorization: Bearer <token>, where the token is an account's psbx_ API key or a connected client's OAuth access token (one hour; where keys come from), on https://api.parallelsandbox.com unless noted.

Endpoint Purpose
/v1/auth/github GitHub login
/v1/keys create, list and revoke API keys; from the app's signed-in session only (an API key or OAuth token cannot manage keys); POST makes a key for tools without OAuth, and keys made by OAuth sign-in are not listed
/v1/boxes list (newest started first, 200 at most; ?archived=1 adds archived boxes, ?all=1 stopped ones), start (goal is optional here), inspect (an archived box has status archived) and stop boxes; the list carries sceneUrl, webUrl, each web service's url, goal, agent, screenInUse, screenActive and posterUrl (Which conversation is using a box), and designs and stage as in sandbox_status. Stopping a box archives it and keeps its waiting review; a deleted box still carries its newest posterUrl, but deleting it closes its card, and the card's picture can no longer be had
DELETE /v1/boxes/{id} stop the box as sandbox_stop and Shut down in the app do: it is archived and kept 30 days, and stopping an archived box deletes it for good. Returns {ok, id, status, note}, status being stopping while it is archived, with keptUntil, or terminated when it was deleted (it could not be archived, or it was archived already); unsavedWork ([{path, why}]), checked before a running box stops, lists what in /work is neither pushed to a git remote nor kept in a persistent folder; linkedFrom lists the boxes that link to it
PUT /v1/boxes/{id}/orientation set this ready box's AI screen to portrait or landscape; requires a box image with screen-orientation and returns its new orientation
PUT /v1/boxes/{id}/resident body {"resident": true} makes the box resident: the idle rules never freeze or archive it, and if it is frozen anyway (credits ran out, its host was drained) it is woken on the next check (within a minute, retried every 5 minutes until it is awake). It bills box time the whole time it is awake. {"resident": false} turns this off. Returns the box's status, with resident: true while it is on. Not available through a review share link
POST /v1/boxes/{id}/review/done mark the box's waiting sandbox_review card done, as the app does; GET /v1/boxes shows the waiting card as review
POST /v1/boxes/{id}/wake the person has the box open: wakes it if frozen (restores it if archived), its phones with it (counts as use), and counts the box as in use for 10 minutes. Body {"presence": true} (the app sends it every minute while the box is open) is not counted as use, except that waking a frozen box always is. Answers within about 8 seconds: 200 with the box's status once it and its phones are back ({status} for presence), 202 {status, phase: "box" or "phone", phone} while it is still waking (call again in a few seconds); 503 {error, reason} while no host has room yet; 402 when the account has no credits
POST /v1/boxes/{id}/wake-ahead the app, when the person opens it, for the two newest reviews waiting for them: wakes a frozen box that has a review waiting, its phones with it, without counting as a use (lastUsedAt and stopsAt do not move), and keeps it awake 10 minutes (freeze.blockedBy woken_ahead). An awake box is left as it is. Answers like /wake with presence; 409 when the box has no waiting review or has ended, 429 when two boxes of the account were already woken ahead in the last 10 minutes. A review share link cannot call it (403)
GET /v1/boxes/{id}/media the box's steps that have pictures (recorded with sandbox_exec, taken or recorded with sandbox_shot; screenshots are kept 30 days after capture, recordings 7), the newest 200 at most, oldest first, for a stopped box too: {"keepDays": 30, "steps": [...]}, where keepDays is how long screenshots are kept. Across all of the account's boxes by time: the MCP tool sandbox_media. Each step has the fields of sandbox_status steps[] (at, kind, summary and ok, and target, note, actor, detail, ms, exitCode, signal, timedOut and error when they apply), plus media[], each with kind (video or image), url and bytes, and durationSec for a video; the URLs are signed again on each call and valid for at least an hour
GET /v1/boxes/{id}/designs every version of the drafts, architecture diagrams and schemas shown on this box (designs last drawn with this box's id; sandbox_draft), newest first, 500 at most: {"designs": [{"id", "designId", "kind", "topic", "version", "note", "createdAt", "images": [{"url", "width", "height", "phones"}], "spec", "boxId", "boxName", "boxStatus", "final"}]}. id is the version (dsn_…, the reviewId the tool returned) and designId the design (dsg_…); boxId, boxName and boxStatus are there only for a design shown on a box. images are the pictures, their URLs valid one hour. A draft's picture also has phones, [{"x", "y", "w", "h"}]: where each phone, with the notes under it, sits on that picture, in pixels from its top-left corner, left to right (a version drawn before phone positions were recorded has none). A schema has no picture (images is []) and has spec instead: its tables as sent to sandbox_schema, {"tables": [{"name", "label", "new", "columns": [{"name", "type", "note", "ref", "new"}]}]}, with only the fields given (sandbox_schema); a schema version saved before schemas became text also lists the picture made for it
GET /v1/designs the latest version of each design in the account (one per kind and topic), with or without a box and whatever state its box is in, newest first, 200 at most, in the same form. ?status=open lists only the designs waiting for the person, not final and with no report from them on the latest version yet: the designs under Ready for you in the app
POST /v1/designs/{designId}/final marks a design final or undoes it, like the app's button and sandbox_design_final. Body {"final": true, "version": 3}: version is optional, the latest version you saw; older than the latest does not make it final (a new version was just drawn). Returns {"final": true}. Another account's design returns 404
GET /v1/designs/{designId} every version of one design (dsg_…), newest first, in the same form: the design's page in the app (/design/{designId}). It needs no sign-in: anyone with the designId can read it, so the page can be passed on. owner is true only with this account's sign-in or API key, and only then do the versions carry the box (boxId, boxName, boxStatus). A design that does not exist gets 404
DELETE /v1/boxes/{id}/media deletes the box's stored screenshots, recordings (including the ones recorded with each step), frozen poster and review card picture; works on running and stopped boxes. Designs do not belong to the box and stay, pictures included. Returns {"ok":true,"deleted":N,"bytes":B}; the activity record stays, and GET /v1/boxes/{id}/media then returns empty steps. Another account's box gets 404; if deleting fails partway it returns 502, and calling again deletes the rest
DELETE /v1/boxes/{id}/events deletes the box's activity record: the steps on its timeline in the app (with the notes and commands a person can see there), steps[] in sandbox_status, and the screenshots and recordings taken with those steps. Use it before handing a box to someone who should not see how you got there, such as a reviewer who reads another language; sandbox_review with clearActivity: true hides the same steps as it hands the box over, without deleting them (their pictures stay in sandbox_media); this call deletes the hidden steps too. Returns {"ok":true,"deleted":N,"mediaDeleted":M}; steps from later calls are recorded as usual. Only the account can call it, not a review link; another account's box gets 404
DELETE /v1/build-cache deletes the account's whole sandbox_build cache and returns {"ok":true,"deleted":N,"bytes":B}; the next sandbox_build with the same fingerprint builds again (reused: false). If deleting fails partway it returns 502; call again
POST /v1/agents/{id}/heartbeat the conversation {id} (its X-Psbx-Agent) is still open; body {"client": "<MCP client name>"}, every 60 seconds; returns {"ok":true}
POST /v1/agents/{id}/leave the conversation {id} has closed: the boxes it used last show as AI stopped unless they wait for the person; returns {"ok":true}
POST /v1/boxes/{id}/exec run a command as the person, what the app's command box uses: {"cmd", "cwd", "env", "timeoutSec", "background", "note"}, returning sandbox_exec's fields and "actor": "human". It is not recorded (no screenshot or video), and its step in steps[] and the app has actor: human. It is not how an AI's step is made: to test what an agent's call records, call sandbox_exec over MCP
GET /v1/files/{token} the download links that sandbox_get, sandbox_shot and sandbox_exec's outputUrl return: no key needed (the link itself is the permission, valid 1 hour), it redirects (302) to a storage URL valid a few minutes
/v1/boxes/{id}/sync upload a tar.gz into a box (what the adapter's sandbox_sync uses)
/v1/boxes/{id}/ports/{port}/{path} any method, HTTP and WebSocket: reach a program listening on 127.0.0.1:{port} inside the box from outside, for example Chromium's DevTools (--remote-debugging-port=9222: GET …/ports/9222/json/version, then the CDP WebSocket …/ports/9222/devtools/browser/<id>). The request arrives with Host: 127.0.0.1:{port}, without your Authorization or cookies. Only the account's token; not 80 or 9095 (the box agent's own); a frozen box thaws first, and an open connection keeps it awake. 502 when nothing listens on the port
/v1/boxes/{id}/screencast live screen, WebSocket
/v1/boxes/{id}/input mouse and keyboard input
/v1/takeovers pending takeover requests, each with takeoverUrl, its token and appLink (parallelsandbox://box/<id>?t=<token>)
/v1/takeovers/{id}/return hand a box back with a note
POST /v1/replay-renders turn an rrweb recording into an mp4: a box replays it and PUTs the video to your presigned URL; returns 202 {"id", "state": "pending"} (Rendering an rrweb replay to mp4)
GET /v1/replay-renders/{id} progress of a render: {"id", "state", "error", "durationSec", "bytes", "boxId", "createdAt", "finishedAt"}, where state is pending, rendering, uploading, done or failed
GET, PUT /v1/box-access the IP allowlist for box URLs: { "allowedIps": [...] }, [] turns it off (other facts)
GET /v1/persist the account's persistent folders (sandbox_start persist): {"folders": [{"name", "path", "bytes", "savedAt", "boxId"}]}, where bytes is the size of the saved copy and boxId the live box that has the folder attached
DELETE /v1/persist/{name} delete a persistent folder with its saved copy; 409 while a live box, frozen included, has it attached
PUT /v1/persist/{name}/content replace a folder's content without a box, for moving existing data in: the body is a gzip-compressed tar whose top level is the folder's contents, at most 4 GiB (413 above that); 409 while a live box has it attached. The next box that attaches it gets this content
GET /v1/persist/{name}/content {"url", "expiresAt"}: a download URL for the folder's current saved copy (a tar.gz), valid one hour; 404 before its first save
POST /v1/boxes/{id}/persist/{name} attach a folder to a running box: its saved copy is restored to /persist/<name> (an empty folder the first time). At most 4 per box; 409 when another live box has it attached
POST /v1/boxes/{id}/persist/{name}/save save the folder now, skipped when no file name, size or modification time changed. It copies the files as they are and stops nothing: close the programs writing there first
DELETE /v1/boxes/{id}/persist/{name} save the folder, stopping the programs that have files open in it first, then detach it and remove it from the box, so another box can attach it
GET /v1/egress-ip the account's dedicated egress IP (sandbox_start egress): {"egressIp": {"publicIp", "boxId", "createdAt"}}, with boxId while a box uses it, or {"egressIp": null} when the account has none
POST /v1/egress-ip allocate the account's dedicated egress IP if it has none (otherwise return the one it has), in the same form
DELETE /v1/egress-ip give the address back: {"ok":true,"released":"<address>"}; 409 while a live box uses it. A later allocation gets a different address
PUT /v1/boxes/{id}/egress {"mode": "dedicated"} or {"mode": "shared"}: switch a running box's outbound traffic to the account's fixed IP, or back to its host's address; returns {"mode", "publicIp", "pending"}. 409 while another live box uses the address
GET /v1/secrets, PUT /v1/secrets/{name}, DELETE /v1/secrets/{name} manage secrets; a person can also add, replace and delete them at app.parallelsandbox.com under Settings → Secrets
/v1/versions published versions. DELETE /v1/versions/{id} removes a version record, and also deletes its image from the registry when no other version of the account uses the same image tag: {"ok":true,"imageDeleted":true}; when the image stays, imageDeleted is false with a reason (for example image is still used by 1 other version(s): billing/v2). If the registry cannot delete it, it returns 502 and keeps the version record, so you can retry
/v1/environments environments, connections (connector tokens), private addresses, service settings (uploaded .env or imported from AWS ECS); every endpoint is in Environments
/v1/aws the read-only AWS role used for imports; /v1/aws/ecs/services lists ECS services
/v1/connector WebSocket the connector connects to, with its connection token
GET /v1/usage, GET /v1/usage/events usage totals by kind, and usage events (since, until, box_id, limit)
GET /v1/credits balance, buckets, plan, and during the 24 hours after credits ran out boxesKeptUntil
GET /v1/billing/catalog plans and credit packs (no key needed)
/v1/billing/checkout, /v1/billing/portal Stripe Checkout and customer portal
/v1/billing/webhook Stripe webhook
POST /v1/projects (log.parallelsandbox.com) create a log project; returns its write key once
GET, PATCH, DELETE /v1/projects/{id} (log.parallelsandbox.com) inspect a log project, change its allowed origins, delete it
POST /v1/projects/{id}/write-key (log.parallelsandbox.com) replace the write key; the old one stops working at once
/v1/projects/{id}/sourcemaps (log.parallelsandbox.com) upload and list source maps

Rendering an rrweb replay to mp4

POST /v1/replay-renders turns an rrweb recording into an mp4 video. ParallelSandbox starts a box for the account, replays the recording in Chromium at the window size it was recorded at (pages 600 pixels wide or narrower are drawn at twice that size), records the screen at 15 frames per second, PUTs the mp4 to the URL you give, and stops the box. It keeps no copy of the recording or of the video. The replay uses rrweb's own player, @rrweb/replay 2.1.7.

The body is JSON, at most 1 MiB (413 above that). Unknown fields are rejected with 400, so a misspelt blurSelectors cannot quietly give you an unblurred video.

Field Type Meaning
replayUrls string array, required, 1 to 500 presigned GET URLs of the recording's chunks, in order. Each chunk is a gzip-compressed JSON array of rrweb events; the arrays are joined into one replay. All chunks together: at most 64 MB compressed and 160 MB uncompressed
putUrl string, required presigned PUT URL for the mp4. It is uploaded with Content-Type: video/mp4, so sign it with that content type or with none
assetRewrite object, optional, up to 32 entries prefix replacements applied to the raw event text after unzipping and before parsing, so that images, fonts and stylesheets recorded at addresses the player cannot reach load from where you keep them, for example {"capacitor://localhost/": "https://assets.example.com/app/"}. A key may carry a port (http://localhost:47137/). Where two keys match at the same place the longer one wins, and replaced text is not replaced again. Keys and values are at most 2,048 characters, without quotes, backslashes or control characters
blurSelectors string array, optional, up to 50 CSS selectors blurred in the video: each becomes <selector> { filter: blur(8px) !important; } inside the replayed page, for example ["input", "textarea", "[contenteditable]"]. A selector that is not valid CSS fails the render rather than producing an unblurred video. It applies to the page's main document, not to iframes or shadow roots inside it
overlays object array, optional, up to 200 captions drawn over the video, each {"fromMs", "toMs", "text"}: shown while the replay's own clock is at or after fromMs and before toMs, counted in milliseconds from the recording's first event. With skipInactive they follow the replay's clock, so a caption on a skipped stretch shows while that stretch is fast-forwarded. text is 1 to 500 characters; line breaks are kept. Captions are white on a dark box at the bottom centre of the recorded page, stacked when several show at once
skipInactive boolean, optional fast-forward stretches without user interaction (pointer, scroll, typing) that last more than 10 seconds, as rrweb's skipInactive does: a long idle stretch takes about 5 seconds of video. It shortens the video and the box time
maxDurationSec integer, optional, 1 to 7200, default 3600 the longest video to record. A replay still playing at that point is cut there and delivered as it is

The response is 202 {"id": "rr_…", "state": "pending"}. Poll GET /v1/replay-renders/{id} every few seconds:

Field Meaning
state pending (waiting for a box), rendering (the box is replaying and recording), uploading (PUT to putUrl), done (the video is at putUrl) or failed
error why it failed, when state is failed
durationSec, bytes the video's length and size, once it is rendered
boxId the box rendering it. It shows in the account's box list, and its running time is what the render costs
createdAt, finishedAt ISO 8601 times
  • Time: the replay plays in real time (less with skipInactive), plus a minute or two to start the box and encode the video.
  • Cost: the box is size 1 (2 vCPU, 8 GiB) and its running time is billed to the account that made the request at the running-box rate in Credits, about 34 credits an hour; uploading the mp4 is the box's outbound traffic. When the account has no credits, POST returns 402 and nothing is queued.
  • When every host is full, a render waits in pending for up to an hour, then fails. If its box stops responding, it starts over on a new box, at most 3 attempts in all.
  • failed is final, with the reason in error: a chunk that cannot be downloaded (download replay chunk 2: HTTP 403 ...), a chunk that is not gzip-compressed JSON, an invalid blur selector, putUrl rejecting the upload (expired, or signed for another content type), or a render running past maxDurationSec by far. Send a new request after fixing it.
  • Presign for long enough: the chunk URLs are downloaded within a minute or two of the box starting, and putUrl is used when the video is done, about the replay's length after that. A render waiting for capacity starts later.
  • The URLs you sent are deleted when the render finishes; the record is kept 30 days. An id from another account returns 404.
POST /v1/replay-renders
{
  "replayUrls": [
    "https://my-bucket.s3.amazonaws.com/replays/journey-1/0.json.gz?X-Amz-Signature=...",
    "https://my-bucket.s3.amazonaws.com/replays/journey-1/1.json.gz?X-Amz-Signature=..."
  ],
  "assetRewrite": {
    "capacitor://localhost/": "https://assets.example.com/app/",
    "https://localhost/": "https://assets.example.com/app/"
  },
  "blurSelectors": ["input", "textarea", "[contenteditable]"],
  "overlays": [{ "fromMs": 12000, "toMs": 18000, "text": "In a system window: Sign in with Apple (succeeded)" }],
  "skipInactive": true,
  "putUrl": "https://my-bucket.s3.amazonaws.com/videos/journey-1.mp4?X-Amz-Signature=...",
  "maxDurationSec": 3600
}
{ "id": "rr_3f9a0c1d2e4b5a6978ab", "state": "done", "durationSec": 412.6, "bytes": 18234567, "boxId": "k2m8q4r7t1vx", "createdAt": "2026-10-17T03:12:09Z", "finishedAt": "2026-10-17T03:20:41Z" }

Every tool and topic is listed in the tool reference.

API keys

Tools without OAuth can use a psbx_ API key. The AI creates one with a name using POST /v1/keys and the app’s signed-in session; the key is shown only once. GET /v1/keys lists keys and DELETE /v1/keys/{id} revokes one. API keys and OAuth access tokens cannot manage keys. Normal installation uses the OAuth adapter and needs no manually created key.