Skip to main content
Fireworks is a platform for providing endpoints for Large Language models.

Authentication

Set your FIREWORKS_API_KEY environment variable. Get your key from here.
export FIREWORKS_API_KEY=***

Prompt caching

Prompt caching will happen automatically using our Fireworks model. You can read more about how Fireworks handle caching in their docs.

Example

Use Fireworks with your Agent:
from agno.agent import Agent
from agno.models.fireworks import Fireworks

agent = Agent(
    model=Fireworks(id="accounts/fireworks/models/firefunction-v2"),
    markdown=True
)

# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")

View more examples here.

Parameters

ParameterTypeDefaultDescription
idstr"accounts/fireworks/models/llama-v3p1-405b-instruct"The id of the Fireworks model to use
namestr"Fireworks"The name of the model
providerstr"Fireworks"The provider of the model
api_keyOptional[str]NoneThe API key for Fireworks (defaults to FIREWORKS_API_KEY env var)
base_urlstr"https://api.fireworks.ai/inference/v1"The base URL for the Fireworks API
Fireworks extends the OpenAI-compatible interface and supports most parameters from the OpenAI model.
I