Query multiple corpora
POST/v2/query
Queries one or more corpora and generates a response with Retrieval Augmented Generation (RAG). Similar to the advanced single corpus query.
- Set the unique
corpus_keyfor each corpus to query. You create the key in the Vectara Console or the Create Corpus API. You can assign a customcorpus_keythat follows your preferred naming convention. Search requests reference the corpus by this key. - Customize the search with the query text (
query), pagination (offsetandlimit), and metadata filters (metadata_filter). - Apply reranking (
reranker) to improve the order of results. Opt in to generation by setting thegenerationproperty. If you exclude the property or set it to null, the response does not include generation. Learn more - Set
generation_preset_nameto Vectara's RAG-focused LLM (Mockingbird). Learn more - Control summarization with parameters such as
max_response_characters,temperature, andfrequency_penalty. Learn more - Customize citation formats in summaries with the
citationsobject: numeric, HTML, or Markdown links. Learn more
Request
Responses
- 200
- 400
- 403
- 404
- 429
A response to a query.
Query request was malformed.
Permissions do not allow querying one or more corpora in the request.
One or more of the corpora were not found.
An LLM quota configured on the LLM used for generation is exhausted. Returned when the request is not streamed, or when a streamed request is refused before anything was emitted; a streamed request that has already begun emitting receives the refusal as an error event in the stream. The message in the body names the quota and the seconds until its window resets. No Retry-After header is sent.