LibreChat with FluxCDN AI
LibreChat runs on your own server. You give it FluxCDN as a “custom endpoint”; requests go from the LibreChat server. LibreChat's agents use the same connection.
- Licence:
- MIT, open source
- Platforms:
- Self-hosted (Docker, Node); any browser
- Address (OpenAI-compatible):
https://ai.fluxcdn.cloud/api/v1- Address (Anthropic-compatible):
https://ai.fluxcdn.cloud/api
Before you start
- Create an API key. On the API keys page press “Create key” and copy the key right away. It starts with
flux_live_and is never shown in full again. - Give agents a key of their own and set a daily or monthly spending limit on it with “Limits”. Agents send request after request by themselves; the limit stops spending you didn't expect.
- Have some credit in the account (Billing).
- In the examples, put your own key where it says
flux_live_YOUR_KEY.
Set it up
Step 1: Put the key in
.env.envFLUXCDN_API_KEY=flux_live_YOUR_KEYStep 2: Define the endpoint in
librechat.yamlThe file sits next to
.envat the project root.fetch: truefetches the model list from FluxCDN, anddefaultis used if that fails. A cheap model writes the chat titles. If you want Claude models to go in Anthropic's own format, also add the second tab's block undercustom.librechat.yamlversion: 1.3.18 cache: true endpoints: custom: - name: 'FluxCDN AI' apiKey: '${FLUXCDN_API_KEY}' baseURL: 'https://ai.fluxcdn.cloud/api/v1' models: default: ['anthropic/claude-sonnet-5.5', 'openai/gpt-5.5', 'deepseek/deepseek-v4-pro', 'z-ai/glm-5.3'] fetch: true titleConvo: true titleModel: 'deepseek/deepseek-v4-flash' modelDisplayLabel: 'FluxCDN AI'Step 3: With Docker: mount the file
Copy
docker-compose.override.yml.exampletodocker-compose.override.yml, enable this part in it, and rundocker compose down && docker compose up -d.docker-compose.override.ymlservices: api: volumes: - type: bind source: ./librechat.yaml target: /app/librechat.yaml
Check it works
Step 1: Open a chat
Choose “FluxCDN AI” in the endpoint selector, pick a model and send a message. The chat's title should appear shortly after.
Troubleshooting
- LibreChat won't start (exit code 1)
librechat.yamlis invalid, usually the indentation.docker compose logs apishows the error.- A model rejects a parameter
- Add
dropParamsto the endpoint, for exampledropParams: ['stop']. - Error 401 or
invalid_api_key - The key wasn't copied whole, was revoked, or went in the wrong field. It starts with
flux_live_and has no spaces. If the tool reads it from an environment variable, open a new terminal or window after setting it. - Error 402,
insufficient_credit(in Codex:insufficient_quota) although you have credit - Before each request, the most it could cost is set aside from your credit. When the answer ends, only the real cost is taken and the rest is released. A tool that asks for a very long output on every request sets aside a large amount. Lower the tool's output limit (for example to 32000 tokens) or add credit.
- Error 404 or
model_not_found - The model id must be exactly as on the models page, with the maker's prefix:
anthropic/claude-sonnet-5.5, notclaude-sonnet-5.5. Lower case and dots matter. Copy the id rather than typing it. - A 404 that doesn't mention the model
- The base address is wrong. Most tools want
https://ai.fluxcdn.cloud/api/v1and add the rest themselves; don't write/chat/completionstwice and don't leave out/v1. See the which address table. - Error 429:
rate_limit_exceededorbudget_exceeded - Either requests per minute went over the limit (wait a little; most tools retry by themselves), or this key's spending today or this month reached its limit. See it on API keys under “Limits”.
- Error 502, 503, 504 or 529
- The model's service was briefly unavailable. Send again; most tools do it themselves. A request that fails before answering costs nothing. If it lasts, switch to another model for a while.
Limits
- File search (the RAG API) needs a separate embedding model; FluxCDN has no embeddings.

