Developer API
Put the readiness pipeline inside your workflow
One HTTPS call per case runs the full IDR-A pipeline: safety scan, claim-type routing, evidence extraction with validation, deterministic readiness classification, and a sealed dossier. The API is stateless: nothing you send is stored, and every response carries Cache-Control: no-store.
How it works
- Send case text to
POST /api/processwith your partner API key. - Get the pipeline result back in one response: route, extracted fields with source spans, readiness class, and the sealed dossier.
- Hold the dossier yourself. The service keeps no copy. Run batches client-side with bounded concurrency.
Authentication
Every partner request carries your API key as a Bearer token:
Authorization: Bearer lr_your_partner_key_here
Keys are issued per partner company and rate-limited to 300 /api/process calls per hour. A key authorizes POST /api/process and GET /api/health only. The reviewer UI and the admin control center stay behind login sessions; keys never grant access to them. Lost or leaked a key? Tell us and we revoke it immediately, then issue a replacement.
Quickstart
curl -X POST https://idr.aitechpros.ai/api/process \
-H "Authorization: Bearer lr_your_partner_key_here" \
-H "Content-Type: application/json" \
-d '{"caseId": "case-001", "text": "Your de-identified case narrative here..."}'
Endpoints
POST /api/process
Runs the full pipeline for one case: safety scan, claim-type routing, extraction plus validation, readiness classification, and dossier with seal.
Request body
| Field | Type | Notes |
|---|---|---|
text | string, required | The case narrative. Max 100,000 characters. Synthetic or de-identified data only. |
caseId | string, optional | Your identifier for the case (max 120 chars). Generated for you when omitted. |
Response
| Field | Notes |
|---|---|
caseId | Echoed or generated case identifier. |
passed | true when the safety scan passed. When false, findings explains why and the pipeline stops. |
route | {claim_type, confidence, model, method}, plus codes when the deterministic code map fired or votes when the model voted: which claim type the router assigned and the evidence behind the call. |
fields | Extracted evidence fields (the 4 permitted factors). |
spans | Source spans backing each field: {factor, start, end, excerpt}. |
readiness | Deterministic readiness classification. No model involved. |
dossier | The sealed-ready dossier object. |
seal | Integrity seal over the dossier. Verify it before trusting the payload. |
stored | Always false. The service keeps nothing. |
GET /api/health
Liveness and version. Useful for monitoring your integration.
{"ok": true, "version": "0.1.0", "mode": "prototype", "synthetic": true}
Running a batch
A batch of N cases is N calls that you parallelize client-side with bounded concurrency (8 to 16 in flight works well). Wait for each response before counting the case done, and back off on 429. Keep your own ledger: the API stores nothing, so your case IDs are the record.
import json, urllib.request
API = "https://idr.aitechpros.ai/api/process"
KEY = "lr_your_partner_key_here"
def process_case(case_id, text):
req = urllib.request.Request(
API,
data=json.dumps({"caseId": case_id, "text": text}).encode(),
headers={"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(req, timeout=120) as r:
return json.load(r)
result = process_case("case-001", open("case-001.txt").read())
print(result["readiness"], result["seal"])
Limits and errors
| Status | Error | Meaning |
|---|---|---|
| 400 | text_required | The request body had no usable text string. |
| 401 | auth_required | Missing or unknown Bearer key. |
| 413 | text_too_large | Text exceeded 100,000 characters. Split the case and retry. |
| 429 | too_many_requests | Over 300 calls in the hour. Back off and retry. |
| 502 | extraction_failed | The extraction step failed. Retry; the scan already passed. |
| 503 | route_failed | The routing step failed. Retry. |
Data handling
- Stateless by design. Case text is processed in memory and never written to disk, KV, R2, or D1. No content logging.
- No real PHI. The prototype accepts synthetic or de-identified data only. Do not send protected health information.
- Human review required. Outputs are decision support for a named human reviewer, not determinations.
What IDR-A does not do
Logic Refinery IDR-A does not file disputes, decide eligibility, calculate qualifying payment amounts, recommend offers, replace legal advice, or guarantee outcomes. An educational and readiness tool, not legal advice.