Skip to main content

Sandbox

Test keys (ak_test_…) run the whole lifecycle end to end. The preview is real; the physician is simulated; nothing is charged.

What's real and what's simulated

StepWith a test key
Validation and limitsReal. Same rules and errors as live.
Identifier screeningReal. Identifying requests get 422 phi_detected. Don't send real personal information to the sandbox either.
AI preview, references, quoteReal. The quote shows what the request would cost live.
Reviewer selectorNonempty specialty or physician selections are rejected. The simulator always reports has_eligible_experts: true, regardless of the live roster; sandbox never returns 422 no_matching_expert.
EscalationReal lifecycle, including max_price_cents and Idempotency-Key. No production approval needed, no credit reserved, no charge.
Physician answerSimulated, about a second after escalation.
WebhooksReal, signed decision.answered / decision.canceled events with sandbox: true, sent to your test endpoints.
PhysiciansNever notified. Sandbox work never reaches a real physician.

Sandbox decisions have sandbox: true and are only visible to test keys. Cancellation works while the decision is still queued, which in the sandbox is about a second.

The simulated physician

"physician": {
  "expert": { "id": "exp_sandbox", "name": "[SANDBOX] Simulated Physician, MD", "specialties": ["general"] },
  "answers": [
    { "type": "predicate", "name": "unsupported_claim", "value": true,
      "confidence": 0.6, "comment": "[SANDBOX] simulated answer comment: placeholder text so you can test handling of the comment field." },
    { "type": "choice", "name": "error_category", "choice": "unsupported_certainty",
      "confidence": 0.6, "comment": "[SANDBOX] simulated answer comment: placeholder text so you can test handling of the comment field." },
    { "type": "score", "name": "error_severity", "level": 2, "label": "Material",
      "confidence": 0.6, "comment": "[SANDBOX] simulated answer comment: placeholder text so you can test handling of the comment field." }
  ],
  "answered_at": "2026-11-03T15:01:15Z"
}

The simulator copies the AI preview's top answer for each question. These are simulator rules, chosen so you can test your handling of every field; they say nothing about how real physicians answer or rate confidence.

  • Expert: {"id": "exp_sandbox", "name": "[SANDBOX] Simulated Physician, MD"}.
  • predicate: value is true when the AI probability is at least 0.5, otherwise false.
  • choice: the AI's choice, with its original type.
  • score: the level with the highest AI probability (the lowest index wins a tie), not a rounded score.
  • Every answer has confidence: 0.6 and comment: "[SANDBOX] simulated answer comment: placeholder text so you can test handling of the comment field.".
  • AI refusal: a deterministic fallback selection (false for a predicate, the first choice, or the first level) with confidence: 0.0 and comment: "[SANDBOX] synthetic fallback after AI refusal". It is not a model or physician judgment.
  • Every answer carries a labeled placeholder comment, so a request with include_commentary: true is always satisfied.
Testing low confidence and refusals. To exercise confidence: 0.0 and comment handling, write a question the AI is likely to refuse. To test a false predicate, ask one the AI will answer "no".

Going live

Live keys (ak_live_…) follow the same production activation as the rest of the developer platform: card on file, your own identity verification, and approval. See Go to Production. Escalating a live decision on an account without production access returns 403 production_not_active.