Connect AI Models to AnythingLLM

AnythingLLM does not come with a model of its own for chat. You connect one, and you can change it any time, for the whole instance or for one workspace.

Choose a provider

Open Settings > AI Providers > LLM and pick a provider from the list. The usual choices are OpenAI, Anthropic and Google Gemini; OpenRouter gives one key for many models; Azure OpenAI and AWS Bedrock suit companies with an agreement there. Paste the key, choose a model, and save.

For anything else, choose Generic OpenAI and enter a base URL, a key and a model name. That covers LiteLLM, vLLM, a remote Ollama or LM Studio, and most new providers, which publish an OpenAI-compatible endpoint.

Where the key goes

AnythingLLM writes provider keys to its settings file. On a standard install that file is plain text. On Hosting for AnythingLLM our image keeps it encrypted with a key of your app's own, in storage and in every synced copy; it exists in plain form only in memory, and only while AnythingLLM reads it after a start or a change. Keys never go into the app's specification, so a key changed in AnythingLLM stays changed.

Give AnythingLLM a key created only for it, with a spending limit at the provider. If it ever leaks, it costs at most that limit and is revoked in one click.

A model per workspace

Each workspace has Chat Settings with a Workspace LLM Provider. Leave it on the system default, or give a workspace its own: a small, cheap model for an internal FAQ, a stronger one for a research workspace. The same page sets the chat mode, the history length and the system prompt.

Embedding and the rest

The embedder, which turns documents into vectors, is separate from the chat model. The default runs on your server and needs no key; you can switch to an OpenAI, Gemini or other embedding model in Embedder settings, but changing it later means embedding every document again. Speech, transcription and image generation have their own provider settings too.

Connect your model on Hosting for AnythingLLM on Flux, then read how it answers from your documents.

Frequently Asked Questions

Which providers does AnythingLLM support?

Most of them: OpenAI, Azure OpenAI, Anthropic, Google Gemini, Mistral, Groq, OpenRouter, AWS Bedrock, Cohere, Together, DeepSeek, xAI and others, plus any OpenAI-compatible endpoint such as LiteLLM, vLLM or a remote Ollama.

Where is my API key stored?

In AnythingLLM’s settings file. On Hosting for AnythingLLM that file is encrypted in the server’s storage and in every synced copy, and decrypted only into memory while AnythingLLM reads it.

Should I put the key in the app’s environment instead?

No. A value in the environment always wins over the settings file, so a key changed in AnythingLLM would revert at the next restart. Set keys in AnythingLLM’s interface.

Can different workspaces use different models?

Yes. Each workspace can override the system default with its own provider and model in its Chat Settings.

Can I use a model running on my own computer?

Yes, if the server can reach it: expose Ollama, LM Studio or another OpenAI-compatible server on an address the AnythingLLM server can connect to, ideally behind a token, and enter that address as the base URL.

AnythingLLM is open-source software (MIT) and a trademark of Mintplex Labs (https://github.com/Mintplex-Labs/anything-llm). Flux is not affiliated with or endorsed by Mintplex Labs.

Hosting for AnythingLLM on the decentralized cloud

Dedicated resources, a standby server, model keys encrypted at rest, HTTPS and your own domain. From $3.49/month.

Hosting for AnythingLLM on Flux

Chat with your documents, on your own server.

A product of Flux

AnythingLLM is open-source software (MIT) and a trademark of Mintplex Labs. Flux is not affiliated with or endorsed by Mintplex Labs.

© 2026 InFlux Technologies. All rights reserved. v1.22.0