https://api.mirra.run. Everything the CLI does maps to an API call — and everything the dashboard shows is read through the same API.
This page is the bare surface. The CLI and the Vitest plugin wrap it with better UX; reach for the raw API only when you’re building a custom integration.
Authentication
All requests require a bearer token:Base URL
Sessions
Create a session
string[]
required
Mirrors to provision. Must be names from the mirror catalog.
object
Map of mirror name → fixture name. Mirrors not listed use their default
empty fixture.boolean
default:"false"
Create a persistent session. Requires the Team plan or higher.
string
Human-readable session name. Required for persistent sessions. Ephemeral sessions auto-generate one if omitted.
integer
default:"3600"
Ephemeral-session auto-expire. Capped at your plan’s max session length.
string
Session identifier like
ses_a7k2.enum
provisioning initially, ready when all mirrors are up, failed on provisioning error.object[]
One entry per provisioned mirror with
vendor, url, and mirror version.timestamp
timestamp
For ephemeral sessions only.
Get a session
stats block with request count, webhook count, and error count since creation.
End a session
List sessions
createdAt desc.
Scenarios and runs
Execute a scenario
scenarioMarkdown and Mirra parses it server-side:
Get a run
Live events
Mirra publishes every request, webhook, state change, and lifecycle event to a per-session event stream. Subscribe via Server-Sent Events:traffic.request_completed— after every mirror requestwebhook.dispatched— when a webhook firesstate.changed— when mirror state mutatessession.lifecycle— start, end, reset, snapshot, restoreevaluation.criterion_graded— during scenario runs, as each criterion resolves
waitForWebhook().
Admin endpoints (per mirror)
Every mirror exposes admin endpoints at/_mirra/* on its mirror URL (not the control plane):
Reset state
seed is optional — defaults to whatever seed the session started with.
Simulate events
Snapshot and restore (persistent sessions only)
State dump
Metadata
Errors
All errors follow a standard shape:Where to go next
CLI reference
The wrapper you probably want instead of raw HTTP.
Coding agents + MCP
How the MCP server wraps this same API for agents.