Skip to content

FireworksAI

Fireworks AI provides fast hosted inference for open-source language models.

The OpenAI provider is an optional dependency. To install, run:

Terminal window
pip install 'strands-agents[openai]'

Create an API key, export it as FIREWORKS_API_KEY, and point the provider at Fireworks AI’s endpoint:

import os
from strands import Agent
from strands.models.openai import OpenAIModel
model = OpenAIModel(
client_args={
"api_key": os.environ["FIREWORKS_API_KEY"],
"base_url": "https://api.fireworks.ai/inference/v1",
},
model_id="accounts/fireworks/models/deepseek-v3p1-terminus",
)
agent = Agent(model=model)
response = agent("Explain tool calling in one sentence.")
print(response)

Two client settings connect the provider to Fireworks AI:

  • API key: from your account settings
  • Base URL: https://api.fireworks.ai/inference/v1

Model IDs come from the Fireworks AI model library and carry the accounts/fireworks/models/ prefix. For model parameters and other provider options, see the OpenAI provider guide.