PMcardio — EKG → PDF Diagnostic API =================================== Send a digital EKG (a DICOM file) and get back a diagnostic PDF plus the Queen of Hearts verdict. This endpoint is a thin, single-call wrapper — no platform account required. USAGE POST https://prototype.pmcardio.com/ Headers Authorization: Bearer (required — provided to you by PMcardio) randomize: true (optional — testing aid, see NOTES) Body The raw bytes of the .dcm file, sent as-is (not multipart, not base64). RESPONSE — 200, application/json { "report_id": "", report identifier "verdict": "positive" | "negative" | "inconclusive", Queen of Hearts "pdf": "" diagnostic PDF } EXAMPLE # Send an EKG and pretty-print the JSON: curl -sS -X POST 'https://prototype.pmcardio.com/' \ -H 'Authorization: Bearer YOUR_TOKEN' \ --data-binary @ecg.dcm # Send an EKG and save the returned PDF to report.pdf: curl -sS -X POST 'https://prototype.pmcardio.com/' \ -H 'Authorization: Bearer YOUR_TOKEN' \ --data-binary @ecg.dcm \ | jq -r .pdf | base64 -d > report.pdf ERRORS — non-2xx, application/json { "code": "duplicate_signal", stable identifier — branch on this "error": "This ECG has already…" human-readable prose — may be reworded } STATUS CODES 200 success 400 bad_request / invalid_dicom — the body was not a valid DICOM file 401 unauthorized — missing or invalid bearer token 409 duplicate_signal — this exact recording was already submitted; the platform keeps one report per distinct signal, so no new report was created. Not an error in the service: re-use the report you received for the original submission. Re-sending will keep returning 409. 422 ingest_rejected — the file was read but could not be processed 504 upstream_timeout — the report was not ready in time; safe to retry 5xx a temporary server / upstream problem — retry later NOTES • Send the DICOM as the raw request body. Do not wrap it in multipart or base64. • Each distinct ECG is stored once. Submitting the same recording twice returns 409 'duplicate_signal' rather than a second, duplicate report. • The 'randomize' header perturbs one ECG lead so an identical file can be re-submitted as a fresh report during testing (this is how it sidesteps the 409 above). It ALTERS THE SIGNAL, so never use it in production or on real patient data.