Skip to main content
By the end of this walkthrough you will have a live RadMD sandbox, a username and password minted for it, and a Playwright script that logs in and lands on the authenticated dashboard. No environment or benchmark required.

Prerequisites

  • An organization API key. Create one in your organization’s dashboard under API Keys. Keys are prefixed vrl_ and sent as Authorization: Bearer <key>.
  • Node.js 20+ (for the Playwright example). Python users can adapt the snippet to playwright for Python.
export VERIAL_API_KEY=vrl_xxx

1. Create a Web Simulator

Create a simulator with type: "Payer" and pick a portal slug from the catalog (radmd or covermymeds).
curl -X POST https://api.verial.ai/simulators \
  -H "Authorization: Bearer $VERIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "Payer",
    "name": "RadMD Sandbox",
    "config": {
      "portal": "radmd",
      "default_determination": { "status": "approved" }
    }
  }'
Response:
{
  "id": "sim_01H...",
  "type": "Payer",
  "name": "RadMD Sandbox",
  "config": { "portal": "radmd", "default_determination": { "status": "approved" } },
  "created_at": "2026-04-23T17:00:00.000Z"
}
export SIMULATOR_ID=sim_01H...

2. Create a Sandbox

Provision a live instance from the simulator. Verial mints a fresh username + password bound to this sandbox.
curl -X POST https://api.verial.ai/sandboxes \
  -H "Authorization: Bearer $VERIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"simulator_id\": \"$SIMULATOR_ID\" }"

3. Read the Credentials

Fetch the sandbox to pull the portal URL and login.
curl "https://api.verial.ai/sandboxes/$SANDBOX_ID" \
  -H "Authorization: Bearer $VERIAL_API_KEY"
Response (truncated):
{
  "id": "sbx_01H...",
  "simulator_id": "sim_01H...",
  "status": "active",
  "credentials": {
    "portal_url": "https://radmd.sim.verial.ai",
    "username": "provider_a1b2c3",
    "password": "Kq7!mZxP9vRnT2wL",
    "api_url": "https://api.verial.ai/sandboxes/sbx_01H.../web-sim/payer"
  }
}
export SANDBOX_ID=sbx_01H...
export PORTAL_URL=https://radmd.sim.verial.ai
export PORTAL_USERNAME=provider_a1b2c3
export PORTAL_PASSWORD='Kq7!mZxP9vRnT2wL'

4. Log In with Playwright

npm install playwright
npx playwright install chromium
// login.ts
import { chromium } from 'playwright'

const portalUrl = process.env.PORTAL_URL!
const username = process.env.PORTAL_USERNAME!
const password = process.env.PORTAL_PASSWORD!

const browser = await chromium.launch({ headless: false })
const page = await browser.newPage()

await page.goto(portalUrl)
await page.getByLabel(/username/i).fill(username)
await page.getByLabel(/password/i).fill(password)
await page.getByRole('button', { name: /sign ?in|log ?in/i }).click()
await page.waitForURL((url) => !url.pathname.endsWith('/login'))

console.log('logged in, url:', page.url())
// await browser.close()
Run it:
npx tsx login.ts
The page will land on the portal’s authenticated landing route. From here your agent can drive the rest of the workflow (patient search, prior auth submission, etc.) using the same DOM selectors as the real vendor portal.

5. Verify State via the API

Any action taken in the browser updates sandbox state. Read it back through the REST API at the api_url from step 3, using your organization API key:
curl "$API_URL/patients?name=Smith" \
  -H "Authorization: Bearer $VERIAL_API_KEY"

6. Tear Down

curl -X POST "https://api.verial.ai/sandboxes/$SANDBOX_ID/teardown" \
  -H "Authorization: Bearer $VERIAL_API_KEY"
The username and password are invalidated immediately; interaction events persist.

Next Steps

Web Simulator Catalog

The supported portals and their config options.

Benchmarks

Compose web simulators into scored benchmarks.