bigRAG
API Reference

Chat

Stateless playground chat API with retrieval, generated answers, and citations.

Base path: /v1/chat

The chat API retrieves chunks from a collection, builds the grounded prompt on the backend, calls the configured chat provider, and returns cited answers. Source context includes document IDs, filenames, chunk labels, document metadata, and chunk text. It does not store chat messages or conversations.

Accepts session auth and API-key auth. Scoped API keys can use chat when granted chat:write; collection-pinned keys can only chat against their pinned collection.

Provider configuration:

  • Supported providers: openai and openai_compatible. Save the provider key in the admin UI at chat.openai_key.
  • API clients can also pass provider_api_key per request to bypass the saved key.
  • BIGRAG_CHAT_API_KEY is an instance-level fallback for the default OpenAI chat endpoint only. If chat_base_url or request provider_base_url points to a non-default OpenAI-compatible endpoint, a saved chat key or provider_api_key is required — the instance fallback key is rejected before any provider call.