All PI tools · API browser & keys · Interactive schemas
One API. Clear plan decisions.
Mira and other applications can ask PI for source plans, household savings and deterministic comparisons. Contract pi-http-1.0.
Connect your application
- An administrator provisions your assigned access. Open the API browser and connect.
- Create a key named Mira staging with read, calculate and search scopes. Save it in Mira’s server secret settings.
- Set
PI_BASE_URLto your deployed PI origin andPI_API_KEYto that application key. The planned staging origin ishttps://pi-staging.uquote.ai; deployment must be validated separately. - Call capabilities, resolve the ZIP’s county, confirm household/applicants, obtain subsidy, and compare plans.
Every call uses Authorization: Bearer YOUR_PI_KEY. CMS, Finder and Georgia credentials remain on PI. Keep shared machine keys off customer browsers.
Choose the connection style
Mira leads the conversation: use /api/v1/conversation/turn for typed needs and /api/v1/plugin/evaluate for the full result. Read the returned mirror_pi_result_view; if its best plan is null, explain the outstanding checks. Never substitute the first baseline plan.
PI leads the journey: send text to /api/v1/chat/turn. Carry its state in your authenticated client session. Ask its next question, review the collected inputs, then send action: "quote", confirmed: true. Ordinary messages do not run plan quotes.
The common endpoints
| Method | Endpoint | What it does |
|---|---|---|
| GET | /api/v1 | Contract and capability discovery |
| GET | /api/v1/locations/counties | ZIP + state + year → county choices |
| POST | /api/v1/quotes/subsidy | Source household savings estimate |
| POST | /api/v1/quotes | General, lowest-cost and $0 ranking views |
| POST | /api/v1/plugin/evaluate | Needs, hard requirements and authoritative result view |
| POST | /api/v1/chat/turn | Collect, review, then quote |
| POST | /api/v1/plans/compare-costs | Explain two or three plans side by side |
A synthetic quote request
Resolve the county first. This example describes one applicant in a tax household of two.
{
"zipcode": "34983", "countyfips": "12111", "state": "FL", "year": 2027,
"age": 35, "gender": "Male", "tobacco": false,
"income": 30000, "household_size": 2, "has_married_couple": false,
"household_members": [{"age": 35, "gender": "Male", "relationship": "Self",
"uses_tobacco": false, "seeking_coverage": true, "has_mec": false}],
"mode": "general"
}Send to /api/v1/quotes/subsidy, then /api/v1/quotes. Read quote.household_subsidy separately from each plan’s premium_breakdown. Before-credit premium, applied savings and net payment are separate amounts.
Source connections and the chat brain
CMS Plan Finder’s protected key field is separate from CMS Marketplace and Georgia. Finder results are returned with zero Marketplace tax credit. Missing Finder results make the comparison partial.
OpenAI’s optional key field enables structured interpretation of free-form text. Without a key, chat asks guided questions. PI remains responsible for source facts, calculations and ranking.
Required doctor and medicine coverage still need exact evidence. A listed benefit is not a guarantee of treatment coverage. Unknown costs stay unknown. Different household coverage groups must not be presented as equivalent family prices.
Mira developer handoff
The repository includes a standalone standard-library HTTP client and a full implementation guide. No PI source package is required on Mira’s server.
Complete guide, key setup and Mira implementation checklist
401: credential missing/expired. 403: scope missing. 422: correct inputs. 429: back off. 409/502/503: check configuration or source readiness. Retain the safe request ID; do not log client quote payloads or credentials.
Hosted connectivity, live source credentials and Mira’s factory/voice acceptance must be validated before activation. This guide does not indicate that either server has been changed.