aider

Connect aider to FluxRouter over the Anthropic protocol with one environment variable.

aider can talk to FluxRouter over either protocol. To use the Anthropic endpoint, set ANTHROPIC_API_BASE to https://api.fluxrouter.ai/anthropic, pass your Flux key, and select an anthropic/ model.

One-click: Flux Desktop detects installed tools and configures them for you.

Anthropic protocol (/anthropic)

bash
export ANTHROPIC_API_BASE="https://api.fluxrouter.ai/anthropic"
export ANTHROPIC_API_KEY="sk-YOUR-FLUX-KEY"
aider --model anthropic/flux-auto

You can set the same base URL in .aider.conf.yml (in your home directory or repo root) with the anthropic-api-base: key.

OpenAI protocol (/v1)

aider also works against FluxRouter's OpenAI endpoint if you prefer:

bash
export OPENAI_API_BASE="https://api.fluxrouter.ai/v1"
export OPENAI_API_KEY="sk-YOUR-FLUX-KEY"
aider --model openai/flux-auto

Or in .aider.conf.yml:

yaml
openai-api-base: https://api.fluxrouter.ai/v1
openai-api-key: sk-YOUR-FLUX-KEY
model: openai/flux-auto

A .env file works too: AIDER_OPENAI_API_BASE=https://api.fluxrouter.ai/v1.

Test it

Start aider in a repo and ask it to summarize a file, or confirm the endpoint directly:

bash
curl https://api.fluxrouter.ai/anthropic/v1/messages \
  -H "x-api-key: sk-YOUR-FLUX-KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"flux-auto","max_tokens":1024,"messages":[{"role":"user","content":"hi"}]}'