### First-run Setup Source: https://rag.computer/docs/api-reference/authentication Endpoints for initial setup, including checking setup status and creating the first admin account. The setup endpoint works only once. ```APIDOC ## Check setup status ### Description Checks if the initial setup is still required. ### Method GET ### Endpoint /v1/auth/setup-status ## Create first admin ### Description Creates the first administrator account. This endpoint can only be successfully called once. ### Method POST ### Endpoint /v1/auth/setup ### Request Body - **email** (string) - Required - The email address for the admin account. - **password** (string) - Required - The password for the admin account. - **display_name** (string) - Required - The display name for the admin account. ### Request Example ```json { "email": "admin@example.com", "password": "a-strong-password", "display_name": "Admin" } ``` ``` -------------------------------- ### Initial Setup and Login Source: https://rag.computer/docs/api-reference/authentication Endpoints for the initial setup of the API and user login. These are accessible without authentication. ```APIDOC ## GET /v1/auth/setup-status ### Description Checks the setup status of the API to determine if initial configuration is needed. ### Method GET ### Endpoint /v1/auth/setup-status ### Parameters None ### Request Example None ### Response #### Success Response (200) - **is_setup** (boolean) - True if the initial setup has been completed, false otherwise. #### Response Example { "is_setup": false } ## POST /v1/auth/setup ### Description Performs the initial setup for the API. This endpoint should only be called once. ### Method POST ### Endpoint /v1/auth/setup ### Parameters #### Request Body - **password** (string) - Required - The password for the initial administrator account. - **password_confirmation** (string) - Required - Confirmation of the administrator password. ### Request Example { "password": "yourStrongPassword", "password_confirmation": "yourStrongPassword" } ### Response #### Success Response (200) - **message** (string) - Indicates successful setup. #### Response Example { "message": "Setup complete." } ## POST /v1/auth/login ### Description Logs in a user to the API. ### Method POST ### Endpoint /v1/auth/login ### Parameters #### Request Body - **username** (string) - Required - The user's username. - **password** (string) - Required - The user's password. ### Request Example { "username": "user@example.com", "password": "userPassword" } ### Response #### Success Response (200) - **session_token** (string) - The session token for authenticated requests. #### Response Example { "session_token": "yourSessionToken" } ``` -------------------------------- ### Check Setup Status and Create First Admin Source: https://rag.computer/docs/api-reference/authentication Use this endpoint to check if the initial admin setup is required. If it is, use the POST request to create the first admin account with email, password, and display name. ```bash # Check whether setup is still required curl http://localhost:4000/v1/auth/setup-status # → {"needs_setup": true} # Create the first admin (works exactly once) curl -X POST http://localhost:4000/v1/auth/setup \ -H "Content-Type: application/json" \ -d '{ "email": "admin@example.com", "password": "a-strong-password", "display_name": "Admin" }' ``` -------------------------------- ### Install and Run bigRAG Backend from Source (uv) Source: https://rag.computer/docs/getting-started/installation Navigate to the API directory, install dependencies using uv, and run the backend. This method is for running from source. ```bash cd api uv sync uv run python -m bigrag.main ``` -------------------------------- ### client.auth.setupStatus Source: https://rag.computer/docs/sdks/typescript Checks the authentication setup status. ```APIDOC ## client.auth.setupStatus ### Description Checks whether the authentication system has been initialized or requires setup. ### Method Signature ```typescript setupStatus(): Promise; ``` ``` -------------------------------- ### Install and Run bigRAG Backend from Source (venv/pip) Source: https://rag.computer/docs/getting-started/installation Create a virtual environment, activate it, install the backend in editable mode using pip, and then run the main module. ```bash cd api python -m venv .venv && source .venv/bin/activate pip install -e . python -m bigrag.main ``` -------------------------------- ### Install bigrag CLI Source: https://rag.computer/docs/sdks/mcp Install the bigrag CLI tool for local stdio MCP server setup. This can be done using 'uv tool install' or 'pip install'. ```Shell uv tool install bigrag # or: pip install bigrag ``` -------------------------------- ### Start Infrastructure Services with Docker Compose Source: https://rag.computer/docs/getting-started/installation Start only the PostgreSQL and Redis services using Docker Compose, useful for running the backend from source. ```bash docker compose up postgres redis -d ``` -------------------------------- ### Multi-Collection Query Example Source: https://rag.computer/docs/concepts/search Example of querying multiple collections simultaneously to get a unified answer from distributed content. ```curl curl -X POST http://localhost:4000/v1/query \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"machine learning","collections":["docs","papers"],"top_k":20}' ``` -------------------------------- ### Start bigRAG with Docker Compose Source: https://rag.computer/docs/getting-started/installation Use this command to quickly start the full bigRAG stack using Docker Compose. This includes the API, Admin UI, PostgreSQL, and Redis. ```bash docker compose up -d ``` -------------------------------- ### Usage Response Example Source: https://rag.computer/docs/api-reference/usage Example of the JSON response structure for the Usage API. It includes overall statistics and a breakdown by collection. ```json { "window_days": 30, "queries_total": 9122, "queries_per_day_avg": 304.07, "documents_total": 482, "chunks_total": 18420, "storage_bytes_total": 52428800, "embedding_tokens_total": 1820432, "embedding_cost_usd_estimate": 0.36, "avg_latency_ms": 142.31, "timeline": [ { "date": "2026-05-16T00:00:00Z", "queries": 230, "avg_latency_ms": 138.44 } ], "by_collection": [ { "collection": "knowledge_base", "documents": 15, "chunks": 482, "storage_bytes": 52428800, "embedding_tokens": 125000, "embedding_cost_usd_estimate": 0.0250, "queries": 1203, "avg_latency_ms": 142.31 } ] } ``` -------------------------------- ### Worker Command Example Source: https://rag.computer/docs/deployment/production This is the command used to start a bigRAG worker process, specifying the number of processes and threads. ```bash bigrag-worker --processes 1 --threads 8 ``` -------------------------------- ### Run Admin UI Source: https://rag.computer/docs/admin-ui Use this command to start the admin UI development server. It runs on http://localhost:3000. ```bash pnpm dev:app # admin UI on http://localhost:3000 ``` -------------------------------- ### Install TypeScript SDK Source: https://rag.computer/docs/sdks/typescript Install the BigRAG TypeScript client using npm. This package is compatible with Node.js 18+, browsers, Deno, Bun, and edge runtimes. ```bash npm install @bigrag/client ``` -------------------------------- ### Create Collection with Default Query Settings Source: https://rag.computer/docs/concepts/collections This example shows how to create a collection and set default query parameters like top_k, min_score, and search_mode. These defaults are used if not specified during a query. ```bash curl -X POST http://localhost:4000/v1/collections \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "docs", "default_top_k": 20, "default_min_score": 0.3, "default_search_mode": "hybrid" }' ``` -------------------------------- ### Get Vector Storage Overview Source: https://rag.computer/docs/sdks/python Retrieve an overview of the vector storage. ```APIDOC ## Get Vector Storage Overview ### Description Retrieve an overview of the vector storage. ### Method `client.admin.vector_storage.overview()` ``` -------------------------------- ### Install bigRAG Python SDK Source: https://rag.computer/docs/sdks/python Install the bigRAG Python SDK using pip. Ensure you are using Python 3.11 or newer. The SDK has httpx as its only runtime dependency. ```bash pip install bigrag==2026.5.23 ``` -------------------------------- ### Create First Admin User Source: https://rag.computer/docs/getting-started/quickstart Creates the initial administrator account. This endpoint is only available during the initial setup phase when `needs_setup` is true. It also saves session cookies for subsequent requests. ```bash export BASE="http://localhost:4000" curl -X POST $BASE/v1/auth/setup \ -H "Content-Type: application/json" \ -d '{ "email": "admin@example.com", "password": "a-strong-password", "display_name": "Admin" }' \ -c cookies.txt ``` -------------------------------- ### Check Authentication Setup Status Source: https://rag.computer/docs/sdks/typescript Determine if the authentication system has been set up using `client.auth.setupStatus`. This is typically the first step before other auth operations. ```typescript client.auth.setupStatus() ``` -------------------------------- ### Quick Start: Initialize and Use bigRAG Client Source: https://rag.computer/docs/sdks/python Initialize the async bigRAG client, create a collection, upload a document, and query the collection. The client requires an API key and is used within an async context manager. ```python import asyncio from bigrag import BigRAG async def main(): async with BigRAG(api_key="bigrag_sk_…") as client: # minted at /v1/admin/api-keys # Create a collection collection = await client.collections.create({ "name": "knowledge_base", "description": "Company docs", }) # Upload a document doc = await client.documents.upload( "knowledge_base", "/path/to/report.pdf", ) # Query the collection results = await client.queries.query("knowledge_base", { "query": "What is our revenue?", "top_k": 5, }) for r in results["results"]: print(f"[{r['score']:.3f}] {r['text'][:100]}") asyncio.run(main()) ``` -------------------------------- ### Realtime Token Generation Source: https://rag.computer/docs/api-reference/realtime Example of how to obtain a short-lived realtime token for authentication. ```APIDOC ## Realtime Token Generation ### Description This section shows how to generate a short-lived realtime token, which can be used for authentication when a browser cannot send bearer headers during the WebSocket handshake. ### Request Example ```bash TOKEN=$(curl -s -X POST http://localhost:4000/v1/collections/docs/realtime-token \ -H "Authorization: Bearer $BIGRAG_API_KEY" | jq -r .token) ``` ### Usage - The `POST /v1/collections/{name}/realtime-token` endpoint is used to request a token. - An `Authorization: Bearer $BIGRAG_API_KEY` header is required. - The response contains a `token` field which is the generated realtime token. - Tokens are short-lived (5 minutes) and collection-scoped. ``` -------------------------------- ### Configure vLLM Collection (OpenAI-Compatible) Source: https://rag.computer/docs/concepts/embeddings Example cURL command to create a new collection using a vLLM endpoint, which is OpenAI-compatible. Specify the base URL and model. ```shell curl -X POST http://localhost:4000/v1/collections \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "vllm_collection", "embedding_provider": "openai_compatible", "embedding_model": "BAAI/bge-large-en-v1.5", "embedding_base_url": "http://vllm.internal:8000/v1", "embedding_api_key": "dummy", "dimension": 1024 }' ``` -------------------------------- ### Get Vector Storage Overview Source: https://rag.computer/docs/sdks/python Retrieve an overview of the platform's vector storage utilization and status. ```python overview = await client.admin.vector_storage.overview() ``` -------------------------------- ### Get Question Suggestions Source: https://rag.computer/docs/sdks/typescript Retrieve suggested questions for a given collection. ```typescript const suggestions = await client.chat.getQuestionSuggestions("docs"); ``` -------------------------------- ### Quick Start: BigRAG TypeScript SDK Source: https://rag.computer/docs/sdks/typescript Initialize the BigRAG client, create a collection, upload a document, poll its processing status, and perform a query. Ensure your API key is set as an environment variable or passed directly. ```typescript import { BigRAG } from "@bigrag/client"; const client = new BigRAG({ apiKey: process.env.BIGRAG_API_KEY!, // bigrag_sk_... minted via /v1/admin/api-keys baseUrl: "http://localhost:4000", }); // Create a collection const collection = await client.collections.create({ name: "knowledge_base", description: "Company docs", chunk_size: 512, }); // Upload a document const doc = await client.documents.upload("knowledge_base", file); // Poll processing status let current = doc; while (current.status === "pending" || current.status === "processing") { await new Promise((resolve) => setTimeout(resolve, 2000)); current = await client.documents.get("knowledge_base", doc.id); console.log(current.progress?.message ?? current.status); } // Query const { results } = await client.queries.query("knowledge_base", { query: "What is the PTO policy?", top_k: 5, }); ``` -------------------------------- ### Get Platform Statistics Source: https://rag.computer/docs/sdks/python Retrieve overall statistics and metrics for the platform. ```python stats = await client.get_stats() ``` -------------------------------- ### Metadata Filtering Example Source: https://rag.computer/docs/concepts/search Demonstrates how to apply metadata filters for exact matches on fields like 'author' and 'year'. ```json { "filters": { "author": "Smith", "year": 2026 } } ``` -------------------------------- ### Configure Local OpenAI-Compatible Collection (Ollama) Source: https://rag.computer/docs/concepts/embeddings Example cURL command to create a new collection using an OpenAI-compatible endpoint, such as Ollama. Provide the base URL and model name. ```shell curl -X POST http://localhost:4000/v1/collections \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "local_collection", "embedding_provider": "openai_compatible", "embedding_model": "nomic-embed-text", "embedding_base_url": "http://ollama.internal:11434/v1", "embedding_api_key": "ollama", "dimension": 768 }' ``` -------------------------------- ### Get Vector Storage Overview Source: https://rag.computer/docs/sdks/typescript Retrieve an overview of the system's vector storage utilization using `client.admin.vectorStorage.overview`. ```typescript client.admin.vectorStorage.overview() ``` -------------------------------- ### Run bigRAG in Development Mode Source: https://rag.computer/docs/getting-started/installation Execute the dev.sh script to start all services and the backend with auto-reloading for development purposes. ```bash ./dev.sh ``` -------------------------------- ### API Key Scopes Example Source: https://rag.computer/docs/concepts/security Defines the available scopes for API keys, which restrict access to specific resources and actions. A wildcard '*' can be used. Missing scopes result in a 403 error. ```text collection:read # GET /v1/collections, GET /v1/collections/{name}, stats collection:write # POST, PUT collections collection:delete # DELETE collections, truncate document:upload # POST /v1/collections/{name}/documents, batch upload, upload sessions document:read # GET documents, chunks, elements, batch get/status, /v1/documents/{id} document:delete # DELETE documents, batch delete query:read # POST /query, /batch/query, /collections/{name}/query chat:read # GET /v1/chat/question-suggestions chat:write # POST /v1/chat, POST /v1/chat/question-suggestions vector:write # POST /v1/collections/{name}/vectors/upsert vector:delete # POST /v1/collections/{name}/vectors/delete audit:read # GET /v1/usage *:* # equivalent to no scopes ``` -------------------------------- ### Get Platform Usage Source: https://rag.computer/docs/sdks/python Fetch platform usage data over a specified time window, in days. ```python usage = await client.get_usage(window_days=30) ``` -------------------------------- ### client.auth.setup Source: https://rag.computer/docs/sdks/typescript Sets up authentication with initial credentials. ```APIDOC ## client.auth.setup ### Description Initializes the authentication system by setting up the first user account. ### Method Signature ```typescript setup(options: { email: string; password: string; display_name?: string }): Promise; ``` ### Parameters - **email** (string) - Required - The email address for the initial user. - **password** (string) - Required - The password for the initial user. - **display_name** (string) - Optional - The display name for the initial user. ``` -------------------------------- ### Configure OpenAI Collection Source: https://rag.computer/docs/concepts/embeddings Example cURL command to create a new collection using the OpenAI embedding provider. Specify the model, API key, and dimensions. ```shell curl -X POST http://localhost:4000/v1/collections \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "openai_collection", "embedding_provider": "openai", "embedding_model": "text-embedding-3-small", "embedding_api_key": "sk-...", "dimension": 1536 }' ``` -------------------------------- ### Set Up Authentication Source: https://rag.computer/docs/sdks/typescript Initialize the authentication system by providing an email and password using `client.auth.setup`. An optional display name can also be set. ```typescript client.auth.setup({ email, password, display_name? }) ``` -------------------------------- ### Get Access Overview Source: https://rag.computer/docs/sdks/typescript Obtain a summary of access activity over a specified period using `client.admin.access.overview`. The `windowDays` parameter defines the lookback period. ```typescript client.admin.access.overview({ windowDays? }) ``` -------------------------------- ### Keyword Search Query Source: https://rag.computer/docs/concepts/search Use keyword search for exact terms, product codes, IDs, or proper nouns. This example searches for a specific error code. ```curl curl -X POST http://localhost:4000/v1/collections/docs/query \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "ERR-4021", "search_mode": "keyword"}' ``` -------------------------------- ### Get Collection Stats Source: https://rag.computer/docs/sdks/mcp Get statistics for a specific collection, including document, chunk, and token counts. ```APIDOC ## Get Collection Stats ### Description Get statistics for a specific collection, including document, chunk, and token counts. ### Method GET ### Endpoint /v1/collections/{name}/stats ### Parameters #### Path Parameters - **name** (string) - Required - The name of the collection. ``` -------------------------------- ### Audit Trail Query Example Source: https://rag.computer/docs/cookbook/multi-tenant-saas Fetches audit log entries, filtering by resource type. This is useful for compliance and security monitoring of privileged actions. Requires authentication via cookies. ```bash curl -b cookies.txt \ "http://localhost:4000/v1/admin/audit?resource_type=collection" ``` -------------------------------- ### Configure Cohere Collection Source: https://rag.computer/docs/concepts/embeddings Example cURL command to create a new collection using the Cohere embedding provider. Specify the model, API key, and dimensions. ```shell curl -X POST http://localhost:4000/v1/collections \ -H "Authorization: Bearer $BIGRAG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "cohere_collection", "embedding_provider": "cohere", "embedding_model": "embed-english-v3.0", "embedding_api_key": "co-...", "dimension": 1024 }' ``` -------------------------------- ### client.readiness() Source: https://rag.computer/docs/sdks/typescript Checks the readiness of the platform for operations. ```APIDOC ## GET /health/ready ### Description Checks the readiness of the platform for operations. ### Method GET ### Endpoint /health/ready ``` -------------------------------- ### Check Platform Readiness Source: https://rag.computer/docs/sdks/python Verify the readiness of the platform, including its dependencies like Postgres, Redis, and Turbopuffer. ```python ready = await client.readiness() ``` -------------------------------- ### client.admin.settings.list Source: https://rag.computer/docs/sdks/typescript Lists system settings. ```APIDOC ## client.admin.settings.list ### Description Retrieves the current configuration settings for the system. Requires admin privileges. ### Method Signature ```typescript list(): Promise; ``` ``` -------------------------------- ### Create a Backup Source: https://rag.computer/docs/sdks/typescript Initiate a new backup of the system's data using `client.admin.backups.create`. An optional label can be provided for identification. ```typescript client.admin.backups.create({ label? }) ``` -------------------------------- ### Get Collection Source: https://rag.computer/docs/sdks/typescript Retrieve a specific collection by its name. ```typescript client.collections.get(name) ``` -------------------------------- ### Get Document Source: https://rag.computer/docs/sdks/typescript Retrieve a specific document by its ID from a collection. ```typescript client.documents.get(collection, documentId) ``` -------------------------------- ### client.admin.mcpServers.create Source: https://rag.computer/docs/sdks/typescript Creates a new MCP server. ```APIDOC ## client.admin.mcpServers.create ### Description Creates a new MCP server configuration. Requires admin privileges. ### Method Signature ```typescript create(options: { title: string; server_name: string; collection?: string; }): Promise; ``` ### Parameters - **title** (string) - Required - A display title for the MCP server. - **server_name** (string) - Required - The name of the MCP server. - **collection** (string) - Optional - The collection associated with this MCP server. ``` -------------------------------- ### Get Collection Stats Source: https://rag.computer/docs/sdks/typescript Retrieve statistics for a specific collection. ```typescript client.collections.stats(name) ``` -------------------------------- ### client.webhooks.list Source: https://rag.computer/docs/sdks/typescript Lists all configured webhooks. ```APIDOC ## client.webhooks.list ### Description Retrieves a list of all currently configured webhooks. ### Method Signature ```typescript list(options?: { limit?: number; offset?: number }): Promise; ``` ### Parameters - **limit** (number) - Optional - The maximum number of webhooks to return. - **offset** (number) - Optional - The number of webhooks to skip before returning results. ``` -------------------------------- ### Get Backup Source: https://rag.computer/docs/sdks/python Retrieve details for a specific backup by its ID. ```APIDOC ## Get Backup ### Description Retrieve details for a specific backup by its ID. ### Method `client.admin.backups.get(backup_id)` ### Parameters #### Path Parameters - **backup_id** (string) - Required - The ID of the backup to retrieve. ``` -------------------------------- ### Get Webhook Source: https://rag.computer/docs/sdks/python Retrieve details for a specific webhook by its ID. ```APIDOC ## Get Webhook ### Description Retrieve details for a specific webhook by its ID. ### Method `client.webhooks.get(webhook_id)` ### Parameters #### Path Parameters - **webhook_id** (string) - Required - The ID of the webhook to retrieve. ``` -------------------------------- ### Build Admin UI Docker Image Source: https://rag.computer/docs/deployment/docker Build the Docker image for the static admin UI. Ensure you are in the repository root. ```bash docker build -f app/Dockerfile -t bigrag-ui . ``` -------------------------------- ### Get a bigRAG Collection Source: https://rag.computer/docs/sdks/python Retrieve a specific collection by its name. ```python # Get collection = await client.collections.get("docs") ``` -------------------------------- ### client.admin.backups.create Source: https://rag.computer/docs/sdks/typescript Creates a new backup. ```APIDOC ## client.admin.backups.create ### Description Initiates the creation of a new backup of the system's data. Requires admin privileges. ### Method Signature ```typescript create(options?: { label?: string }): Promise; ``` ### Parameters - **label** (string) - Optional - A custom label for the backup. ``` -------------------------------- ### Get Collection Analytics Source: https://rag.computer/docs/sdks/typescript Retrieve analytical data for a specific collection. ```typescript client.collections.analytics(name) ``` -------------------------------- ### client.admin.users.create Source: https://rag.computer/docs/sdks/typescript Creates a new user. ```APIDOC ## client.admin.users.create ### Description Creates a new user account in the system. Requires admin privileges. ### Method Signature ```typescript create(options: { email: string; password: string; display_name?: string; role?: string; }): Promise; ``` ### Parameters - **email** (string) - Required - The email address for the new user. - **password** (string) - Required - The password for the new user. - **display_name** (string) - Optional - The display name for the new user. - **role** (string) - Optional - The role assigned to the new user. ``` -------------------------------- ### Get Document Status Source: https://rag.computer/docs/sdks/python Retrieve the processing status of a single document. ```APIDOC ## Get Document Status ### Description Retrieve the processing status of a single document. ### Method `client.documents.get(collection_name, document_id)` ### Parameters #### Path Parameters - **collection_name** (string) - Required - The name of the collection. - **document_id** (string) - Required - The ID of the document. ``` -------------------------------- ### Get Collection Analytics Source: https://rag.computer/docs/sdks/python Retrieve analytical data for a specific collection. ```python analytics = await client.collections.analytics("docs") ``` -------------------------------- ### admin.platform.readiness Source: https://rag.computer/docs/api-reference/realtime Checks the readiness of the platform. ```APIDOC ## GET /health/ready ### Description Checks the readiness of the platform. This endpoint stays open to provide continuous health status. ### Method GET ### Endpoint /health/ready ``` -------------------------------- ### Get Document Chunks Source: https://rag.computer/docs/sdks/mcp Retrieve all chunks associated with a specific document. ```APIDOC ## Get Document Chunks ### Description Retrieve all chunks associated with a specific document. ### Method GET ### Endpoint /v1/collections/{name}/documents/{id}/chunks ### Parameters #### Path Parameters - **name** (string) - Required - The name of the collection. - **id** (string) - Required - The ID of the document. ``` -------------------------------- ### Get Document Source: https://rag.computer/docs/sdks/mcp Retrieve metadata for a single document within a collection. ```APIDOC ## Get Document ### Description Retrieve metadata for a single document within a collection. ### Method GET ### Endpoint /v1/collections/{name}/documents/{id} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the collection. - **id** (string) - Required - The ID of the document. ``` -------------------------------- ### Create Backup Source: https://rag.computer/docs/sdks/python Create a new backup. ```APIDOC ## Create Backup ### Description Create a new backup. ### Method `client.admin.backups.create(backup_config)` ### Parameters #### Request Body - **backup_config** (object) - Required - Configuration for the backup (e.g., `{"label": "nightly export"}`). ``` -------------------------------- ### Create a User Source: https://rag.computer/docs/sdks/typescript Add a new user to the system using `client.admin.users.create`. Requires email, password, and optionally display name and role. ```typescript client.admin.users.create({ email, password, display_name?, role? }) ``` -------------------------------- ### Get Collection Source: https://rag.computer/docs/sdks/mcp Retrieve embedding and chunking configuration for a specific collection. ```APIDOC ## Get Collection ### Description Retrieve the embedding and chunking configuration for a specific collection. ### Method GET ### Endpoint /v1/collections/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the collection. ``` -------------------------------- ### Recommended Production Settings Source: https://rag.computer/docs/deployment/production Essential environment variables for production, focusing on security, logging, and infrastructure configuration. ```dotenv # Mode BIGRAG_ENV=prod # refuses to boot with insecure defaults # Sessions BIGRAG_SESSION_COOKIE_SECURE=true # HTTPS-only BIGRAG_SESSION_COOKIE_SAMESITE=lax # use none when API and admin UI are cross-site BIGRAG_CORS_ORIGINS=["https://admin.example.com"] BIGRAG_TRUSTED_PROXIES=["10.0.0.0/8"] # your reverse-proxy/load-balancer CIDRs # Logs BIGRAG_LOG_LEVEL=info BIGRAG_LOG_FORMAT=json # Auth is admin accounts + minted bigrag_sk_ keys. # Bootstrap with POST /v1/auth/setup, then mint service keys at /v1/admin/api-keys. # Infrastructure BIGRAG_DATABASE_URL=postgres://user:pass@host:5432/bigrag?sslmode=require REDIS_PASSWORD= BIGRAG_REDIS_URL=redis://:@redis:6379/0 BIGRAG_MASTER_KEY= BIGRAG_ALLOW_PUBLIC_BIND_IN_PROD=true # required when the API image binds 0.0.0.0 in prod ``` -------------------------------- ### Get Embedding Preset Source: https://rag.computer/docs/api-reference/embedding-presets Retrieves a specific embedding preset by its ID. ```APIDOC ## GET /v1/admin/embedding-presets/{id} ### Description Retrieves the details of a specific embedding preset. ### Method GET ### Endpoint /v1/admin/embedding-presets/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the embedding preset to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the preset. - **name** (string) - The name of the preset. - **provider** (string) - The embedding provider. - **model** (string) - The embedding model used. - **dimension** (integer) - The dimension of the embeddings. - **base_url** (string) - The base URL for the embedding provider. ### Response Example { "id": "preset-123", "name": "OpenAI Ada 002", "provider": "openai", "model": "text-embedding-ada-002", "dimension": 1536, "base_url": "https://api.openai.com/v1" } ``` -------------------------------- ### client.admin.access.overview Source: https://rag.computer/docs/sdks/typescript Provides an overview of access events. ```APIDOC ## client.admin.access.overview ### Description Returns a summary or overview of access-related events, potentially aggregated over a specified period. Requires admin privileges. ### Method Signature ```typescript overview(options?: { windowDays?: number }): Promise; ``` ### Parameters - **windowDays** (number) - Optional - The number of past days to include in the overview. ``` -------------------------------- ### Get Usage Rollup Source: https://rag.computer/docs/sdks/python Retrieve usage data aggregated over a specified period. ```APIDOC ## Get Usage Rollup ### Description Retrieve usage data aggregated over a specified period. ### Method `client.get_usage(window_days)` ### Parameters #### Query Parameters - **window_days** (integer) - Required - The number of days to roll up usage data for. ``` -------------------------------- ### Get Platform Stats Source: https://rag.computer/docs/sdks/python Retrieve statistics about the platform's performance and usage. ```APIDOC ## Get Platform Stats ### Description Retrieve statistics about the platform's performance and usage. ### Method `client.get_stats()` ``` -------------------------------- ### Readiness Check Source: https://rag.computer/docs/sdks/python Check the readiness of the platform, including its dependencies like Postgres, Redis, and embedding providers. ```APIDOC ## Readiness Check ### Description Check the readiness of the platform, including its dependencies like Postgres, Redis, and embedding providers. ### Method `client.readiness()` ``` -------------------------------- ### client.admin.apiKeys.create Source: https://rag.computer/docs/sdks/typescript Creates a new API key. ```APIDOC ## client.admin.apiKeys.create ### Description Generates a new API key with specified name, expiration, scopes, and collection access. Requires admin privileges. ### Method Signature ```typescript create(options: { name: string; expires_at?: string; scopes?: string[]; collection?: string; }): Promise; ``` ### Parameters - **name** (string) - Required - A descriptive name for the API key. - **expires_at** (string) - Optional - The expiration date/time for the API key (ISO format). - **scopes** (string[]) - Optional - An array of scopes to grant to the API key. - **collection** (string) - Optional - The specific collection this API key can access. ``` -------------------------------- ### Get Document Chunks Source: https://rag.computer/docs/sdks/typescript Retrieve the chunks associated with a specific document, with pagination support. ```typescript client.documents.getChunks(collection, documentId, { limit?, offset? }?) ``` -------------------------------- ### List Embedding Models Source: https://rag.computer/docs/sdks/python Get a list of available embedding models supported by the platform. ```APIDOC ## List Embedding Models ### Description Get a list of available embedding models supported by the platform. ### Method `client.list_embedding_models()` ``` -------------------------------- ### Create an MCP Server Source: https://rag.computer/docs/sdks/typescript Register a new MCP server with the system using `client.admin.mcpServers.create`. Requires a title, server name, and optionally a collection. ```typescript client.admin.mcpServers.create({ title, server_name, collection? }) ``` -------------------------------- ### client.admin.vectorStorage.overview Source: https://rag.computer/docs/sdks/typescript Provides an overview of vector storage usage. ```APIDOC ## client.admin.vectorStorage.overview ### Description Returns statistics and information about the current state and usage of the vector storage. Requires admin privileges. ### Method Signature ```typescript overview(): Promise; ``` ``` -------------------------------- ### Batch Get Document Status Source: https://rag.computer/docs/sdks/python Retrieve the processing statuses for multiple documents in a collection. ```APIDOC ## Batch Get Document Status ### Description Retrieve the processing statuses for multiple documents in a collection. ### Method `client.documents.batch_get_status(collection_name, document_ids)` ### Parameters #### Path Parameters - **collection_name** (string) - Required - The name of the collection. #### Request Body - **document_ids** (list of strings) - Required - A list of document IDs. ``` -------------------------------- ### Get Backup Details Source: https://rag.computer/docs/sdks/python Retrieve detailed information about a specific backup using its ID. ```python backup = await client.admin.backups.get(backup["id"]) ``` -------------------------------- ### Get Document Source: https://rag.computer/docs/api-reference/documents Retrieve details of a specific document. Requires `document:read` permission. ```APIDOC ## GET /v1/collections/{collection_name}/documents/{document_id} ### Description Retrieve details of a specific document. ### Method GET ### Endpoint `/v1/collections/{collection_name}/documents/{document_id}` ### Parameters #### Path Parameters - **collection_name** (string) - Required - The name of the collection containing the document. - **document_id** (string) - Required - The unique identifier for the document. ### Response #### Success Response (200) - **document_id** (string) - The unique identifier for the document. - **name** (string) - The name of the document. - **status** (string) - The current status of the document. - **metadata** (object) - Metadata associated with the document. ``` -------------------------------- ### Log In Source: https://rag.computer/docs/sdks/typescript Authenticate a user by providing their email and password using `client.auth.login`. This establishes a user session. ```typescript client.auth.login({ email, password }) ``` -------------------------------- ### Stream Realtime Platform Readiness Events Source: https://rag.computer/docs/sdks/python Asynchronously monitor real-time events indicating the readiness status of the platform components. ```python async for event in client.admin.realtime.platform_readiness(): if event["type"] == "snapshot": print(event["payload"]) ``` -------------------------------- ### Get bigRAG Collection Stats Source: https://rag.computer/docs/sdks/python Retrieve statistics for a specific collection, such as document count and size. ```python # Stats stats = await client.collections.stats("docs") ``` -------------------------------- ### Create Backup Source: https://rag.computer/docs/sdks/python Initiate a new backup operation, optionally providing a label for identification. ```python backup = await client.admin.backups.create({"label": "nightly export"}) ``` -------------------------------- ### Get Document Status Source: https://rag.computer/docs/api-reference/documents Retrieve the processing status of a document. Requires `document:read` permission. ```APIDOC ## GET /v1/collections/{collection_name}/documents/{document_id}/status ### Description Retrieve the processing status of a document. ### Method GET ### Endpoint `/v1/collections/{collection_name}/documents/{document_id}/status` ### Parameters #### Path Parameters - **collection_name** (string) - Required - The name of the collection containing the document. - **document_id** (string) - Required - The unique identifier for the document. ### Response #### Success Response (200) - **document_id** (string) - The unique identifier for the document. - **status** (string) - The current processing status of the document (e.g., `processing`, `completed`, `failed`). ``` -------------------------------- ### Update Admin Settings Source: https://rag.computer/docs/sdks/python Modify administrative settings, for example, to update trusted proxy configurations. ```python await client.admin.settings.update({"values": {"trusted_proxies": ["10.0.0.0/8"]}}) ``` -------------------------------- ### Get a Specific Backup Source: https://rag.computer/docs/sdks/typescript Retrieve details about a particular backup using `client.admin.backups.get`. Requires the backup ID. ```typescript client.admin.backups.get(backupId) ``` -------------------------------- ### List Admin Settings Source: https://rag.computer/docs/sdks/python Retrieve the current administrative settings for the platform. ```python settings = await client.admin.settings.list() ``` -------------------------------- ### Get Document Elements Source: https://rag.computer/docs/sdks/typescript Retrieve the elements (e.g., paragraphs, sentences) of a specific document, with pagination support. ```typescript client.documents.getElements(collection, documentId, { limit?, offset? }?) ``` -------------------------------- ### Get Question Suggestions Source: https://rag.computer/docs/sdks/python Retrieve suggested questions for a given collection. This can help users explore the data further. ```python # Question suggestions suggestions = await client.chat.get_question_suggestions("docs") fresh = await client.chat.generate_question_suggestions({"collection": "docs"}) ``` -------------------------------- ### client.webhooks.create Source: https://rag.computer/docs/sdks/typescript Creates a new webhook subscription. ```APIDOC ## client.webhooks.create ### Description Registers a new webhook to receive event notifications. You can specify which events and collections the webhook should monitor. ### Method Signature ```typescript create(options: { url: string; events: string[]; collections?: string[]; }): Promise; ``` ### Parameters - **url** (string) - Required - The URL to send webhook events to. - **events** (string[]) - Required - An array of event names to subscribe to (e.g., `document.ready`, `collection.truncated`). - **collections** (string[]) - Optional - An array of collection names to filter events by. ``` -------------------------------- ### Get Preferences Source: https://rag.computer/docs/api-reference/preferences Retrieves the current user's preferences. For new users, an empty data object is returned. ```APIDOC ## GET /v1/auth/preferences ### Description Retrieves the current user's preferences. For new users, an empty data object is returned. ### Method GET ### Endpoint /v1/auth/preferences ### Response #### Success Response (200) - **data** (object) - The user's preferences object. Example: `{"sidebar_collapsed": false, "default_collection": "knowledge_base", "chat": { "search_mode": "hybrid", "top_k": 10 }}` #### Response Example ```json { "data": { "sidebar_collapsed": false, "default_collection": "knowledge_base", "chat": { "search_mode": "hybrid", "top_k": 10 } } } ``` ``` -------------------------------- ### Connect to Realtime Source: https://rag.computer/docs/sdks/typescript Establish a connection to the real-time service. ```typescript client.realtime.connect() ``` -------------------------------- ### Realtime Platform Readiness Source: https://rag.computer/docs/sdks/python Stream real-time events indicating the platform's readiness status. ```APIDOC ## Realtime Platform Readiness ### Description Stream real-time events indicating the platform's readiness status. ### Method `client.admin.realtime.platform_readiness()` ``` -------------------------------- ### client.admin.mcpServers.list Source: https://rag.computer/docs/sdks/typescript Lists MCP servers. ```APIDOC ## client.admin.mcpServers.list ### Description Retrieves a list of all configured MCP (Multi-Collection Processing) servers. Requires admin privileges. ### Method Signature ```typescript list(): Promise; ``` ``` -------------------------------- ### client.auth.login Source: https://rag.computer/docs/sdks/typescript Logs in a user with email and password. ```APIDOC ## client.auth.login ### Description Authenticates a user using their email and password. ### Method Signature ```typescript login(options: { email: string; password: string }): Promise; ``` ### Parameters - **email** (string) - Required - The user's email address. - **password** (string) - Required - The user's password. ``` -------------------------------- ### Get User Preferences Source: https://rag.computer/docs/sdks/typescript Retrieve the current user's preferences using `client.auth.preferences`. This allows inspection of user-specific settings. ```typescript client.auth.preferences() ```