Skip to main content

Overview

AnannasLLMService provides an OpenAI-compatible interface for accessing Anannas AI’s unified inference gateway, which routes to 500+ models from providers such as OpenAI, Anthropic, Mistral, Gemini, and DeepSeek through a single API. It extends Pipecat’s OpenAILLMService, so it supports streaming responses and function calling.

Source Repository

Source code, examples, and issues for the Anannas AI integration

PyPI Package

The pipecat-anannas package on PyPI

Anannas AI

Documentation and supported models for Anannas AI

API Keys

Create and manage your Anannas AI API keys

Installation

This is a community-maintained package distributed separately from pipecat-ai:
pip install pipecat-anannas

Prerequisites

Anannas AI Account Setup

Before using the Anannas AI LLM service, you need:
  1. Anannas AI Account: Sign up at Anannas AI
  2. API Key: Create a key from your dashboard

Required Environment Variables

  • ANANNAS_API_KEY: Your Anannas AI API key for authentication

Configuration

api_key
str
default:"None"
Anannas AI API key. Falls back to the ANANNAS_API_KEY environment variable if not provided.
model
str
default:"gpt-4o"
Model identifier to use. Supports any model available through Anannas AI (e.g., "gpt-4o", "claude-3-5-sonnet-20241022", "deepseek-chat").
base_url
str
default:"https://api.anannas.ai/v1"
Base URL for the Anannas AI API.
kwargs
Additional keyword arguments passed through to the underlying OpenAILLMService.

Usage

import os

from pipecat_anannas import AnannasLLMService
from pipecat.pipeline.pipeline import Pipeline
from pipecat.services.deepgram.stt import DeepgramSTTService
from pipecat.services.azure.tts import AzureTTSService

# Create services
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
llm = AnannasLLMService(
    api_key=os.getenv("ANANNAS_API_KEY"),
    model="gpt-4o",  # or any supported model
)
tts = AzureTTSService(
    api_key=os.getenv("AZURE_SPEECH_API_KEY"),
    region=os.getenv("AZURE_SPEECH_REGION"),
)

# Build pipeline
pipeline = Pipeline([stt, llm, tts])
See the source repository for a complete function calling example.

Compatibility

Tested with Pipecat v0.0.86+. Check the source repository for the latest tested version and changelog.