Skip to content
FluxCDNFluxCDN
esc
On this page

DocsTools guide

Cursor with FluxCDN AI

Cursor lets you change the OpenAI address and add your own models. That works for chat in Ask and Plan modes. Agent mode isn't reliable with a custom address, and Tab completion always uses Cursor's own models. For an agent, install Cline or Kilo Code inside Cursor (VS Code guide), or run Claude Code or Codex in Cursor's terminal.

Licence:
Proprietary; by the available guides, custom models need a paid Cursor plan
Platforms:
macOS, Linux, Windows
Address (OpenAI-compatible):
https://ai.fluxcdn.cloud/api/v1

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: Clear old variables

    If OPENAI_API_KEY or OPENAI_BASE_URL are set on your system, remove them; they can clash with Cursor's setting.

  2. Step 2: Enter the key and the address

    Cursor Settings → Models, then the API Keys section. Put the key in OpenAI API Key and turn it on. Turn on Override OpenAI Base URL and replace the default address with https://ai.fluxcdn.cloud/api/v1, without /chat/completions.

  3. Step 3: Add the model

    Press + Add Custom Model, enter the id exactly and turn it on.

    Pick a setup; the settings below change with it. Any id from the models page works in their place too.

    Price per million tokens. Free plan prices, in Toman at today's rate. Routers (router/auto and the like) are not recommended for agents: an agent needs a model that is sure to support tools.

    + Add Custom Model
    anthropic/claude-sonnet-5.5
  4. Step 4: Chat in Ask mode

    In the chat panel choose Ask mode and pick the model.

Check it works

  1. Step 1: Ask a question

    Ask about a file in Ask mode. You'll see the request under Activity in the console.

Troubleshooting

Agent mode fails (for example “model is required” or a tools error)
Cursor's Agent mode sends requests this route doesn't fit when the address is custom. Use Ask or Plan, or use Cline, Kilo Code, Claude Code or Codex inside Cursor.
Answers come back empty
Set Settings → Network → HTTP Compatibility Mode to HTTP/1.1.
“does not work with your current plan or api key”
Custom models aren't available on Cursor's free plan, or the key wasn't copied right.
Cursor's own GPT models stop working
Cursor's OpenAI address override applies to every OpenAI model. Turn it off to use Cursor's own models.
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.
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”.

Limits

  • Requests are sent from Cursor's servers, not your computer, so Cursor sees the key and the requests. Cursor's Zero Data Retention policy doesn't apply to requests made with your own key.
  • Tab completion never uses your key, and Agent mode isn't reliable.

What doesn't work this way →