ReadYourLab API
Submit CT and MRI image series from your own software and get back the same AI analysis reports our users see: one report per image series, plus a Full Scan Report that combines all series of a study.
- Base URL
- https://readyourlab.com/api/v1
- Format
- JSON responses, multipart upload
- Version
- 1
How it works
- Submit each image series you want analysed with
POST /series. The analysis starts right away. - Poll
GET /series/{id}untilstatusiscompleted. The response then carries the report. An analysis usually takes a few minutes. - For a study with two or more series: when every series is completed, request the Full Scan Report with
POST /studies/{study_uid}/report. A single-series study has no Full Scan Report; its series report is the complete result. - Poll
GET /studies/{study_uid}/reportuntilstatusiscompleted.
Everything you submit also appears in your account's normal dashboard, where you can open the slices in the viewer and export the reports as PDF or Word.
Authentication
API access is enabled per account. Contact us to have it switched on, then create your key on your profile page under API access. The key is shown once; store it as a secret. Creating a new key revokes the previous one immediately.
Send the key with every request:
Authorization: Bearer ryl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A missing, malformed or revoked key returns 401 with code unauthorized. Keys are for server-to-server use; never put one in a web page or mobile app.
Quick start
export RYL_API_KEY="ryl_..."
# 1. Submit one series: a zip of its DICOM files, in any order
curl -X POST https://readyourlab.com/api/v1/series \
-H "Authorization: Bearer $RYL_API_KEY" \
-F "files=@chest_ct_axial.zip"
# 2. Poll the series until "status": "completed"
curl https://readyourlab.com/api/v1/series/48211 \
-H "Authorization: Bearer $RYL_API_KEY"
# 3. Studies with 2+ series: request the Full Scan Report once all are completed
curl -X POST https://readyourlab.com/api/v1/studies/1.2.840.113619.2.55.3.6046.971.1/report \
-H "Authorization: Bearer $RYL_API_KEY"
# 4. Poll it until "status": "completed"
curl https://readyourlab.com/api/v1/studies/1.2.840.113619.2.55.3.6046.971.1/report \
-H "Authorization: Bearer $RYL_API_KEY"
Python sample
One short script: it zips a folder holding one series, submits it, waits for the analysis and saves the report. The files can be in any order.
pip install requests
export RYL_API_KEY="ryl_..."
python submit_series.py /path/to/series_folder
Contains submit_series.py, README.md and requirements.txt. Python 3.9+.
/series
Submit exactly one CT or MR image series as multipart/form-data. Every file is checked, and the upload is rejected with an error unless it is one clean series: only DICOM image files, one SeriesInstanceUID, one modality, each image once.
| Field | Description |
|---|---|
files required | The series' DICOM files. Repeat the field for loose .dcm files, or send one .zip. The folder layout inside the zip does not matter, but it must contain nothing else: a DICOMDIR, a report or any other non-image file is an error. |
patient_sex | M, F or O. Read from the DICOM header (PatientSex) when not sent; send it for anonymised files. A value sent here wins over the header. |
patient_birth_date | YYYY-MM-DD. Read from the DICOM header (PatientBirthDate) when not sent. The analysis needs both sex and birth date: without them, from the header or from these fields, the upload is rejected. |
clinical_info | Free text up to 4,000 characters: the clinical question, symptoms, history, prior findings. It is given to the analysis with the images. |
The files may be in any order. The slices are put in InstanceNumber order, exactly as in the ReadYourLab web app, whenever InstanceNumber agrees with the slice positions; if it is missing or contradicts them, the slices are ordered by their position in the body (ImagePositionPatient, per frame for multi-frame files). Up to 127 evenly spaced slices are analysed; for a large series you may send only 127 evenly spaced slices to make the upload and the processing faster. Each accepted series uses one analysis from your balance. The response is 202 Accepted with the series object described under Get a series report.
Submitting a series that is already in your account returns 409 duplicate_series with its series_id, so a retried request never pays twice.
/series/{id}
Status and, once completed, the report of one series.
{
"id": 48211,
"status": "completed",
"study_instance_uid": "1.2.840.113619.2.55.3.6046.971.1",
"series_instance_uid": "1.2.840.113619.2.55.3.6046.971.1.4",
"modality": "CT",
"series_description": "AXIAL 1.25mm",
"study_date": "2026-09-12",
"slices_received": 412,
"slices_analyzed": 127,
"created_at": "2026-10-16T09:12:44Z",
"completed_at": "2026-10-16T09:15:02Z",
"report": { ... }
}
| status | Meaning |
|---|---|
queued | Accepted and waiting for an analysis slot. |
processing | Being analysed. |
completed | report holds the report. |
failed | The analysis could not be completed. Retry it from the dashboard or contact us. |
pending | Stored but not started because the balance ran out. It starts automatically after you top up. |
/studies/{study_uid}/report
Request the Full Scan Report for a study: one report that reads all its completed series together. It needs at least two analysed series; for a study with one series the call returns 409 single_series, as that series' report is already the complete result. Call it once every series you submitted for the study is completed; until then it returns 409 series_in_progress. Returns 202 while the report is written and 200 with the report if it already exists. study_uid is the StudyInstanceUID from the DICOM header, as returned in the series object.
The report is generated only when you request it, once per request, so submit every series of the study first. Submitting another series to the study afterwards removes the report; request it again once that series is completed.
/studies/{study_uid}/report
{
"study_instance_uid": "1.2.840.113619.2.55.3.6046.971.1",
"status": "completed",
"series_ids": [48211, 48212, 48213],
"generated_at": "2026-10-16T09:21:37Z",
"report": { ... }
}
status is not_available (fewer than two analysed series), not_requested, generating or completed. series_ids lists the series the report covers. If a generation fails, the status returns to not_requested; request it again.
Report format
Series reports and the Full Scan Report share one JSON structure: the structured result the analysis produces, the same data the ReadYourLab web app displays. Reports are written in your account's language (set on the profile page). Every field may be empty. In the rare case that an analysis produced no structured result, report is null.
{
"clinical_summary": {
"exam_context": "Contrast-enhanced CT of the chest ...",
"body_regions": ["chest"],
"findings": ["..."],
"impression": ["..."],
"recommendations": ["..."]
},
"explanation_for_patients": {
"headline": "...",
"summary": "...",
"key_points": [{ "text": "...", "severity": "normal" }],
"recommended_next_steps": ["..."]
},
"suggested_questions": ["..."],
"medical_ai_disclaimer": { "summary": "...", "safety_points": ["..."] }
}
clinical_summaryis written for clinicians;explanation_for_patientsexplains the same result in plain language.severityisurgent,warningornormal. A key point without one is a plain string.body_regionsuseshead,neck,spine,chest,abdomen,pelvis,upper_extremity,lower_extremity,whole_body.
Highlighted key findings on the images (the slice and a box marking a finding) are a premium feature, as in our web plans, and are not included in the API at present. Contact us if you need them.
Reports are AI-generated explanations of the images, not a diagnosis. Clinical decisions remain with a qualified physician.
Errors
Errors return a JSON body with a human-readable message and a stable code:
{ "error": "Modality CR is not supported. Only CT and MR series are accepted.", "code": "unsupported_modality" }
| HTTP | code | When |
|---|---|---|
| 400 | no_files | No file was attached. |
| 400 | missing_field / invalid_field | Patient sex or birth date is neither in the DICOM header nor sent as a field (fields names it), or a field is invalid. |
| 400 | non_dicom_files | Some files are not DICOM images (DICOMDIR, reports, other files). files names them. |
| 400 | invalid_dicom | No DICOM image in the upload, or a file has no SeriesInstanceUID. |
| 400 | multiple_series | More than one series in one request. series_instance_uids lists them. |
| 400 | multiple_modalities | The files carry more than one modality. |
| 400 | duplicate_images | The same image (SOPInstanceUID) is in the upload more than once. |
| 400 | unsupported_modality | Not CT or MR (X-ray, ultrasound, PET and others are not available through the API yet). |
| 400 | too_many_files / file_too_large | A zip holds more than 10,000 files, or one file in it is over 300 MB. |
| 401 | unauthorized | Missing, malformed or revoked API key. |
| 402 | insufficient_balance | No analyses left. Nothing was stored. |
| 402 | purchase_required | The Full Scan Report needs a purchased package. |
| 404 | not_found | No such series or study in your account. |
| 409 | duplicate_series | The series was already submitted; series_id points to it. |
| 409 | series_in_progress / single_series | The study's series are not all completed yet, or the study has fewer than two analysed series (no Full Scan Report). |
| 413 | too_large | The request is over 250 MB, or has more than 1,000 loose files (send a zip). |
| 429 | Rate limit reached; wait and retry. |
Limits and pricing
- Pricing: one analysis per submitted image series, from your account balance (see Pro pricing). The Full Scan Report is included. Your balance is shown on the profile page.
- Request size: 250 MB. For a larger series, send an evenly spaced subset of its slices; we analyse at most 127 per series anyway.
- Rate limit: 30 requests per minute. Poll every 15–30 seconds; an analysis takes a few minutes.
- Modalities: CT and MR.
Data and security
Submitted series are stored in your account like any upload: hosted in the European Union, encrypted at rest, and visible in your dashboard, where you can delete them. Read more on our data security page. If you send identifiable patient data, contact us for a data processing agreement first, or anonymise the series and pass sex and birth date as form fields.
Questions, a callback integration or other formats: contact us.