Context
Reference
Context
Search with a structured Context Contract — hits, citations, exclusions, and limitations.
POST
Context
The recommended retrieval endpoint for agents. Returns the same hits asDocumentation Index
Fetch the complete documentation index at: https://docs.userepo.com/llms.txt
Use this file to discover all available pages before exploring further.
/v1/search but wraps them in a Context Contract so your agent knows exactly what was retrieved and what was excluded.
Required action
context
Cost
1 credit per call. Same billing rules as/v1/search and /v1/ask.
Body
Same as/v1/search:
The user-facing question or search phrase.
Maximum number of hits. Min 1, max 25.
Response
Full Context Contract — see the Context Contract concept page for the complete field reference. Abbreviated:Audit logging
Every/v1/context call records a context.retrieve audit event with metadata-only fields:
requestId(matches the contract)query(the search phrase)hitCount,citationCount,exclusionCountproviders(which providers contributed hits)
When to use this vs /v1/search
Use /v1/context when | Use /v1/search when |
|---|---|
| Building a production agent that needs to cite sources | Prototyping or one-off scripts |
| You want to know what was excluded and why | You only care about the top hits |
| You’re feeding the response into an LLM prompt | You’re feeding the response into your own UI |
| Compliance or audit requirements matter | Internal-only, dev use |