Direct API, CLI, and MCP renders are for agents. They do not require a Vercel
login or an interactive browser session. Human observe links are separate:
they are short-lived and require normal OpenTrain authorization.
Workflow
- Read
capabilitiesto discover audiences, targets, viewports, retention, and worker-coverage rules. - Create a session pinned to the job’s current canonical Instructions tree.
- Select a page or stable node, or include it when creating the session.
- Render desktop, mobile, or both using the current state revision.
- Inspect the PNG and semantic evidence directly, or mint a human review link.
- Revoke the link or expire the session when review is complete.
Endpoints
Create and render
Employer session:workerCoverage; no synthetic worker is substituted.
Render with the session’s current revision:
browserRenderVerified: true.
collaborationSyncVerified is always false. The capture proves what the
renderer displayed at that revision; it cannot prove that an already-open
collaborative browser received a real-time update.
Authorization and safety
- Reads and artifact access require
instructions:read. - Session control, rendering, and link mutations require
instructions:write, anIdempotency-Key, employer job access, and the Instructions visual-proof rollout for the actor. - State-changing operations require the current
expectedStateRevisionand fail closed on drift. - Sessions, artifacts, and links are organization-bound, expiring, and revocable.
- Visual proof writes only isolated preview evidence. It never changes an Instructions page or learner record.
- Retry a transient renderer
503with the same idempotency key.
SDK
@opentrain-ai/sdk 0.21.0 or later exposes
getInstructionsVisualCapabilities, createInstructionsVisualSession,
getInstructionsVisualSession, manageInstructionsVisualSession,
renderInstructionsVisual, artifact list/get, and link create/list/revoke.
Use the machine-readable OpenAPI document
for complete request, response, and error schemas.