Prerequisites
- A Fireworks API key (
fw_...) - An Anthropic API key (
sk-ant-...) for pass-through to Claude Opus 4.8
Chat Completions
Send a request to the Chat Completions endpoint with the FireRouter model ID:Anthropic Messages
For clients that speak the Anthropic Messages API:Verify routing
- Send a trivial prompt (for example “rename foo to bar”). Expect a fast response routed to the open model.
- Send a hard reasoning prompt. Expect pass-through to Claude Opus 4.8.
- Optionally set
x-routing-preferenceto bias routing. See Routing preferences.
X-Fireworks-Api-Key instead of Authorization: Bearer. See Authentication for the full header reference.
Related
- Overview: model ID and routing pair
- Authentication: header reference
- Routing preferences: tune cost vs. quality
- LiteLLM: add FireRouter to LiteLLM Proxy
- FireConnect: harness setup for Claude Code and more