About
The full read of the study: every XA run is grouped, inventoried and analysed; the result contains all sections the input supports.
Endpoint angio/coronary/interpret · version 1.0.0 · $0.12 up to 600 frames · $0.24 up to 1,500 frames · $0.36 above 1,500 frames per request · the bare id angio/coronary is an alias.
1. Calling the API#
Set up your API key#
Create a key in Settings → API Keys and set it as MEDRUN_KEY in your runtime.
export MEDRUN_KEY="YOUR_API_KEY"Submit a request#
Every call is asynchronous: submitting returns a request with its id and status, and you follow it until the result is ready.
response=$(curl --request POST \
--url https://api.medrun.ai/v1/run/angio/coronary/interpret \
--header "Authorization: Bearer $MEDRUN_KEY" \
--header "Content-Type: application/json" \
--data '{
"input": {
"files": [
"file_01K6R4X2Q9Y7T3V5W8Z0A1B2C3"
],
"options": {
"report": false
}
}
}')
REQUEST_ID=$(echo "$response" | jq -r .id)Request status
Stream progress#
Stages stream as server-sent events (received, queued, preprocessing, inference, report, completed). Critical findings are flagged first, before the full result.
curl --no-buffer \
--url https://api.medrun.ai/v1/requests/$REQUEST_ID/events \
--header "Authorization: Bearer $MEDRUN_KEY" \
--header "Accept: text/event-stream"2. Authentication#
The API uses API keys. Send Authorization: Bearer $MEDRUN_KEY with every call. Test keys (mr_test_…) run against the mock backend for free.
API key#
Protect your API key
3. Queue#
Long-running requests
Fetch request status#
Statuses run queued → preparing → running and end in succeeded, failed, canceled, rejected or expired.
curl --request GET \
--url https://api.medrun.ai/v1/requests/$REQUEST_ID \
--header "Authorization: Bearer $MEDRUN_KEY"Get the result#
When the request has succeeded, output holds the result envelope. See the result format.
curl --request GET \
--url https://api.medrun.ai/v1/requests/$REQUEST_ID \
--header "Authorization: Bearer $MEDRUN_KEY" | jq .output4. Files#
files is a flat list: DICOM files, folders, CD exports (DICOMDIR) and zip/tar archives. The platform groups them into series and runs.
Uploading files#
# 1. Create the upload (one PUT up to 100 MB; larger files get multipart part URLs)
upload=$(curl --request POST --url https://api.medrun.ai/v1/uploads \
--header "Authorization: Bearer $MEDRUN_KEY" --header "Content-Type: application/json" \
--data '{"filename": "study.zip", "bytes": 214000000, "media_type": "application/zip"}')
# 2. PUT the bytes to upload.url (with upload.headers)
curl --request PUT --upload-file study.zip "$(echo "$upload" | jq -r .upload.url)"
# 3. Complete it, then pass file.id in input.files
curl --request POST --url "$(echo "$upload" | jq -r .complete_url)" --header "Authorization: Bearer $MEDRUN_KEY"
FILE_ID=$(echo "$upload" | jq -r .file.id)Hosted files (URL)#
You can also pass https URLs, for example signed S3 or GCS links. MedRun fetches them when the request starts.
5. Webhooks#
Add a webhook to the submit body. MedRun POSTs the request object, signed with Standard Webhooks headers, when the request ends. Configure secrets and see deliveries in Settings → Webhooks.
{
"input": {
"files": [
"file_…"
]
},
"webhook": {
"url": "https://example.org/medrun/webhook",
"events": [
"request.succeeded",
"request.failed"
]
}
}6. Schema#
Input#
- fileslist<string>* required
The angiography study: DICOM files, a folder, a CD export (DICOMDIR) or a zip. `file_…` ids from /v1/uploads or https URLs.
- clinical_contextobject
Optional. Used for guidance only; never names, IDs or dates.
- age_yearsinteger
Range:
0 … 130 - sexenum
Possible values:
female, male, other, unknown - indicationstring
For example "stable angina" or "NSTEMI".
- optionsobject
- reportbooleanadd-on
Adds a draft cath report written from the structured result (English). +$0.02 per run.
Default value:
false - report_languageenum
Default value:
"en"Possible values:
en - returnlist<enum>
JSON is always returned. DICOM objects reference your original UIDs.
Default value:
["json","dicom-sr","dicom-seg","sc"]Possible values:
json, dicom-sr, dicom-seg, sc, pdf, fhir - previewsboolean
WebM overlay and key-frame PNGs (not diagnostic).
Default value:
true
Example input:
{
"files": [
"file_01K6R4X2Q9Y7T3V5W8Z0A1B2C3"
],
"options": {
"report": false
}
}Output#
The output is the MedRun result envelope: sections[] with a status per section, then findings, measurements, scores, classifications, guidance, the optional report and artifacts (DICOM SR/SEG, overlays, PDF, FHIR).
viewsViews: Each run's injected artery (LCA/RCA), positioner angles and projection, contrast and key frames.qualityQuality: Adequacy flags (short run, panned gantry, missing calibration, segmentation fallback) carried into the report's limitations.segment-vesselsVessel segmentation: Temporally consistent coronary-tree mask on every frame, as DICOM SEG and an overlay video.segmentsCoronary segments: SYNTAX coronary segment labels (11 main segments) and the list of visible segments.stenosisStenosis: Lesion list per segment with QCA %DS, MLD, reference diameter, length and an AI visual-equivalent grade; bands < 50 / 50–69 / ≥ 70 % (LM ≥ 50 %).dominanceDominance: Right, left or co-dominant circulation from the LCA and RCA runs.timi-flowTIMI flow: TIMI flow grade, corrected TIMI frame count and myocardial blush grade.lesion-featuresLesion features: Calcification, thrombus, bifurcation (Medina), CTO, ostial location, tortuosity and ACC/AHA lesion type.syntax-scoreSYNTAX score: SYNTAX score with per-lesion breakdown and tertile.stent-sizingStent sizing: Proximal and distal reference diameters, lesion length and a suggested stent size for a target lesion.pci-resultPCI result: Pre/post-PCI comparison (residual %DS, acute gain, TIMI change, dissection).lvefLVEF estimate: Estimated LVEF from coronary runs when no LV gram or echo is available.reportDraft report: Opt-in draft cath report (findings, impression, limitations) written from the structured result; every number is validated against it.
OpenAPI document: https://api.medrun.ai/v1/models/angio/coronary/interpret/openapi.json