Skip to main content
POST
Patient-contextualized answer with conflicts

Authorizations

Authorization
string
header
required

Locus API key — paste the raw lsk_… value (no 'Bearer ' prefix).

Body

application/json
query
string
required

Free-text clinical question in French.

Minimum string length: 1
Example:

"Quelle antibiothérapie pour cette infection urinaire ?"

patient_context
PatientContext · object
required

Coarse patient profile used to contextualize the answer and surface conflicts (allergies, interactions, pregnancy, age…).

source_ids
integer[] | null

Optional allow-list of source ids to restrict retrieval. Omit (the default) to search all sources.

Example:

Response

Successful Response

query
string
required

Echo of the submitted question.

answer
string
required

Concise answer grounded ONLY in the retrieved sources, taking the patient profile into account.

sources
AnswerSource · object[]
required

Citations actually used — deduplicated by recommendation.

conflicts
Conflict · object[]
required

Tensions between the recommendations and the patient profile. Empty when none are detected.

reformulated_question
string | null

The question restated clearly by the model.

steps
Step · object[]

The agentic pipeline as input→output steps (retrieve → rerank → synthesize). Display-only; for UIs that 'show the reasoning'. Safe to ignore.

evidence
EvidenceSource · object[]

The sources that grounded the answer, as structured stacks (metadata + their excerpt units), grouped by recommendation. Richer than sources (which is the deduped citation line). Display-only.

tokens_in
integer | null

Prompt tokens billed.

tokens_out
integer | null

Completion tokens billed.