Skip to main content
POST
Context
The recommended retrieval endpoint for agents. Returns the same hits as /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:
string
required
The user-facing question or search phrase.
integer
default:"8"
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, exclusionCount
  • providers (which providers contributed hits)
The full hit content is not logged — only counts and identifiers — so the audit log stays small and compliance-safe.

When to use this vs /v1/search