> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/integration-examples/chat/anythingllm.md).

# AnythingLLM

Use Cortecs models with AnythingLLM

[AnythingLLM](https://anythingllm.com/) is an open-source app for chatting with AI models and documents. Connect it to Cortecs using its Generic OpenAI provider.

{% hint style="info" %}
Before you begin, create a Cortecs API key by following the [Member quickstart](/member-quickstart.md) and choose a chat model from the [model catalog](https://cortecs.ai/serverlessModels).
{% endhint %}

## 1. Install AnythingLLM

Download and install [AnythingLLM Desktop](https://docs.anythingllm.com/installation-desktop/overview) for macOS, Windows, or Linux.

## 2. Connect to Cortecs

1. Open **Settings → AI Providers → LLM**.
2. Select **Generic OpenAI** as the LLM provider.
3. Enter the following values:

| Field                | Value                                                                            |
| -------------------- | -------------------------------------------------------------------------------- |
| Base URL             | `https://api.cortecs.ai/v1`                                                      |
| API Key              | Your Cortecs API key                                                             |
| Selected Model       | The exact model ID from the [model catalog](https://cortecs.ai/serverlessModels) |
| Model context window | The selected model's context size in tokens                                      |
| Max Tokens           | `1024` to start; increase within the model's output limit if needed              |

Select your model from the list, or enter its ID if no models are listed. Use the base URL above; AnythingLLM adds `/chat/completions` automatically.

Click **Save changes**.

## 3. Start a chat

Create or open a workspace and send a prompt. If an existing workspace uses another provider, open its **Chat Settings** and set **Workspace LLM Provider** to **System default**, then save.

Document search uses a separate [embedding model](https://docs.anythingllm.com/setup/embedder-configuration/overview). You can keep AnythingLLM's default local embedder while using Cortecs for chat.

For more configuration options, see the [AnythingLLM Generic OpenAI documentation](https://docs.anythingllm.com/setup/llm-configuration/cloud/openai-generic).
