Zed
Configure FluxRouter as an OpenAI-compatible provider in Zed, with the key set via environment variable.
Zed supports OpenAI-compatible providers in its settings. Point one at FluxRouter and set the key as an environment variable.
One-click with Flux Desktop
Flux Desktop can help you set up Zed. The manual steps below show what it configures.
Manual config
Add an openai_compatible provider to your Zed settings.json:
{
"language_models": {
"openai_compatible": {
"FluxRouter": {
"api_url": "https://api.fluxrouter.ai/v1",
"available_models": [
{
"name": "flux-auto",
"display_name": "Flux Auto",
"max_tokens": 200000,
"capabilities": {
"tools": true,
"images": false,
"parallel_tool_calls": false,
"prompt_cache_key": false
}
}
]
}
}
}
}
Important: the API key is set via environment variable, not settings
Zed does not read the API key from settings.json. Set it with an environment variable named after the provider, uppercased, with _API_KEY appended. The provider above is named FluxRouter, so the variable is FLUXROUTER_API_KEY:
export FLUXROUTER_API_KEY="sk-YOUR-FLUX-KEY"
Launch Zed from the same shell so it inherits the variable.
Test it
Open the assistant panel, pick the "Flux Auto" model under the FluxRouter provider, and send a message. A reply confirms both the endpoint and the key are working. Your dashboard will show the request.