LobeChatIntegrationChat apps

LobeChat (LobeHub) with Claude and GPT via a Custom API

(prices in the text follow the live price list)

Short answer

To use LobeHub (formerly LobeChat) with APIVAI, open App Settings → AI Providers, choose Add Custom Provider, set Request Format to OpenAI, enter https://api.apivai.com/v1 as the Proxy URL and paste your APIVAI key into API Key; then fetch or add model IDs such as claude-sonnet-4-6 and gpt-5.5. If you only want Claude, you can instead put https://api.apivai.com (no /v1) into the API Proxy URL of the built-in Anthropic provider. As of 2026-10-07, Claude Sonnet 4.6 costs $1.04 / $5.22 per million input / output tokens through APIVAI, against the official $3.00 / $15.00. Self-hosted Docker deployments can set the same values with OPENAI_PROXY_URL and OPENAI_API_KEY, or ANTHROPIC_PROXY_URL and ANTHROPIC_API_KEY.

What is LobeHub, and is it the same as LobeChat?

Yes. LobeChat is now called LobeHub: the GitHub repository lobehub/lobe-chat redirects to lobehub/lobehub, the documentation uses the new name, and the Docker image is lobehub/lobehub. It is an open-source chat and agent app that you can use on the web, as a desktop app, or self-host. Each agent picks a provider and a model, so you can run Claude for one task and GPT for another.

This guide follows the LobeHub documentation and the app's interface labels as of October 2026.

Which provider option should you pick?

LobeHub offers three ways to point at APIVAI:

OptionURL to enterModelsWhen to use it
Custom provider, Request Format OpenAIhttps://api.apivai.com/v1Claude and GPTRecommended: one provider for every model, and the built-in OpenAI provider stays untouched
Built-in Anthropic providerhttps://api.apivai.comClaude onlyYou want Claude in its native Messages format
Built-in OpenAI providerhttps://api.apivai.com/v1Claude and GPTQuick, but it replaces the OpenAI provider (see the files section below)

The rule for /v1: OpenAI-format URLs end with /v1; the Anthropic URL does not, because the Anthropic SDK adds /v1/messages itself. LobeHub also strips a trailing /v1 from Anthropic URLs, but https://api.apivai.com is the clean value. More on both formats: OpenAI-compatible API and Claude API proxy.

How do you get an APIVAI key?

  1. Create an account with your email.
  2. Top up from $10 by card, crypto, Alipay or WeChat Pay. You pay per token, with no subscription.
  3. Create a key on the Dashboard and copy it. Give it a budget limit if several people will use it.

How do you add APIVAI as a custom provider?

  1. Open App Settings → AI Providers.
  2. Click Add Custom Provider. The Create Custom AI Provider dialog opens.
  3. Fill in the fields from the table below and click Create.
  4. On the new provider's page, use Connectivity Check: pick a model and click Check. You should see Check passed.
  5. In the model list, click Fetch models to load the IDs from /v1/models, then switch on the ones you want. You can also click Add Model and type a Model ID by hand.
  6. Open your agent's settings and select the APIVAI provider and a model.
FieldValue
Provider IDapivai (lowercase; cannot be changed later)
Provider NameAPIVAI
Request FormatOpenAI
Proxy URLhttps://api.apivai.com/v1
API KeyYour APIVAI key
Use Client Request ModeOff

Use Client Request Mode sends requests straight from the browser instead of through the LobeHub server. Keep it off unless you have a reason to change it; if you turn it on and see network errors, turn it off again.

Alternative: the built-in Anthropic provider

Select Anthropic in AI Providers, switch it on, paste your APIVAI key into API Key and enter https://api.apivai.com in API Proxy URL. Run Check, then enable Claude models. The model ID must match an APIVAI ID such as claude-sonnet-4-6; if a built-in model card uses a different ID, add the right one with Add Model. If Fetch models returns nothing in this mode, add the IDs by hand. A custom provider with Request Format set to Anthropic and the same URL works the same way.

Alternative: the built-in OpenAI provider

Select OpenAI, paste your key and set API Proxy URL to https://api.apivai.com/v1. Leave Use Responses API Specification off: LobeHub describes it as supported by OpenAI models only, and you will also be sending Claude requests through this provider.

How do you configure it with Docker environment variables?

A self-hosted LobeHub server reads provider settings from environment variables. Add these to the lobehub.env file from the Docker guide, next to the database and auth variables it already needs:

# OpenAI format: Claude and GPT
OPENAI_API_KEY=your-apivai-key
OPENAI_PROXY_URL=https://api.apivai.com/v1
OPENAI_MODEL_LIST=-all,+claude-sonnet-4-6,+claude-haiku-4-5,+gpt-5.5

# Or Anthropic format: Claude only
ANTHROPIC_API_KEY=your-apivai-key
ANTHROPIC_PROXY_URL=https://api.apivai.com

