Quickstart
Ingest your first patient record and query it through a deployed Patient Memory instance.
Workspace
Patient Memory is available as a hosted service. Each workspace gets a dedicated server at:
https://api.<workspace-id>.clinia.cloudReplace <workspace-id> with your workspace identifier throughout this guide.
Ingest patient data
Pick a registry key for the patient (the identifier you'll use in all subsequent calls).
curl -X POST "https://api.<workspace-id>.clinia.cloud/patients/my-patient/ingest/fhir" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: application/json" \
-d @fhir-bundle.jsoncurl -X POST "https://api.<workspace-id>.clinia.cloud/patients/my-patient/ingest/cda" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: text/plain" \
--data-binary @document.xmlcurl -X POST "https://api.<workspace-id>.clinia.cloud/patients/my-patient/ingest" \
-H "X-Clinia-API-Key: <clinia-api-key>" \
-H "Content-Type: application/json" \
-d '{ "fhir": [{ "resourceType": "Bundle", "entry": [...] }], "cda": ["..."] }'Response:
{
"ok": true,
"source": "fhir",
"stats": { "itemsScanned": 42, "entitiesExtracted": 12, "eventsExtracted": 8 },
"warnings": 0,
"patient": { "id": "123", "name": "John Doe" }
}Multiple ingest calls for the same patient registry key accumulate sources and re-run entity resolution each time.
Query patient data
# Browse the virtual file system
curl "https://api.<workspace-id>.clinia.cloud/patients/my-patient/vfs?path=/conditions/active" \
-H "X-Clinia-API-Key: <clinia-api-key>"
# Read a condition story
curl "https://api.<workspace-id>.clinia.cloud/patients/my-patient/read?path=/conditions/active/type_2_diabetes_mellitus/_story.md" \
-H "X-Clinia-API-Key: <clinia-api-key>"
# Audit entity resolution decisions
curl "https://api.<workspace-id>.clinia.cloud/patients/my-patient/resolution" \
-H "X-Clinia-API-Key: <clinia-api-key>"Connect an AI agent via MCP
import { Client, SSEClientTransport } from "@modelcontextprotocol/sdk/client";
const transport = new SSEClientTransport(new URL("https://api.<workspace-id>.clinia.cloud/mcp"));
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
// Tools available: browse_patient, read_patient, search_patient, get_patient_infoCheck ingest status
curl "https://api.<workspace-id>.clinia.cloud/patients/my-patient/ingest/status" \
-H "X-Clinia-API-Key: <clinia-api-key>"{
"patientId": "my-patient",
"ready": true,
"patient": { "id": "123", "name": "John Doe" },
"stats": { "entities": 45, "events": 12, "relationships": 38 },
"warnings": []
}