API Reference

Ask Endpoint

Plan tool calls over the governed read surface, execute them under the as-of/trust gate, and synthesize a cited answer through the shared Corpus API runtime.

POST /ask

Plan tool calls over the governed read surface, execute them under the as-of/trust gate, and synthesize a cited answer through the shared Corpus API runtime.

Category: Search

Authentication

Send the provisioned API key in the X-API-KEY header.

Required scopes: rag:search.

Also requires at least one of: us:read, india:read.

Cross-jurisdiction requests require both jurisdiction scopes.

Request

This operation has no path, query, header, or cookie parameters.

Request body

Content type: application/json. Required: yes. Schema: AskRequest.

{
  "q": "string",
  "as_of": "2025-12-31T23:59:59Z",
  "market": "US"
}

Example request

curl --request POST \
  --url 'https://corpus-api.onera.app/ask' \
  --header "X-API-KEY: ${CORPUS_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
  "q": "string",
  "as_of": "2025-12-31T23:59:59Z",
  "market": "US"
}'

Responses

StatusDescriptionContent typeSchema
200Successful Responseapplication/jsonAskResponse
400Invalid parameter combinationapplication/jsonErrorResponse
401Missing or invalid API keyapplication/jsonErrorResponse
403Insufficient jurisdiction or scopeapplication/jsonErrorResponse
404Unknown resourceapplication/jsonErrorResponse
422Request schema validation failedapplication/jsonErrorResponse
429Rate limit exceededapplication/jsonErrorResponse
503Source content is unavailable or still processingapplication/jsonErrorResponse

Representative 200 response

{
  "answer": "string",
  "planner": "llm",
  "as_of": "2025-12-31T23:59:59Z",
  "steps": [
    {}
  ],
  "data": [
    {}
  ],
  "citations": [
    {}
  ],
  "model": "string",
  "note": "string"
}