Skip to Content

Using 123API in AnythingLLM

Use 123API as the OpenAI-compatible provider in AnythingLLM for chat, knowledge base and retrieval workflows.

Prerequisites

  1. Install AnythingLLM on your machine or server
  2. Create a 123API API key from the dashboard 
  3. Confirm your preferred chat model is available in GET /v1/models

Step 1: Open Settings

After launching AnythingLLM:

  1. Open the application
  2. Click Settings
  3. Enter the LLM Preference section

Step 2: Configure Chat Model

Choose Generic OpenAI or the OpenAI-compatible provider option and fill in:

FieldValue
ProviderOpenAI Compatible or OpenAI
Base URLhttps://123api.co/v1
API KeyYour 123API key
Chat ModelExample: gpt-4o, gpt-5, claude-sonnet

The Base URL should include /v1 in AnythingLLM. If you omit it, requests usually fail or return a provider error.

Step 3: Configure Embeddings

If you plan to use document retrieval or a private knowledge base, also configure an embedding model:

FieldValue
Embedding ProviderGeneric OpenAI
Base URLhttps://123api.co/v1
API KeyYour 123API key
Modeltext-embedding-3-small or another supported embedding model

Step 4: Create a Workspace

  1. Create a new workspace
  2. Upload a small batch of test documents
  3. Wait for chunking and vectorization to finish
  4. Send a question based on those documents and verify retrieval quality
  1. Save the provider configuration
  2. Create a test workspace
  3. Send a simple prompt and confirm the response returns successfully
  4. If embeddings or RAG flows are enabled, validate those endpoints separately

FAQ

AnythingLLM cannot connect to 123API+

Check whether the Base URL includes /v1, whether the API key is valid and whether your deployment environment can reach https://123api.co.

Retrieval quality is poor+

Recheck your embedding model, reduce document noise, improve chunk quality and test with smaller structured documents before importing a large corpus.

The selected model returns unsupported errors+

Query GET /v1/models and use the exact model ID returned by your current account and environment.