All guides / Chat clients

Use XHuoAPI in LobeChat

A self-hosted LobeChat connects to an OpenAI-compatible endpoint with two environment variables: OPENAI_PROXY_URL for the address and OPENAI_API_KEY for the key.

Before you start

Verify first

Before touching the tool, confirm the key and model work with curl. This rules out half of the 'I configured it and nothing happens' cases.

curl https://api.xhuoapi.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v3.2","messages":[{"role":"user","content":"ping"}]}'

Steps

1

Set these in your .env or the environment block of docker-compose:

OPENAI_API_KEY=sk-...
OPENAI_PROXY_URL=https://api.xhuoapi.ai/v1
2

Restart the container. Open Settings → Language Model → OpenAI in LobeChat; the XHuoAPI models should be listed. If not, click Fetch model list.

Notes

The LobeChat docs call this out: whether /v1 is needed depends on the upstream. XHuoAPI needs it. If chat replies come back blank, check this first.
Qwen models and image/video models are only available in the Standard and Official tiers. A token created in the Saver or Spot tier will get a 'model not available' error for them.

Commonly used models

These are common choices for this kind of tool; click a model to see its price in each tier. The full list is on the pricing page.

Steps follow the tool's current official documentation; the UI may change after updates. Tell us if something no longer matches.