auto or firerouter/opus, from a coding harness, an LLM gateway, or your own code. Every path needs a Fireworks API key. Each closed provider in the route also needs a credential. See Provide Anthropic and OpenAI credentials.
Choose a model ID
Start with
auto if you only have a Fireworks key. Without a closed-model credential, any firerouter ID serves every turn with open models. See Build a router ID and Supported models.
FireConnect
Use FireRouter in any coding harness. FireConnect writes the settings for you and restores them withoff. Manual setup gives you the same settings to add yourself, with nothing to install.
Set up your harness
Pick your harness, a model or router ID, and a setup method. Start withauto to route across Fireworks open models with only a Fireworks key, or choose Build your own to compose a firerouter route with Claude, GPT, and open models. The commands and config files update as you choose, including the provider-key headers your route needs.
FireConnect quick start for Claude Code
FireConnect quick start for Claude Code
1
Install and sign in
2
Connect with a router
3
Restart and pick FireRouter
Start a new session and open
/model. Routes with Claude models use your Claude login.4
Watch routing live
Which harnesses can send provider keys
FireConnect has no local OpenAI key option yet, so GPT routes such as
firerouter/astra and firerouter/sol need an OpenAI Provider Key when you connect with FireConnect. To send your own OpenAI key, use manual setup. For every harness’s files and restore behavior, see Coding Harnesses and Harness Compatibility.
LLM gateway
You do not need FireConnect behind a gateway. The gateway sends the exactfirerouter/... model ID and your Fireworks API key to Fireworks. Clients and harnesses behind the gateway call the router ID with only their gateway key.
Set up your gateway
Choose LiteLLM or Portkey, pick a preset or build your own route, and choose where the provider keys live. The widget writes the gateway config and a test request. Clients never need provider keys when the gateway stores them or when Provider Keys is connected. For other gateways and more detail on each credential option, see LLM Gateways.API and SDK
FireRouter works on all three Fireworks inference APIs. Use the SDK you already have and point it at Fireworks.
In every SDK, the API key is your Fireworks API key. Send closed-provider keys as extra headers:
Leave out a header when the matching Provider Key is connected. A header, when sent, takes precedence over the stored key for that request. Amazon Bedrock has no request header; it uses Provider Keys only.
Install the SDKs you use:
Build your request
Pick your models, API, and language. The router ID and the command update as you choose, with the provider headers your route needs.Examples
The examples below use two router IDs:firerouter/astrain the Chat Completions and Responses examples. FireRouter routes between GPT Astra and the Fireworks open-model mix, so it needs an OpenAI key.firerouter/solworks the same way with GPT Sol.firerouter/opusin the Messages examples. FireRouter routes between Claude Opus and the Fireworks open-model mix, so it needs an Anthropic key.
model and send the header for each closed provider in it. See Supported models and Build a router ID.
Chat Completions
Responses
Messages
https://api.fireworks.ai/inference, without /v1. The SDK adds /v1/messages. Some models return a thinking block before the text, so read the first text block rather than content[0].
Check which model served the request
Each example prints the responsemodel field. It names the model that served the turn, such as glm-5p3-flash, claude-opus-5-5, or gpt-6-astra, not the router ID you sent. To confirm closed-model access, add x-routing-preference: 1 so the route’s primary model serves the turn. See Verify routing.
For errors, limits, and more API details, see APIs and SDKs.