Skip to main content

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.

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.

Base URL

All API requests are served from your running AnythingLLM server. By default the server listens on port 3001, and every endpoint lives under the /api/v1/ prefix:
http://your-instance:3001/api/v1/
Replace 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:
http://your-instance:3001/api/docs
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 the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
Generate an API key from Settings → API Keys → Generate New API Key inside your AnythingLLM instance. See the Authentication page for full details.

General Conventions

PropertyValue
ProtocolHTTP / HTTPS
Request formatapplication/json
Response formatapplication/json (all endpoints)
Rate limitingNone by default
Auth schemeBearer token (Authorization header)
Error shape{ "error": "message" }
All timestamps are returned as ISO 8601 strings. Boolean flags are native JSON booleans. Endpoints that return lists always wrap the array in a named key (e.g. { "workspaces": [...] }).

Quick Start

Use the following curl command to verify your API key is valid and your instance is reachable:
curl -X GET "http://your-instance:3001/api/v1/auth" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
A successful response looks like this:
{
  "authenticated": true
}
If the key is missing or invalid, the API returns 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

MethodPathDescription
GET/v1/authVerify a Bearer token is valid

Workspaces

MethodPathDescription
POST/v1/workspace/newCreate a new workspace
GET/v1/workspacesList all workspaces
GET/v1/workspace/{slug}Get a workspace by slug
POST/v1/workspace/{slug}/updateUpdate workspace settings
DELETE/v1/workspace/{slug}Delete a workspace
GET/v1/workspace/{slug}/chatsRetrieve workspace chat history
POST/v1/workspace/{slug}/update-embeddingsAdd or remove embedded documents
POST/v1/workspace/{slug}/update-pinPin or unpin a document
POST/v1/workspace/{slug}/chatSend a chat message
POST/v1/workspace/{slug}/stream-chatStream a chat response
POST/v1/workspace/{slug}/vector-searchSemantic vector search
POST/v1/workspace/{slug}/thread/newCreate a workspace thread
POST/v1/workspace/{slug}/thread/{threadSlug}/updateUpdate a thread
DELETE/v1/workspace/{slug}/thread/{threadSlug}Delete a thread
GET/v1/workspace/{slug}/thread/{threadSlug}/chatsGet thread chat history
POST/v1/workspace/{slug}/thread/{threadSlug}/chatSend a chat to a thread
POST/v1/workspace/{slug}/thread/{threadSlug}/stream-chatStream a chat to a thread

Documents

MethodPathDescription
POST/v1/document/uploadUpload a file for processing
POST/v1/document/upload/{folderName}Upload a file into a named folder
POST/v1/document/upload-linkUpload a URL for scraping
POST/v1/document/raw-textUpload raw text as a document
GET/v1/documentsList all documents
GET/v1/documents/folder/{folderName}List documents in a folder
GET/v1/document/accepted-file-typesList accepted file types
GET/v1/document/metadata-schemaGet metadata key schema
GET/v1/document/{docName}Get a single document
POST/v1/document/create-folderCreate a document folder
DELETE/v1/document/remove-folderRemove a document folder
POST/v1/document/move-filesMove documents between folders
GET/v1/document/generated-files/{filename}Download an agent-generated file

Admin (multi-user mode only)

MethodPathDescription
GET/v1/admin/is-multi-user-modeCheck multi-user mode status
GET/v1/admin/usersList all users
POST/v1/admin/users/newCreate a new user
POST/v1/admin/users/{id}Update a user
DELETE/v1/admin/users/{id}Delete a user
GET/v1/admin/invitesList all invites
POST/v1/admin/invite/newCreate an invite link
DELETE/v1/admin/invite/{id}Deactivate an invite
GET/v1/admin/workspaces/{workspaceId}/usersList users with workspace access
POST/v1/admin/workspaces/{workspaceSlug}/manage-usersSet workspace user permissions
POST/v1/admin/workspace-chatsList all system chats (paginated)
POST/v1/admin/preferencesUpdate instance-wide preferences

Embeds

MethodPathDescription
GET/v1/embedList all embed configurations
POST/v1/embed/newCreate a new embed
POST/v1/embed/{embedUuid}Update an embed configuration
DELETE/v1/embed/{embedUuid}Delete an embed
GET/v1/embed/{embedUuid}/chatsList all chats for an embed
GET/v1/embed/{embedUuid}/chats/{sessionUuid}Get chats for a specific embed session

OpenAI Compatible

MethodPathDescription
GET/v1/openai/modelsList available workspace models
POST/v1/openai/chat/completionsOpenAI-compatible chat completions
POST/v1/openai/embeddingsOpenAI-compatible text embeddings
GET/v1/openai/vector_storesList workspaces as vector stores

Build docs developers (and LLMs) love