canonical: https://jentic.com/apis/infermedica.com/infermedica

# Infermedica API

Infermedica is an AI-powered clinical decision support API for symptom checking, differential diagnosis, and patient triage. The 16-endpoint v3 API runs adaptive diagnostic interviews via /diagnosis, recommends triage levels (emergency, consultation, self-care) via /triage, parses free-text patient complaints into coded symptoms via /parse, and exposes structured medical concept catalogues for symptoms, conditions, risk factors, and lab tests. Authentication uses a paired App-Id and App-Key header credential model, allowing partners to track usage per integration.

## For AI agents

Run adaptive symptom-check interviews, get triage recommendations, parse free-text symptoms into coded concepts, and look up clinical concepts (symptoms, conditions, risk factors, lab tests).

## Scope

Does not handle EHR record storage, prescription writing, or appointment scheduling - use for symptom checking, differential diagnosis, triage, and medical concept lookup only.

## Capabilities

- Run an adaptive diagnostic interview where each call to /diagnosis returns either the next clarifying question or a ranked condition list
- Recommend a triage level - self-care, consultation, or emergency - for a given symptom set via /triage
- Parse free-text patient narratives into structured Infermedica concept IDs via /parse
- Suggest related symptoms a patient might also have via /suggest, improving interview completeness
- Surface emergency red flags from a symptom set with /red_flags before making the user wait through a full interview
- Look up structured catalogues of symptoms, conditions, risk factors, and lab tests with the /symptoms, /conditions, /risk_factors, and /lab_tests endpoints
- Search the medical concept graph by free text with /search and explain a diagnosis result with /explain

## Use cases

### Patient-Facing Symptom Checker

Power a symptom-checker chatbot or web app where a patient describes how they feel and the application asks adaptive follow-up questions before showing likely conditions and a triage recommendation. Each turn calls POST /diagnosis with the running evidence list; Infermedica returns either the next question or a stop signal with the differential. POST /triage returns the recommended care level.

Example prompt: Call POST /diagnosis with sex='female', age=35, and an evidence array containing symptom 's_21' (abdominal pain), then return the next recommended question.

### Free-Text Intake Parsing

When a patient types 'I've had a headache and nausea for two days', POST /parse converts that to Infermedica concept IDs (e.g., s_98 for headache, s_156 for nausea), so a downstream /diagnosis call has structured evidence. Useful for chat-based intake flows and EHR free-text fields where humans describe symptoms in natural language.

Example prompt: POST /parse with text 'severe headache and nausea since yesterday' and return the extracted Infermedica concept IDs.

### Emergency Triage Pre-Check

Before running a full diagnostic interview, POST /red_flags evaluates whether the symptom set already contains a clinical red flag that warrants immediate emergency triage - for example, chest pain with shortness of breath. This shortcut lets a triage app escalate to 'go to emergency department' without making the user answer 20 questions first.

Example prompt: POST /red_flags with evidence containing chest pain and shortness of breath; if any red flag is returned, route the user to emergency triage immediately.

### AI Healthcare Agent

An LLM agent acting as a virtual medical assistant uses Infermedica as its grounded clinical reasoning tool. Through Jentic, the agent searches by intent (e.g., 'run a symptom check'), loads the schema, and calls /parse, /diagnosis, /red_flags, and /triage in sequence. This keeps clinical reasoning anchored to a regulated medical knowledge base rather than hallucinated by the LLM.

