https://api.fireworks.ai/inference and use the same model ID across each supported wire API.
Compatible APIs
Choose the endpoint your SDK or client already uses:
For client setup, see OpenAI compatibility, Anthropic compatibility, or the Responses API.
Call the API
Chat completions
Most direct API clients use chat completions:-H "x-anthropic-api-key: $ANTHROPIC_API_KEY" to the request. To use Astra, set "model": "firerouter/astra" and connect an OpenAI Provider Key or send x-openai-api-key.
Messages (Anthropic-style)
Anthropic Messages clients use the same model id on/v1/messages:
Responses (OpenAI-style)
OpenAI Responses clients sendinput to /v1/responses:
-H "x-anthropic-api-key: $ANTHROPIC_API_KEY".
Read the serving model
For a router request, the responsemodel field identifies the model that served the request, such as glm-5p3, claude-opus-5-5, or gpt-6-astra. It does not repeat the router ID you sent.
Easy prompts tend to stay on the open model. Harder prompts tend to use the family named in the router ID. Neither result is guaranteed for a single request. Continue sending the short router slug, such as firerouter/opus.
Credentials
A provider key in a request header applies only to that request. A key connected through Provider Keys is available at the account level, so clients and gateways do not need to send it with every call.
Fireworks also accepts Anthropic credentials in
x-api-key or Authorization: Bearer. One Authorization header cannot carry both the Fireworks and Anthropic keys. If it carries the Anthropic key, send the Fireworks key in X-Fireworks-Api-Key. Prefer x-anthropic-api-key for new integrations.
For an OpenAI SDK pointed at Fireworks, api_key is the Fireworks key. Pass the OpenAI provider key as a header:
default_headers when an OpenAI Provider Key is already connected.
Limitations
- Accounts with data residency enabled must use a residency-compatible pinned serverless model. Other model-router requests are rejected.
- Model routers are not available through Microsoft Foundry.
Errors
Model routers and deployment routers
Afirerouter/... id is a model router. Routers load-balance traffic across your own Fireworks deployments.