Skip to main content
Gateways integrate with Fireworks in two ways. Some connect to your Fireworks account and preserve Fireworks model IDs. Others expose selected Fireworks models through a gateway-managed catalog.

Check whether your gateway can use FireRouter

To call a model router such as firerouter/opus, your gateway must:
  1. Connect to your Fireworks account.
  2. Preserve the exact firerouter/... model ID.
  3. Send your Fireworks API key.
  4. Provide any Anthropic or OpenAI credential the route requires.
A gateway-managed catalog can use a FireRouter model only when that catalog lists the router ID. Fireworks serving some of the catalog’s models does not make arbitrary firerouter/... IDs available.

Connect your Fireworks account

Use a gateway-managed model catalog

These gateways expose their own model catalogs. Fireworks may serve a request, but you are not connecting an arbitrary Fireworks model ID.

LiteLLM Proxy

Use LiteLLM as a shared gateway for Fireworks serverless models, model routers, and deployments. Developers call one OpenAI-compatible chat completions API. LiteLLM manages the Fireworks connection and client access. Closed-model credentials can come from Fireworks Provider Keys, when enabled for the account, or from forwarded client headers.

Prerequisites

Configure a Fireworks model

Add each model you want to expose to config.yaml. Keep the client-facing model_name short. In litellm_params.model, use fireworks_ai/ followed by the full Fireworks path: Recent LiteLLM versions expand a short ID to accounts/fireworks/models/<id>, so a short router ID such as fireworks_ai/firerouter/opus returns 404 Model not found. The full path works on every version.
See the LiteLLM Fireworks AI provider docs for dedicated deployments and other options.

Start the proxy

Call a model

If LiteLLM virtual keys are configured, clients authenticate with a virtual key:

API key layout

Use FireRouter through a gateway

The gateway sends the exact firerouter/... model ID and your Fireworks API key to Fireworks. You do not need FireConnect. For router IDs and supported models, see FireRouter.

Set up FireRouter in LiteLLM or Portkey

Router entries for LiteLLM, the Portkey model format, and a test request.

Provide closed-model credentials

A route containing a Claude model needs an Anthropic credential. A route containing a GPT model needs an OpenAI credential. A route containing both needs credentials for both providers. An Amazon Bedrock Provider Key covers routes that include a model you mapped there. Without a credential, FireRouter leaves that closed model out and serves the turn with open models. You do not need to pass provider keys from each client or harness. Store them in the gateway once, or connect them as Provider Keys:
An account admin connects the required Provider Keys once from Settings. The gateway stores only the Fireworks key. No provider credential passes through the gateway.Provider Keys is not yet available on every account. See Provider Keys to request it.
A provider-key header sent with a request takes precedence over a Provider Key connected to the account.
Gateways often log request headers. If provider keys travel as headers, whether added by the gateway or sent by clients, check that the gateway redacts them in its logs. Provider Keys keeps provider credentials out of the gateway entirely.
LiteLLM returns your model_name in the response model field, not the model that served the turn. To confirm that closed models are reachable, send a request directly to Fireworks as shown in Verify routing. For direct API calls, see APIs and SDKs.