API compatibility - 9 documented limits
Fireworks AI API compatibility
Fireworks AI documents an OpenAI-compatible API at https://api.fireworks.ai/inference/v1 (chat/completions and completions). Its Anthropic-compatible base URL, the value for ANTHROPIC_BASE_URL, is https://api.fireworks.ai/inference. The docs list 9 limitations: 1 for the OpenAI-compatible layer and 8 for the Anthropic-compatible layer.
Verified against Fireworks AI's own documentation. Not documented means the docs read that day do not say; it never means No.
Compare every provider in the API compatibility matrix.
OpenAI-compatible API
Supportedhttps://api.fireworks.ai/inference/v1- Endpoints
- chat/completions
- completions
- Auth
- Authorization: Bearer $API_KEY (Fireworks API key)
- Notes
- Model must be a Fireworks model resource name (accounts/fireworks/models/...). Usage stats are returned on streaming responses too, in the final chunk.
From the docs
You can use the OpenAI Python client library to interact with Fireworks. This makes migration of existing applications already using OpenAI particularly easy.
Anthropic-compatible API
Supportedhttps://api.fireworks.ai/inference- Auth
- ANTHROPIC_AUTH_TOKEN (sent as Bearer); docs say not to use ANTHROPIC_API_KEY with Claude Code
- Regional and alternate URLs
- Default
https:// api. fireworks. ai/ inference - US Only Serverless
https:// us. api. fireworks. ai/ inference
- Default
- Notes
- Base URL has no /v1 suffix; the SDK appends /v1/messages. Supported for serverless and on-demand deployments, not direct route endpoints. Only POST /v1/messages is served.
From the docs
The base URL for the Anthropic SDK ishttps://api.fireworks.ai/inference(without the/v1suffix). The SDK appends/v1/messagesautomatically.
Documented limitations
Parameters, content types and features Fireworks AI's docs say its compatibility layers ignore, reject or change, each with the line it comes from. A layer with nothing listed may still differ in ways the docs do not spell out.
OpenAI-compatible layer1
max_tokens auto-truncated when context exceeded (OpenAI errors instead)
If the length of
promptormessagesplusmax_tokensis higher than the model's context window,max_tokenswill be adjusted lower accordingly. OpenAI returns an invalid request error in this situation.docs.fireworks.ai/tools-sdks/openai-compatibility
Anthropic-compatible layer8
anthropic-version header ignored
anthropic-versionheader: Not required. Fireworks ignores this header.docs.fireworks.ai/tools-sdks/anthropic-compatibility count_tokens returns 404; message batches unavailable
Only
POST /v1/messagesis served.POST /v1/messages/count_tokensreturns404, and/v1/messages/batchesis not availabledocs.fireworks.ai/tools-sdks/anthropic-compatibility server tool metadata (caller, container) unsupported
Server-tool metadata: Fields such as
callerandcontainerare not supported.docs.fireworks.ai/tools-sdks/anthropic-compatibility tool schema fields eager_input_streaming, cache_control, allowed_callers, input_examples unsupported
Tool schema fields:
eager_input_streaming,cache_control,allowed_callers, andinput_examplesare not supported.docs.fireworks.ai/tools-sdks/anthropic-compatibility output_config.speed unsupported
The
output_config.speedoption is not supported yet.docs.fireworks.ai/tools-sdks/anthropic-compatibility document blocks and file-sourced images rejected
Two content shapes are rejected by the backend ...
documentblocks (PDF and text documents).imageblocks usingsource.type: "file".docs.fireworks.ai/tools-sdks/anthropic-compatibility thinking.budget_tokens converted to an effort band
thinking.budget_tokensis converted to an effort band, because Fireworks models take an effort level rather than a token budgetdocs.fireworks.ai/tools-sdks/anthropic-compatibility cache_creation_input_tokens always 0
cache_creation_input_tokensis always0.docs.fireworks.ai/tools-sdks/anthropic-compatibility
Example from Fireworks AI's docs
Copied verbatim from the provider's documentation, placeholders included.
from openai import OpenAI
client = OpenAI(
base_url="https://api.fireworks.ai/inference/v1",
api_key="<YOUR_FIREWORKS_API_KEY>",
)
chat_completion = client.chat.completions.create(
model="accounts/fireworks/models/llama-v3p1-8b-instruct",
messages=[
{
"role": "system",
"content": "You are a helpful assistant.",
},
{
"role": "user",
"content": "Say this is a test",
},
],
)Newsletter
Know when a provider changes its API
One email per week. New models, new endpoints and the compatibility changes that break a base URL, and what they mean for your stack.