The AnythingLLM Developer API gives you full programmatic control over your instance — from spinning up workspaces and uploading documents to running multi-turn chats and managing users. Every operation available in the UI is also available through the REST API, making it straightforward to integrate AnythingLLM into your own applications, pipelines, and automation workflows.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mintplex-Labs/anything-llm/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All API requests are served from your running AnythingLLM server. By default the server listens on port3001, and every endpoint lives under the /api/v1/ prefix:
your-instance with the hostname or IP address where AnythingLLM is running. For local development this is typically localhost.
Interactive API Explorer
AnythingLLM ships with a built-in Swagger UI that documents every endpoint and lets you make live requests directly from your browser:To disable the Swagger UI in production, set the environment variable
DISABLE_SWAGGER_DOCS=true in your server’s .env file. This prevents the interactive docs from being publicly accessible without affecting normal API functionality.Authentication
Every request must include a valid API key in theAuthorization header as a Bearer token:
General Conventions
| Property | Value |
|---|---|
| Protocol | HTTP / HTTPS |
| Request format | application/json |
| Response format | application/json (all endpoints) |
| Rate limiting | None by default |
| Auth scheme | Bearer token (Authorization header) |
| Error shape | { "error": "message" } |
{ "workspaces": [...] }).
Quick Start
Use the followingcurl command to verify your API key is valid and your instance is reachable:
403 Forbidden with { "error": "No valid api key found." }.
API Endpoint Groups
Authentication
Verify that an API key is valid. A lightweight health-check for auth before executing more complex requests.
Workspaces
Create, update, and delete workspaces. Run single-turn and streaming chats, perform vector searches, and manage embedded documents.
Documents
Upload files or raw links for processing, list documents in storage, move files between folders, and remove content from your instance.
Admin
Manage users, roles, invites, and system-wide preferences. All admin endpoints require multi-user mode to be enabled.
Embeds
Create and manage embeddable chat widgets. Control chat mode, session limits, domains, and retrieve embed chat history.
OpenAI Compatible
Drop-in replacements for OpenAI’s
/models, /chat/completions, and /embeddings endpoints. Point any OpenAI SDK at your AnythingLLM instance.Endpoint Summary
Authentication
| Method | Path | Description |
|---|---|---|
GET | /v1/auth | Verify a Bearer token is valid |
Workspaces
| Method | Path | Description |
|---|---|---|
POST | /v1/workspace/new | Create a new workspace |
GET | /v1/workspaces | List all workspaces |
GET | /v1/workspace/{slug} | Get a workspace by slug |
POST | /v1/workspace/{slug}/update | Update workspace settings |
DELETE | /v1/workspace/{slug} | Delete a workspace |
GET | /v1/workspace/{slug}/chats | Retrieve workspace chat history |
POST | /v1/workspace/{slug}/update-embeddings | Add or remove embedded documents |
POST | /v1/workspace/{slug}/update-pin | Pin or unpin a document |
POST | /v1/workspace/{slug}/chat | Send a chat message |
POST | /v1/workspace/{slug}/stream-chat | Stream a chat response |
POST | /v1/workspace/{slug}/vector-search | Semantic vector search |
POST | /v1/workspace/{slug}/thread/new | Create a workspace thread |
POST | /v1/workspace/{slug}/thread/{threadSlug}/update | Update a thread |
DELETE | /v1/workspace/{slug}/thread/{threadSlug} | Delete a thread |
GET | /v1/workspace/{slug}/thread/{threadSlug}/chats | Get thread chat history |
POST | /v1/workspace/{slug}/thread/{threadSlug}/chat | Send a chat to a thread |
POST | /v1/workspace/{slug}/thread/{threadSlug}/stream-chat | Stream a chat to a thread |
Documents
| Method | Path | Description |
|---|---|---|
POST | /v1/document/upload | Upload a file for processing |
POST | /v1/document/upload/{folderName} | Upload a file into a named folder |
POST | /v1/document/upload-link | Upload a URL for scraping |
POST | /v1/document/raw-text | Upload raw text as a document |
GET | /v1/documents | List all documents |
GET | /v1/documents/folder/{folderName} | List documents in a folder |
GET | /v1/document/accepted-file-types | List accepted file types |
GET | /v1/document/metadata-schema | Get metadata key schema |
GET | /v1/document/{docName} | Get a single document |
POST | /v1/document/create-folder | Create a document folder |
DELETE | /v1/document/remove-folder | Remove a document folder |
POST | /v1/document/move-files | Move documents between folders |
GET | /v1/document/generated-files/{filename} | Download an agent-generated file |
Admin (multi-user mode only)
| Method | Path | Description |
|---|---|---|
GET | /v1/admin/is-multi-user-mode | Check multi-user mode status |
GET | /v1/admin/users | List all users |
POST | /v1/admin/users/new | Create a new user |
POST | /v1/admin/users/{id} | Update a user |
DELETE | /v1/admin/users/{id} | Delete a user |
GET | /v1/admin/invites | List all invites |
POST | /v1/admin/invite/new | Create an invite link |
DELETE | /v1/admin/invite/{id} | Deactivate an invite |
GET | /v1/admin/workspaces/{workspaceId}/users | List users with workspace access |
POST | /v1/admin/workspaces/{workspaceSlug}/manage-users | Set workspace user permissions |
POST | /v1/admin/workspace-chats | List all system chats (paginated) |
POST | /v1/admin/preferences | Update instance-wide preferences |
Embeds
| Method | Path | Description |
|---|---|---|
GET | /v1/embed | List all embed configurations |
POST | /v1/embed/new | Create a new embed |
POST | /v1/embed/{embedUuid} | Update an embed configuration |
DELETE | /v1/embed/{embedUuid} | Delete an embed |
GET | /v1/embed/{embedUuid}/chats | List all chats for an embed |
GET | /v1/embed/{embedUuid}/chats/{sessionUuid} | Get chats for a specific embed session |
OpenAI Compatible
| Method | Path | Description |
|---|---|---|
GET | /v1/openai/models | List available workspace models |
POST | /v1/openai/chat/completions | OpenAI-compatible chat completions |
POST | /v1/openai/embeddings | OpenAI-compatible text embeddings |
GET | /v1/openai/vector_stores | List workspaces as vector stores |