Skip to content
FluxCDNFluxCDN
esc
On this page

DocsTools guide

Dify with FluxCDN AI

Dify (cloud or on your own server) connects to FluxCDN with the official “OpenAI-API-compatible” plugin. You add each model separately. Only the workspace's owners and admins can add providers.

Licence:
Dify Open Source License (Apache-2.0 based, with extra conditions)
Platforms:
Self-hosted (Docker) or Dify Cloud
Address (OpenAI-compatible):
https://ai.fluxcdn.cloud/api/v1
The tool's own docs ↗

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

  1. Step 1: Install the plugin

    Integrations → Model Provider and install the OpenAI-API-compatible plugin (or from marketplace.dify.ai).

  2. Step 2: Add a model

    On the plugin's card press Add Model and enter these values. For agents Function Call Type must be Tool Call; its default is “Not Support”. Turn on Vision Support only for models that understand images. Take the sizes from the model's own page. Repeat for each other model.

    OpenAI-API-compatible → Add Model
    Model Type:                    LLM
    Model Name:                    anthropic/claude-sonnet-5.5
    API Key:                       flux_live_YOUR_KEY
    API Base URL:                  https://ai.fluxcdn.cloud/api/v1
    Completion mode:               Chat
    Model context size:            1000000
    Upper bound for max tokens:    32000
    Function Call Type:            Tool Call
    Stream function calling:       Support
    Vision Support:                Support
    API Type:                      Chat Completions API (/chat/completions)

Check it works

  1. Step 1: Save, then preview

    On Save the plugin sends a tiny request (“ping”); its cost is negligible. Then use the model in a Chatflow and preview it.

Troubleshooting

The agent falls back to ReAct instead of tools
Set the model's Function Call Type to Tool Call.
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, not claude-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/v1 and add the rest themselves; don't write /chat/completions twice and don't leave out /v1. See the which address table.
Error 429: rate_limit_exceeded or budget_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

  • Dify's knowledge bases need an embedding model; add it from another provider.

What doesn't work this way →