Instant Preview API
The hosted Rover preview API lets you create signed-in preview sessions, read the latest preview state, stream launch events, continue a waiting preview, cancel/share a preview, and fetch the live-inject bootstrap loader.
Who this is for
Use Rover Instant Preview and treat this page as the field guide for what the UI is doing.
Call the hosted routes directly, use the public Preview Helper, or generate snippets from the SDK.
Use the OpenAPI spec plus the curl examples below. This is still a signed-in hosted preview flow, not an anonymous public demo endpoint.
Auth and token model
POST /v2/rover/previews requires a Firebase bearer token from a signed-in Rover operator session.previewToken / sessionToken. Use that token for get/events/input/cancel/share/bootstrap.runtimeSessionToken is the short-lived Rover runtime token used by the helper, bootstrap.js, console snippets, and bookmarklets.publicKey (pk_site_*) is a Workspace install credential, not a preview token.previewToken or token as query params, or the preview token in bearer auth.Website flow in API terms
- Sign in to Rover Instant Preview.
- Create a preview with target URL, prompt or shortcut, mode, and platform.
- Use the returned
helperOpenUrl,consoleSnippet, orbookmarkletUrl. - Poll or stream the preview until it succeeds, fails, or needs input.
- Use
workspaceInstallUrlto convert the demo into a real Workspace install.
Route examples
The preferred create payload uses targetUrl and prompt. The backend still accepts the older compatibility aliases url and message.
curl -X POST "https://agent.rtrvr.ai/v2/rover/previews" \
-H "Authorization: Bearer FIREBASE_ID_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://www.amazon.com/",
"prompt": "Show how Rover would guide a user through this page.",
"mode": "auto",
"platform": "desktop"
}'curl "https://agent.rtrvr.ai/v2/rover/previews/PREVIEW_ID?previewToken=PREVIEW_TOKEN"curl -N "https://agent.rtrvr.ai/v2/rover/previews/PREVIEW_ID/events?previewToken=PREVIEW_TOKEN"curl -X POST "https://agent.rtrvr.ai/v2/rover/previews/PREVIEW_ID/input?previewToken=PREVIEW_TOKEN" \
-H "Content-Type: application/json" \
-d '{"input":"Continue to the next step and explain what Rover is doing."}'curl -X POST "https://agent.rtrvr.ai/v2/rover/previews/PREVIEW_ID/cancel?previewToken=PREVIEW_TOKEN"curl -X POST "https://agent.rtrvr.ai/v2/rover/previews/PREVIEW_ID/share?previewToken=PREVIEW_TOKEN"curl "https://agent.rtrvr.ai/v2/rover/previews/PREVIEW_ID/bootstrap.js?previewToken=PREVIEW_TOKEN"Important response fields
| Field | Meaning |
|---|---|
| modeChosen | The actual execution path after attach/fallback: live_inject or hosted_preview. |
| consoleSnippet | Paste into DevTools on the target page for current-page live injection. |
| bookmarkletUrl | Bookmarklet form of the same current-page live inject bootstrap. |
| helperOpenUrl | Target page URL decorated with a private helper handoff fragment for the public Preview Helper app. |
| runtimeSessionToken | Short-lived Rover runtime token used by helper/bootstrap flows. Not the same as the preview control token. |
| helperConfig | Normalized helper payload including host scope, launch attach metadata, and bootstrap URL. |
| workspaceInstallUrl | Workspace handoff URL for turning the preview into a production install. |
| activeLaunch / latestEvents / finalResult | Live status, recent launch events, and terminal result details for the selected live/cloud path. |
Spec and source of truth
Manual verification matrix
Sign in at Instant Preview, create a preview, try helper/console/bookmarklet actions, switch to hosted preview if live inject stalls, save a share link, then use the Workspace install handoff.
Load the public Preview Helper from the Rover repo, test generic Workspace JSON from Workspace docs, then test helper handoff, SDK console/bookmarklet helpers, and production script-tag generation.
Use the OpenAPI spec and curl examples above to create a preview, fetch state, stream events, send input, cancel/share it, and fetch bootstrap.js.