Documentation

Understand how Toravine optimizes Medicare plan selection, or integrate our optimization engine into your own application via the REST API.

API Endpoints

POST/v1/optimize
GET/v1/plans/:zip
GET/v1/drugs/search
GET/v1/providers/search
POST/v1/compare
POST/v1/signup
POST/v1/checkout

Authentication

All API requests require an API key via the X-API-Key header.

curl https://toravine-api.smarttechinvest.com/v1/plans/33101 \
  -H "X-API-Key: tor_your_api_key_here"

Out-of-Pocket Cost Simulation

For each plan, we compute: Annual Premium + Deductible Spend + Copays/Coinsurance + Drug Costs (across initial, donut hole, and catastrophic phases) with the new $2,000 Part D OOP cap applied. IRMAA surcharges are added based on income.

Drug costs are computed by matching each medication against the plan formulary, determining tier placement, and applying tier-specific cost-sharing rules including prior authorization and step therapy requirements.

Monte Carlo Health Cost Simulation

We run 1,000 stochastic health expenditure scenarios per plan using MEPS age-cohort distributions. Each scenario simulates ER visits, hospitalizations, specialist visits, and outpatient procedures, then runs those costs through the plan's deductible/coinsurance/OOP max structure.

  • Expected (mean) cost -- average across all scenarios
  • Median cost (P50) -- less sensitive to outliers
  • 95th percentile (P95) -- worst-case planning number
  • Full distribution -- see the entire range of possible costs