LobeChat → AI24X
LobeChat (LobeHub) is a popular open-source chat client. Add AI24X as a custom OpenAI-compatible provider—one key for flash/pro and VIP named models, PayPal USD top-up.
1) Web setup (tested path)
- Open lobechat.com (or the desktop app).
- Settings → Language models → Add custom provider → choose OpenAI.
- Provider id / name:
AI24X. Short blurb: Global models · one key · PayPal. - API Key: your AI24X key from Console.
- API proxy / base URL:
https://api.ai24x.com/v1— stop at/v1(do not append/chat/completions). - Use Responses API: OK for text chat. For tools / agent tool-calling, turn it off and use chat/completions.
- Fetch model list → enable
flash(andpro/ultraif you need them) → Save. - New chat → pick AI24X / flash → send
hello.
2) Desktop
Windows / macOS desktop uses the same path: Settings → Language models → custom provider → same fields as above.
3) Pitfalls (field-tested)
- Proxy set to
…/v1/chat/completions→ 405 (LobeChat already appends/chat/completions). - Responses is live for text chat. For tools / agent tool-calling, turn Responses off and use chat/completions (Completions supports tools).
- Connectivity check may fail while chat still works (check may use GET; chat uses POST).
- After rotating a key in Console, update the provider’s API Key field.
4) Quick errors
404/405 → base URL must end at /v1. 401 → new key in Console. 429 → slow down and retry.
Troubleshooting order
- Send a plain
hellowithflash. Chat working tells you the connection is fine even if the connectivity check disagrees — the check may use GET while chat uses POST. - If chat also fails, verify the key with the curl guide from a terminal.
- Confirm the base URL stops at
/v1. - For tool-calling failures, turn the Responses API off as described above.
- After rotating a key, update the provider's API Key field and save again.
Cost habits that pay off
Keep flash as the default for everyday conversations and move a chat to pro only when the answer really needs deeper reasoning. Because every model shares the same key and base URL, changing your default is a settings toggle — no reconfiguration.
Gateway guides: What is an AI gateway · OpenAI-compatible API · Pricing · Start free