# Cuadra > Connect your proprietary knowledge to securely train and instantly deploy your custom AI assistant. ## Docs - [Authentication](https://docs.cuadra.ai/api-reference/authentication.md): Cuadra AI supports JWT session tokens for frontend apps and M2M OAuth 2.0 for backend services. All requests require Bearer token authentication. - [Chat API](https://docs.cuadra.ai/api-reference/chat.md): Create chat completions with the Cuadra AI Chat API. Supports streaming, reasoning tokens, RAG sources, tool calling, and structured JSON outputs. - [Datasets API](https://docs.cuadra.ai/api-reference/datasets.md): Create knowledge bases, upload documents, and manage data sources for RAG-powered AI responses in Cuadra AI. - [Create or Continue Chat](https://docs.cuadra.ai/api-reference/endpoints/chats/create-or-continue-chat.md): Generate a chat completion. **Streaming (`stream: true`):** Returns an SSE stream. The LLM call runs in a background task that is decoupled from the HTTP connection — if the client disconnects mid-stream (tab close, navigation, network drop) the model continues generating and the assistant message +… - [Delete Chat](https://docs.cuadra.ai/api-reference/endpoints/chats/delete-chat.md): Soft delete a chat by ID. Returns 204 on success, 404 if not found. - [Get Chat](https://docs.cuadra.ai/api-reference/endpoints/chats/get-chat.md): Get a specific chat by ID. - [List Chats](https://docs.cuadra.ai/api-reference/endpoints/chats/list-chats.md): List chats for the authenticated user. - [Update Chat](https://docs.cuadra.ai/api-reference/endpoints/chats/update-chat.md): Update mutable fields (title, systemPrompt, metadata) of a chat. - [Create Dataset](https://docs.cuadra.ai/api-reference/endpoints/datasets/create-dataset.md): Create a new dataset for organizing and managing training data or RAG documents. - [Create Dataset Snapshot](https://docs.cuadra.ai/api-reference/endpoints/datasets/create-dataset-snapshot.md): Create a snapshot of the dataset for RAG knowledge base management. **RAG Snapshots:** - Captures current state of files and embeddings - Enables rollback to previous knowledge base states - Tracks file count and metadata - Links embeddings to version for audit trail **Use Cases:** - Snapshot before… - [Delete Dataset](https://docs.cuadra.ai/api-reference/endpoints/datasets/delete-dataset.md): Delete a dataset and its contents if not in use. - 404 if dataset does not exist for the organization - 409 if any dataset version is referenced by models (via model_datasets) - 204 on success (no content) - [Delete Dataset Snapshot](https://docs.cuadra.ai/api-reference/endpoints/datasets/delete-dataset-snapshot.md): Soft delete a dataset snapshot by its integer version field. - [Get Dataset](https://docs.cuadra.ai/api-reference/endpoints/datasets/get-dataset.md): Retrieve a dataset by ID. Use the expand parameter to include related resources. **Expansion Options:** - `expand[]=items` - Include dataset files (up to 100 items) - `expand[]=snapshots` - Include snapshot history (up to 100 snapshots) Examples: - `GET /v1/datasets/{id}?expand[]=items` - `GET /v1/d… - [List Dataset Snapshots](https://docs.cuadra.ai/api-reference/endpoints/datasets/list-dataset-snapshots.md): List all version snapshots for a dataset with cursor-based pagination. - [List Datasets](https://docs.cuadra.ai/api-reference/endpoints/datasets/list-datasets.md): List all datasets in your organization with cursor-based pagination. - [Update Dataset](https://docs.cuadra.ai/api-reference/endpoints/datasets/update-dataset.md): Update dataset metadata (name, description). Does not affect contents. - [Associate File with Resource](https://docs.cuadra.ai/api-reference/endpoints/files/associate-file-with-resource.md): Associate an existing file with a resource. - [Delete File](https://docs.cuadra.ai/api-reference/endpoints/files/delete-file.md): Delete a file and its associations. - [Get File](https://docs.cuadra.ai/api-reference/endpoints/files/get-file.md): Get file metadata and processing status. - [List Files](https://docs.cuadra.ai/api-reference/endpoints/files/list-files.md): List files with optional filtering by status or resource. To list files for a specific chat: GET /v1/files?resourceType=chat&resourceId={chat_id} To list files for a specific dataset: GET /v1/files?resourceType=dataset&resourceId={dataset_id} - [Reprocess File](https://docs.cuadra.ai/api-reference/endpoints/files/reprocess-file.md): Retry processing for a file that failed or is stuck. - [Upload File](https://docs.cuadra.ai/api-reference/endpoints/files/upload-file.md): Upload a file. Optionally associate with a resource by providing `resource_type` and `resource_id`. - [AI Provider Health](https://docs.cuadra.ai/api-reference/endpoints/health/ai-provider-health.md): Check health status of all configured AI providers. - [Liveness Check](https://docs.cuadra.ai/api-reference/endpoints/health/liveness-check.md): Liveness check. Returns 200 if the service is running. - [Readiness Check](https://docs.cuadra.ai/api-reference/endpoints/health/readiness-check.md): Readiness check for critical services. Returns 200 if all services are healthy, 503 otherwise. - [Associate Dataset With Model](https://docs.cuadra.ai/api-reference/endpoints/models/associate-dataset-with-model.md): Associate a dataset with a model for RAG. - [Batch Associate Datasets With Model](https://docs.cuadra.ai/api-reference/endpoints/models/batch-associate-datasets-with-model.md): Associate multiple datasets with a model in a single request. - [Batch Update Model-Dataset Associations](https://docs.cuadra.ai/api-reference/endpoints/models/batch-update-model-dataset-associations.md): Update multiple model-dataset associations in a single request. - [Create Model](https://docs.cuadra.ai/api-reference/endpoints/models/create-model.md): Create an AI model configuration. - [Delete Model](https://docs.cuadra.ai/api-reference/endpoints/models/delete-model.md): Soft-delete an AI model. System models cannot be deleted. The model will be marked as deleted but retained for audit purposes. - [Dissociate Dataset From Model](https://docs.cuadra.ai/api-reference/endpoints/models/dissociate-dataset-from-model.md): Remove a dataset association from a model. - [Get Model](https://docs.cuadra.ai/api-reference/endpoints/models/get-model.md): Retrieve detailed information about a specific AI model by ID. - [List Model Datasets](https://docs.cuadra.ai/api-reference/endpoints/models/list-model-datasets.md): List all datasets associated with a model. - [List Models](https://docs.cuadra.ai/api-reference/endpoints/models/list-models.md): List AI models. Does not include system models. Use GET /v1/models/catalog to browse available system models. - [List System Model Catalog](https://docs.cuadra.ai/api-reference/endpoints/models/list-system-model-catalog.md): List available system models that can be used as parents. Pre-configured models with standard pricing and capabilities. - [Update Model](https://docs.cuadra.ai/api-reference/endpoints/models/update-model.md): Update configuration settings for an AI model. Only organization models can be updated; system models are read-only. - [Update Model-Dataset Association](https://docs.cuadra.ai/api-reference/endpoints/models/update-model-dataset-association.md): Update a model-dataset association. - [Create Particle](https://docs.cuadra.ai/api-reference/endpoints/particles/create-particle.md): Create a new particle for system prompt composition. - [Delete Particle](https://docs.cuadra.ai/api-reference/endpoints/particles/delete-particle.md): Soft-delete a particle. System particles cannot be deleted. Particles in use by system prompts cannot be deleted. - [Get Particle](https://docs.cuadra.ai/api-reference/endpoints/particles/get-particle.md): Retrieve a specific particle by ID. - [Get Particle Version](https://docs.cuadra.ai/api-reference/endpoints/particles/get-particle-version.md): Get a specific version of a particle. - [List Particle Versions](https://docs.cuadra.ai/api-reference/endpoints/particles/list-particle-versions.md): List all versions of a particle. - [List Particles](https://docs.cuadra.ai/api-reference/endpoints/particles/list-particles.md): List particles accessible to your organization. Includes both organization-specific and system particles. - [Update Particle](https://docs.cuadra.ai/api-reference/endpoints/particles/update-particle.md): Update a particle. If content is changed, a new version is created automatically. System particles cannot be modified. - [Add Particle to System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/add-particle-to-system-prompt.md): Add a particle to a system prompt composition. - [Compose System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/compose-system-prompt.md): Generate the fully composed system prompt from its particles. Particles are ordered by category priority and user-defined order. - [Copy System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/copy-system-prompt.md): Copy a system prompt to your organization. This is typically used to copy system templates (isSystem=true) into a customizable version. The copied prompt references the same particles as the original. - [Create System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/create-system-prompt.md): Create a new system prompt composition. - [Delete System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/delete-system-prompt.md): Soft-delete a system prompt. - [Get System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/get-system-prompt.md): Retrieve a specific system prompt by ID. - [List System Prompts](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/list-system-prompts.md): List system prompts for your organization. Use `isSystem=true` to get system templates that can be copied to your organization. - [Remove Particle from System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/remove-particle-from-system-prompt.md): Remove a particle from a system prompt composition. - [Update Particle in System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/update-particle-in-system-prompt.md): Update a particle's order or version pinning in a system prompt. - [Update System Prompt](https://docs.cuadra.ai/api-reference/endpoints/system-prompts/update-system-prompt.md): Update a system prompt's metadata. - [Get Organization Usage](https://docs.cuadra.ai/api-reference/endpoints/usage/get-organization-usage.md): Get current organization usage and billing information. - [Errors](https://docs.cuadra.ai/api-reference/errors.md): Cuadra AI API errors follow RFC 7807 Problem Details format. Includes HTTP status codes, common errors, and retry logic examples. - [Files API](https://docs.cuadra.ai/api-reference/files.md): Upload and manage files for your AI applications. Supports PDF, DOCX, TXT, CSV, JSON, and images. - [Models API](https://docs.cuadra.ai/api-reference/models.md): Create and configure AI assistants with the Cuadra AI Models API. Choose LLM providers, link datasets for RAG, and attach system prompts. - [OpenAPI Specification](https://docs.cuadra.ai/api-reference/openapi.md): Download the OpenAPI 3.1 specification and generate client libraries for the Cuadra AI API. - [API Overview](https://docs.cuadra.ai/api-reference/overview.md): The Cuadra AI REST API provides endpoints for chat completions, model management, datasets, and usage tracking. JSON-based with Bearer token authentication. - [Particles API](https://docs.cuadra.ai/api-reference/particles.md): Create modular, reusable system prompt components. Particles enable versioned, composable AI behavior configuration. - [System Prompts API](https://docs.cuadra.ai/api-reference/system-prompts.md): Compose particles into complete AI behavior configurations. Manage versioned, modular system prompts. - [Usage API](https://docs.cuadra.ai/api-reference/usage.md): Monitor storage, credits, and subscription information for your organization. - [Credits](https://docs.cuadra.ai/billing/credits.md): Cuadra AI uses credits to bill for AI usage. Monitor balance, purchase additional credits, and optimize consumption. - [Knowledge Bases](https://docs.cuadra.ai/guides/knowledge-bases.md): Create datasets, upload documents, and power RAG-based AI assistants in Cuadra AI. - [Particles](https://docs.cuadra.ai/guides/particles.md): Create reusable, versioned prompt components. Particles are the building blocks for system prompts in Cuadra AI. - [System Prompts](https://docs.cuadra.ai/guides/system-prompts.md): Configure AI behavior with modular, versioned system prompts. Compose reusable particles for role, tone, guardrails, and output formatting. - [Build a Chatbot](https://docs.cuadra.ai/guides/tutorial-chatbot.md): End-to-end tutorial: build a customer support chatbot with Cuadra AI in 30 minutes. Includes knowledge base, system prompts, and React UI. - [React UI Kit](https://docs.cuadra.ai/guides/uikit-react.md): Production-ready React components for AI chat interfaces. Install @cuadra-ai/uikit and embed a full chat experience in minutes. - [UIKit Widget](https://docs.cuadra.ai/guides/uikit-widget.md): Embed AI chat in any HTML page with a simple script tag - [Cuadra AI Documentation](https://docs.cuadra.ai/index.md): Build custom AI assistants powered by your documents. Connect data sources, configure behavior with modular prompts, and deploy via REST APIs or React components. - [Quick Start](https://docs.cuadra.ai/quickstart.md): Deploy your first Cuadra AI assistant in under 5 minutes. Create a model, add knowledge, and make your first API call. ## OpenAPI Specs - [openapi](https://docs.cuadra.ai/openapi.json)