# Observability for Fireworks AI with Opik

> Start here to integrate Opik into your Fireworks AI-based genai application for end-to-end LLM observability, unit testing, and optimization.

[Fireworks AI](https://fireworks.ai/) provides fast inference for popular open-source models, offering high-performance API access to models like Llama, Mistral, and Qwen with optimized inference infrastructure.

This guide explains how to integrate Opik with Fireworks AI using their OpenAI-compatible API endpoints. By using the Opik OpenAI integration, you can easily track and evaluate your Fireworks AI API calls within your Opik projects as Opik will automatically log the input prompt, model used, token usage, and response generated.

![Fireworks AI Integration Results](https://files.buildwithfern.com/https://opik.docs.buildwithfern.com/docs/opik/2026-01-30T17:33:07.444Z/img/tracing/fireworks_ai_integration.png)

## Getting Started

### Account Setup

First, you'll need a Comet.com account to use Opik. If you don't have one, you can [sign up for free](https://www.comet.com/signup?utm_source=opik\&utm_medium=docs\&utm_campaign=fireworks-ai-integration).

### Installation

Install the required packages:

```bash
pip install opik openai
```

### Configuration

Configure Opik to send traces to your Comet project:

```python
import opik

opik.configure(
    project_name="your-project-name",
    workspace="your-workspace-name",
)
```

### Environment Setup

Set your Fireworks AI API key as an environment variable:

```bash
export FIREWORKS_API_KEY="your-fireworks-api-key"
```

You can obtain a Fireworks AI API key from the [Fireworks AI dashboard](https://fireworks.ai/api-keys).

## Basic Usage

### Import and Setup

```python
from opik.integrations.openai import track_openai
from openai import OpenAI