Guides
AI Providers

AI Providers

Avatarium supports multiple AI providers for conversation intelligence.

Available Providers

ProviderModelBest For
Groq (default)LLaMA 3.1 70BFast responses, cost-effective
OpenAIGPT-4oComplex reasoning
AnthropicClaude 3.5 SonnetNuanced conversations
GoogleGemini 1.5 ProMultimodal capabilities

Configuration

In the SDK

<Avatar
  apiKey="..."
  avatarId="aria-001"
  aiProvider="groq"
/>

Via API

curl -X POST https://api.avatarium.ai/v1/conversations \
  -H "Authorization: Bearer av_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "avatar_id": "aria-001",
    "ai_provider": "anthropic"
  }'

Provider Details

Groq (Default)

Groq is the default provider, offering the fastest response times at the lowest cost.

  • Model: LLaMA 3.1 70B
  • Latency: ~100ms
  • Best for: General conversations, quick responses
<Avatar aiProvider="groq" />

OpenAI

  • Model: GPT-4o
  • Latency: ~500ms
  • Best for: Complex reasoning, detailed responses
<Avatar aiProvider="openai" />

Anthropic

  • Model: Claude 3.5 Sonnet
  • Latency: ~400ms
  • Best for: Nuanced conversations, safety-critical applications
<Avatar aiProvider="anthropic" />

Google

  • Model: Gemini 1.5 Pro
  • Latency: ~400ms
  • Best for: Multimodal understanding, complex queries
<Avatar aiProvider="gemini" />

Custom System Prompts

Each provider can be configured with a custom system prompt:

<Avatar
  aiProvider="anthropic"
  systemPrompt={`
    You are a customer support agent for a software company.
    Be helpful, concise, and professional.
    If you don't know the answer, offer to connect the user with a human agent.
  `}
/>

Provider Fallback

Configure automatic fallback if a provider is unavailable:

<Avatar
  aiProvider="groq"
  fallbackProvider="openai"
  onProviderChange={(from, to) => {
    console.log(`Switched from ${from} to ${to}`);
  }}
/>