About
Interactive quantitative coronary angiography on a segment you pick after seeing the read: diameter profile, MLD, interpolated reference diameter, %DS and lesion length on the chosen frame.
Endpoint angio/coronary/qca · version 1.0.0 · $0.02 per call
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/qca \
--header "Authorization: Bearer $MEDRUN_KEY" \
--header "Content-Type: application/json" \
--data '{
"input": {
"source_request": "req_01K6R4YQ8JT97KB6CQ643DZVMX",
"series_uid": "1.2.826.0.1.3680043.8.498.70321956482019375610283746501928",
"frame_number": 49,
"segment": "mLAD"
}
}')
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#
- source_requeststring* required
The `interpret` request whose files and result this measurement uses.
- series_uidstring* required
Series Instance UID of the XA run.
- frame_numberinteger* required
1-based DICOM frame number (end-diastolic frames work best).
Range:
1 … ∞ - segmentenum* required
Coronary segment to measure (SYNTAX naming, e.g. mLAD).
Possible values:
LM, pLAD, mLAD, dLAD, pLCx, dLCx, pRCA, mRCA, dRCA, PDA, PLB - pointslist<list<number>>
Optional. Two [x, y] pixel points bounding the lesion; default is the whole segment.
- optionsobject
- calibrationenum
Isocenter from DICOM geometry, catheter (give the size), or none (pixels only).
Default value:
"isocenter"Possible values:
isocenter, catheter, none - catheter_frenchenum
Possible values:
4, 5, 6, 7, 8
Example input:
{
"source_request": "req_01K6R4YQ8JT97KB6CQ643DZVMX",
"series_uid": "1.2.826.0.1.3680043.8.498.70321956482019375610283746501928",
"frame_number": 49,
"segment": "mLAD"
}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).
OpenAPI document: https://api.medrun.ai/v1/models/angio/coronary/qca/openapi.json