Skip to main content
Docs vCurrentAPI
Version: Current

Batch analysis

Analyze several prescriptions in a single call. Each item is independent and counts as one analysis for quota/billing; a single item failure does not bring down the batch.

Copia um prompt pronto com fluxo de integração, payload e exemplos.

Endpoint

POST /api/v1/interactions/batch (API key auth, scope interactions:check).

{
"items": [
{ "medications": [ { "name": "ibuprofeno" }, { "name": "naproxeno" } ],
"patient_record": { "conditions": ["insuficiência renal"] } },
{ "medications": [ { "name": "paracetamol" }, { "name": "omeprazol" } ] }
]
}

Response

{
"count": 2,
"ok": 2,
"errors": 0,
"results": [
{ "index": 0, "status": "ok", "response": { "prescription_risk_level": "HIGH", "...": "..." } },
{ "index": 1, "status": "ok", "response": { "prescription_risk_level": "LOW", "...": "..." } }
]
}

Failed items come back with "status": "error" and a message in error (e.g. rate limit), without interrupting the others.

Supports Idempotency-Key (the whole batch is the idempotent unit). For large volumes, parallelize on the client; async queue processing is on the roadmap.