Skip to main content
POST
/
v1
/
answer
Grounded clinical answer with citations
curl --request POST \
  --url https://core.locusmedical.fr/v1/answer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "source_ids": []
}
'
{
  "query": "<string>",
  "answer": "<string>",
  "sources": [
    {
      "reco_id": 123,
      "reco_title": "<string>",
      "source_name": "<string>",
      "deep_link": "<string>"
    }
  ],
  "reformulated_question": "<string>",
  "tokens_in": 123,
  "tokens_out": 123
}

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 antibioprophylaxie pour une chirurgie colorectale ?"

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. If the knowledge base does not cover the question, a fixed 'not found' sentence.

sources
AnswerSource · object[]
required

Citations actually used — deduplicated by recommendation.

reformulated_question
string | null

The question restated clearly by the model.

tokens_in
integer | null

Prompt tokens billed.

tokens_out
integer | null

Completion tokens billed.