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:

  1. Point the tool's base URL at Flux.
  2. Paste your Flux key (sk-..., from Keys).
  3. Pick a model. Use flux-auto and 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:

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:

ProtocolBase URLUsed by
OpenAI-compatiblehttps://api.fluxrouter.ai/v1Codex, Cursor, Hermes, OpenClaw, Cline, Continue, Zed, Roo Code, Kilo Code, opencode, OpenAI SDKs
Anthropic-compatiblehttps://api.fluxrouter.ai/anthropicClaude 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.

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):

bash
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.