Example prompt: Parse a free-text complaint with /parse, run /diagnosis to convergence, then call /triage on the final evidence set and return the recommended care level.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/diagnosis` | Run a step of the adaptive diagnostic interview |
| POST | `/triage` | Get a triage level for the current evidence |
| POST | `/parse` | Parse free-text symptoms into concept IDs |
| POST | `/red_flags` | Detect emergency red flags in the evidence set |
| POST | `/suggest` | Suggest related symptoms to ask about |
| GET | `/symptoms` | List all symptoms in the catalogue |
| GET | `/conditions` | List all conditions in the catalogue |
| GET | `/search` | Free-text search across the medical concept graph |

## Key resources

- **Diagnosis** — Adaptive interview engine returning the next question or final differential
- **Triage** — Care-level recommendation (self-care, consultation, emergency) for a given evidence set
- **NLP (Parse)** — Convert free-text patient narratives into Infermedica concept IDs
- **Red Flags** — Detect emergency red flags before full interview completion
- **Concepts** — Catalogues of symptoms, conditions, risk factors, and lab tests with structured metadata
- **Suggest and Explain** — Recommend related symptoms to ask about and explain ranking results

## Why Jentic

- **Setup:** Wiring the Infermedica API by hand means sending its paired App-Id and App-Key headers on every call and mapping its diagnosis, triage, and lookup endpoints yourself. Through Jentic you install once, import the Infermedica API from the API Directory, store both header values once, and your agent calls it.
- **Permission scoping:** Infermedica takes the evidence and patient context in the request body rather than the URL path, so limit the agent to the operations it needs, such as running a symptom check or fetching a triage level. You choose which operations are allowed, so the free-text parse and suggest endpoints are not included unless you add them.
- **Credential handling:** Your Infermedica App-Id and App-Key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run a symptom check' or 'get a triage level', and Jentic returns the matching Infermedica operation with its input schema so the agent learns the diagnosis evidence shape without browsing the medical-domain docs.

## Related APIs

- **Stripe API** — Stripe processes payments and subscriptions for telehealth services that Infermedica triages.
- **Twilio API** — Twilio handles SMS and voice channels that telehealth and triage flows use to contact patients.

## FAQ

### What authentication does the Infermedica API use?

The Infermedica API uses paired App-Id and App-Key headers - both are required on every request. Through Jentic, both credentials are stored encrypted in your Jentic One instance and injected at execution time so the agent never holds either raw value.

### Can I parse free-text symptoms into Infermedica concept IDs?

Yes. POST /parse takes a free-text narrative (e.g., 'severe headache and nausea since yesterday') and returns Infermedica concept IDs and the surface text that mentioned them, ready to drop into the evidence list for /diagnosis or /triage.

### What are the rate limits for the Infermedica API?

Rate limits depend on the partnership tier - sandbox accounts have low limits, and production limits are negotiated with Infermedica during integration. Check developer.infermedica.com or your partnership agreement for exact ceilings.

### How do I run a symptom check through Jentic?

Search Jentic for 'run a symptom check' to find POST /diagnosis. Load the schema (sex, age, evidence array), execute, and call /diagnosis again with each new answer until 'should_stop' is true. Then call POST /triage on the same evidence. Get started with Jentic One, the self-hosted execution layer.

### Does the API include emergency red flag detection?

Yes. POST /red_flags evaluates an evidence set against Infermedica's red-flag rules and returns the matching flags so a triage application can escalate to emergency care without completing a full interview. Use this as a safety pre-check on any symptom-check flow.

### Is Infermedica suitable for clinical or only consumer applications?

Infermedica is used in both. The same v3 API powers patient-facing symptom checkers and call-centre triage tools. Regulatory clearance and intended-use disclaimers depend on the deployment market - Infermedica's compliance team works with partners on CE marking and FDA pathways.

### Can I limit what my agent is allowed to do with the Infermedica API?

Yes. Because Jentic One is self-hosted, you decide which Infermedica operations your agent may call, so you can allow just the ones it needs, such as running a symptom check with POST /diagnosis or fetching a care level with POST /triage. Since Infermedica passes evidence and patient context in the request body rather than the URL path, scoping happens at the operation level: the free-text POST /parse and POST /suggest endpoints stay off unless you explicitly add them. Your paired App-Id and App-Key are held only by your own instance and injected at execution time, so the agent works within the operations and credentials your rules permit.
