# Observability for Anannas AI with Opik

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

[Anannas AI](https://anannas.ai) is a unified inference gateway providing access to 500+ models (OpenAI, Anthropic, Mistral, Gemini, DeepSeek, and more) through an OpenAI-compatible API.

## Gateway Overview

Anannas AI provides a unified interface for accessing hundreds of LLM models through a single OpenAI-compatible API, making it easy to switch between providers and models without changing your code.

**Key Features:**

* **500+ Models**: Single API for accessing models from OpenAI, Anthropic, Mistral, Gemini, DeepSeek, and more
* **OpenAI-Compatible API**: Drop-in replacement for OpenAI SDK with standard request/response format
* **Provider Health Monitoring**: Automatic fallback routing in case of failures or degraded performance
* **Low Overhead**: \~0.48ms latency overhead with 5% markup
* **BYOK Support**: Bring Your Own Key for enterprise deployments

## Account Setup

[Comet](https://www.comet.com/site?from=llm\&utm_source=opik\&utm_medium=colab\&utm_content=anannas\&utm_campaign=opik) provides a hosted version of the Opik platform. [Simply create an account](https://www.comet.com/signup?from=llm\&utm_source=opik\&utm_medium=colab\&utm_content=anannas\&utm_campaign=opik) and grab your API Key.

> You can also run the Opik platform locally, see the [installation guide](https://www.comet.com/docs/opik/self-host/overview/?from=llm\&utm_source=opik\&utm_medium=colab\&utm_content=anannas\&utm_campaign=opik) for more information.

## Getting Started

### Installation

First, ensure you have both `opik` and `openai` packages installed:

```bash
pip install opik openai
```

### Configuring Opik

Configure the Opik Python SDK for your deployment type. See the [Python SDK Configuration guide](/tracing/sdk_configuration) for detailed instructions on:

* **CLI configuration**: `opik configure`
* **Code configuration**: `opik.configure()`
* **Self-hosted vs Cloud vs Enterprise** setup
* **Configuration files** and environment variables

### Configuring Anannas AI

You'll need an Anannas AI API key. You can get one from [Anannas AI](https://anannas.ai).

Set it as an environment variable:

```bash
export ANANNAS_API_KEY="YOUR_ANANNAS_API_KEY"
```

Or set it programmatically:

```python
import os
import getpass

if "ANANNAS_API_KEY" not in os.environ:
    os.environ["ANANNAS_API_KEY"] = getpass.getpass("Enter your Anannas AI API key: ")
```

## Logging LLM Calls

Since Anannas AI provides an OpenAI-compatible API, we can use the [Opik OpenAI SDK wrapper](/docs/opik/integrations/openai) to automatically log Anannas AI calls as generations in Opik.

### Simple LLM Call

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