Endpoints
Answer
Retrieval plus grounded generation — a cited answer composed only from chunks the caller may see.
POST/v1/answer
Retrieves policy-scoped chunks (exactly as /v1/retrieve)
and then composes a grounded answer from them, with citations. The generator
only ever sees chunks the caller is allowed to see — policy binds at retrieval,
so the answer can't leak private knowledge.
Request body
Everything from /v1/retrieve, plus optional conversation
history:
Prop
Type
{
"query": "and how long does porting take?",
"surface": "site_chatbot",
"history": [
{ "role": "user", "content": "how do I port my number?" },
{ "role": "assistant", "content": "Submit a request in Settings → Numbers…" }
]
}Response
Prop
Type
Each Citation:
Prop
Type
{
"answer": "Porting usually completes within 2–3 business days once you submit the request in Settings → Numbers. [1]",
"citations": [
{ "docId": "website/porting", "sourceSystem": "website", "snippet": "Porting typically takes 2–3 business days…", "score": 0.79 }
],
"decisionId": "dec_a71b…",
"snapshotId": "snap_v3_10421_b17",
"usedChunkIds": ["chunk:port_faq_2", "chunk:port_faq_5"]
}Try it
POST http://localhost:8080/v1/answer
In mock mode the answer is a deterministic canned composition — enough to see
the citation wiring. Set AI_PROVIDER=openai for real generation.