Then start the container as usual, for example docker run -d -p 3210:3210 --env-file lobehub.env --name lobehub lobehub/lobehub, and restart it after any change to the file.

OPENAI_MODEL_LIST uses LobeHub's model-list syntax: -all hides the default OpenAI models, +id adds a model, and id=Display Name renames one. A key set this way is a server key that every user of your instance shares, so give it its own budget on the APIVAI Dashboard. LobeHub's docs note that an empty reply often means a missing /v1 on OPENAI_PROXY_URL; for APIVAI, always include it.

Do files and the knowledge base still work?

Chat works fully through APIVAI. Files and the knowledge base also need an embedding model to index documents, and APIVAI does not provide embeddings.

By default LobeHub creates embeddings with OpenAI's text-embedding-3-small through the OpenAI provider. If you pointed OPENAI_PROXY_URL at APIVAI, file indexing will fail, which is one more reason to use a custom provider for chat. Configure a separate embedding provider with DEFAULT_FILES_CONFIG, for example DEFAULT_FILES_CONFIG=embedding_model=ollama/<your-embedding-model>; LobeHub's knowledge base guide lists the supported providers. Answers about your files still come from your APIVAI chat model.

Which model should you choose?

Prices per million tokens as of 2026-10-07. The list changes over time, so take IDs from GET https://api.apivai.com/v1/models (or Fetch models) and the pricing page.

ModelInputOutputGood for
Claude Sonnet 4.6$1.04$5.22Default model for most agents
Claude Sonnet 5.5$0.69$3.47Newer Sonnet for code and long documents
Claude Opus 5.5$1.39$6.96Hardest analysis and writing
Claude Haiku 4.5$0.35$1.74Fast, cheap everyday chat
GPT-6 Sol$0.30$1.52Current GPT
GPT-6 Luna$0.0144$0.0768Cheapest option

A practical setup: Claude Haiku 4.5 or GPT-6 Luna for a general assistant agent, Claude Sonnet 4.6 for writing and coding agents, and Claude Opus 5.5 only for the agent that handles the hardest work.

What does it cost?

APIVAI bills per token from a prepaid balance. Each message also resends the conversation history, so longer chats cost more per message.

Example 1: daily personal use. 50 messages a day for 30 days, each about 3,000 input and 800 output tokens: 1,500 messages cost $10.94 on Claude Sonnet 4.6 ($31.50 at official prices), or $0.157 on GPT-6 Luna.

Example 2: document-heavy work. An agent that reads long texts, 10 requests per workday over 22 workdays, each about 20,000 input and 1,500 output tokens: 220 requests cost $4.18 on Claude Sonnet 5.5, compared with $12.10 at official prices.

The Dashboard shows the tokens and cost of every request. The Claude API pricing comparison lists all models side by side with official prices.

Troubleshooting

  • 401 or "API key invalid": check the key for extra spaces, make sure it is not deleted, and check its budget and your balance on the Dashboard.
  • 404: the URL has the wrong /v1. OpenAI format (custom provider, OpenAI provider, OPENAI_PROXY_URL) needs https://api.apivai.com/v1; Anthropic format needs https://api.apivai.com. Never add /chat/completions or /messages.
  • Model not found: the Model ID must match an APIVAI ID exactly, for example claude-sonnet-4-6, not a display name. Use Fetch models or GET /v1/models.
  • Empty or cut-off replies: thinking is on by default and thinking tokens count as output. In the agent's model settings, turn on Enable Max Tokens Limit and set Max Tokens Limit to 4096 or more. If replies are empty in OpenAI format, also confirm the URL ends with /v1.
  • Env vars have no effect: restart the container after editing lobehub.env, and check the variable names exactly as written above.
  • 429: the default limit is 60 requests per minute per key. Ask support to raise it if a shared instance hits it.

FAQ

Is LobeChat the same as LobeHub?

Yes. LobeChat was renamed LobeHub; the repository, docs and Docker image now use the LobeHub name. Settings described for LobeChat in older guides map to App Settings → AI Providers.

Can I use Claude and GPT in one provider?

Yes, with a custom provider in OpenAI format at https://api.apivai.com/v1. One APIVAI key works for every model on the pricing page.

Do I need Docker?

No. Docker is only for running your own LobeHub server. In any LobeHub app that shows AI Providers, you can add APIVAI in the settings as described above.

Does APIVAI store my chats?

APIVAI does not log request or response content. Your chat history is stored by LobeHub, on your own server if you self-host.

Is there a free trial?

No. APIVAI is prepaid, pay as you go, from $10 with no subscription. See the docs for other tools, or the Open WebUI guide for another self-hosted chat interface.

Create an account, top up from $10 and paste your key into LobeHub.

Ready to start?

Get your API key in 30 seconds. Pay as you go for Claude and GPT.