FireworksAI
Fireworks AI provides fast hosted inference for open-source language models.
Installation
Section titled “Installation”The OpenAI provider is an optional dependency. To install, run:
pip install 'strands-agents[openai]'npm install @strands-agents/sdk openaiCreate an API key, export it as
FIREWORKS_API_KEY, and point the provider at Fireworks AI’s endpoint:
import os
from strands import Agentfrom 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)import { Agent } from '@strands-agents/sdk'import { OpenAIModel } from '@strands-agents/sdk/models/openai'
const model = new OpenAIModel({ api: 'chat', apiKey: process.env.FIREWORKS_API_KEY, clientConfig: { baseURL: 'https://api.fireworks.ai/inference/v1', }, modelId: 'accounts/fireworks/models/deepseek-v3p1-terminus',})
const agent = new Agent({ model })const response = await agent.invoke('Explain tool calling in one sentence.')console.log(response)Configuration
Section titled “Configuration”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.