Connect your agent
Point any agent at Flux with two settings: the base URL and your key. Setup pages for every agent, plus the rules that work for anything else.
One key, any agent. For almost every agent or tool, connecting to Flux is the same three steps:
- Point the tool's base URL at Flux.
- Paste your Flux key (
sk-..., from Keys). - Pick a model. Use
flux-autoand Flux picks among vetted models for each kind of task, cost-aware.
Your agent
Each of these has its own setup page, with the exact config, what your agent gains, and fixes for the common errors:
Anything else
Flux is not a closed list. Anything with an OpenAI or Anthropic endpoint works:
- Any OpenAI-compatible tool: your tool asks for a base URL and a key.
- Any Anthropic-compatible tool: your tool speaks Anthropic Messages.
- A custom endpoint: tools with a custom provider block, and your own code over HTTP.
The Agents hub lists them all.
Two protocols, two base URLs
Flux speaks both the OpenAI and Anthropic wire formats. Pick the base URL that matches how your tool talks:
| Protocol | Base URL | Used by |
|---|---|---|
| OpenAI-compatible | https://api.fluxrouter.ai/v1 | Codex, Cursor, Hermes, OpenClaw, Cline, Continue, Zed, Roo Code, Kilo Code, opencode, OpenAI SDKs |
| Anthropic-compatible | https://api.fluxrouter.ai/anthropic | Claude Code, aider (Anthropic path), Anthropic SDKs |
The rule of thumb: OpenAI-compatible tools want a base URL that ends in /v1, and they append /chat/completions or /responses themselves. Anthropic-compatible tools want https://api.fluxrouter.ai/anthropic, and they append /v1/messages themselves. Don't include the full path yourself.
Give your agent abilities
The base URL gives your agent every model. To let it read pages, make images and more, add the Flux tools server with the same key. See Set up the Flux tools server.
One click: Flux Desktop
If you'd rather not edit config files, Flux Desktop detects the AI tools you have installed and configures them for you.
From the terminal: the Flux CLI
There is also an official command-line client, published on npm as @fluxrouter/cli. Run it directly with npx @fluxrouter/cli <command>, or install it globally with npm install -g @fluxrouter/cli to get the fluxrouter command. It uses the same sk-... key as everything else.
More tool guides
These tools have setup guides in the docs. They move into Agents as their own pages in time.
- aider
- Anthropic SDK
- Continue
- Crush
- Droid
- GitHub Copilot
- Goose
- JetBrains AI Assistant
- Kilo Code
- Kimi CLI
- LangChain
- LlamaIndex
- Mistral Vibe
- OpenAI SDK
- opencode
- Pi
- Qwen Code
- Roo Code
- Vercel AI SDK
- Windsurf
- Zed
Some tools cannot point at a custom base URL yet. See Tools that need a workaround.
Test your connection
Once a tool is pointed at Flux, the fastest sanity check is a direct request (more in Quick requests):
curl https://api.fluxrouter.ai/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR-FLUX-KEY" \
-H "Content-Type: application/json" \
-d '{"model":"flux-auto","messages":[{"role":"user","content":"hi"}]}'
A JSON response with a completion means your key works. If it doesn't, see My agent won't connect.