> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fireworks AI

> LLM service implementation using Fireworks AI's API with OpenAI-compatible interface

## Overview

`FireworksLLMService` provides access to Fireworks AI's language models through an OpenAI-compatible interface. It inherits from `OpenAILLMService` and supports streaming responses, function calling, and context management with optimized inference infrastructure.

<CardGroup cols={2}>
  <Card title="Fireworks LLM API Reference" icon="code" href="https://reference-server.pipecat.ai/en/latest/api/pipecat.services.fireworks.llm.html">
    Pipecat's API methods for Fireworks AI integration
  </Card>

  <Card title="Example Implementation" icon="play" href="https://github.com/pipecat-ai/pipecat/blob/main/examples/function-calling/function-calling-fireworks.py">
    Complete example with function calling
  </Card>

  <Card title="Fireworks Documentation" icon="book" href="https://docs.fireworks.ai/api-reference/post-chatcompletions">
    Official Fireworks AI API documentation and features
  </Card>

  <Card title="Fireworks Platform" icon="microphone" href="https://fireworks.ai/">
    Access models and manage API keys
  </Card>
</CardGroup>

## Installation

To use Fireworks AI services, install the required dependency:

```bash theme={null}
uv add "pipecat-ai[fireworks]"
```

## Prerequisites

### Fireworks AI Account Setup

Before using Fireworks AI LLM services, you need:

1. **Fireworks Account**: Sign up at [Fireworks AI](https://fireworks.ai/)
2. **API Key**: Generate an API key from your account dashboard
3. **Model Selection**: Choose from available open-source and proprietary models

### Required Environment Variables

* `FIREWORKS_API_KEY`: Your Fireworks AI API key for authentication

## Configuration

<ParamField path="api_key" type="str" required>
  Fireworks AI API key for authentication.
</ParamField>

<ParamField path="model" type="str" default="None" deprecated>
  Model identifier to use.

  *Deprecated in v0.0.105. Use `settings=FireworksLLMService.Settings(model=...)` instead.*
</ParamField>

<ParamField path="settings" type="FireworksLLMService.Settings" default="None">
  Runtime-configurable settings. See [Settings](#settings) below.
</ParamField>

<ParamField path="base_url" type="str" default="https://api.fireworks.ai/inference/v1">
  Base URL for Fireworks API endpoint.
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `FireworksLLMService.Settings(...)`. These can be updated mid-conversation with `LLMUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details.

This service uses the same settings as `OpenAILLMService`. See [OpenAI LLM Settings](/api-reference/server/services/llm/openai#settings) for the full parameter reference.

## Usage

### Basic Setup

```python theme={null}
import os
from pipecat.services.fireworks import FireworksLLMService

llm = FireworksLLMService(
    api_key=os.getenv("FIREWORKS_API_KEY"),
    model="accounts/fireworks/models/firefunction-v2",
)
```

### With Custom Settings

```python theme={null}
from pipecat.services.fireworks import FireworksLLMService

llm = FireworksLLMService(
    api_key=os.getenv("FIREWORKS_API_KEY"),
    settings=FireworksLLMService.Settings(
        model="accounts/fireworks/models/firefunction-v2",
        temperature=0.7,
        top_p=0.9,
        max_tokens=1024,
    ),
)
```

## Notes

* Fireworks does not support the `seed`, `max_completion_tokens`, or `stream_options` parameters. Use `max_tokens` instead.
* Model identifiers use the `accounts/fireworks/models/` prefix format.

<Tip>
  The `InputParams` / `params=` pattern is deprecated as of v0.0.105. Use
  `Settings` / `settings=` instead. See the [Service Settings
  guide](/pipecat/fundamentals/service-settings) for migration details.
</Tip>
