Flireo AI
WebsiteLinkedin
WebsiteLinkedin
  1. Guides
  • API Reference
    • Agents
      • List all agents
      • Create a new agent
      • Get an agent
      • Update an agent
      • Delete an agent
    • Tool Templates
      • List all tool templates
      • Create a new tool template
      • Get a tool template
      • Update a tool template
      • Delete a tool template
    • Numbers
      • List all phone numbers
      • Register a phone number
      • Get a phone number
      • Update a phone number
      • Delete a phone number
    • Calls
      • List calls
      • Get call by ID
      • Initiate outbound call
    • Call Control
      • Send control command to active call
    • Usage
      • Get usage logs
    • SIP Trunks
      • List SIP trunks
      • Create a SIP trunk
      • Get a SIP trunk
      • Delete a SIP trunk
    • Voices
      • List available voices
    • BYOK
      • Get BYOK configurations
      • Add BYOK configuration
      • Delete BYOK configuration
      • Get BYOK provider configurations
    • Domains
      • Get your domain
      • Add a domain
      • Delete your domain
      • List available Resend domains
      • Select and sync a Resend domain
      • Verify domain DNS records
      • Refresh domain status
    • Webhooks
      • Dynamic assistant configuration webhook
      • Tool/Function Call
      • Call Status Update
      • End of Call Report
    • Analysis Templates
      • List analysis templates
      • Create analysis template
      • Get analysis template
      • Update analysis template
      • Delete analysis template
    • Organization
      • Get organization information
    • Campaigns
      • List all campaigns
      • Create a campaign
      • Get a campaign
      • Update a campaign
      • Delete a campaign
      • List campaign leads
      • Add a lead
      • Remove a lead
  • Documentation
    • Get started
      • Quickstart
      • Introduction
      • Authentication
    • Core concepts
      • Agents
      • Phone numbers
      • Calls
      • Webhooks
    • Api's
      • Organization
      • Agents
      • Phone numbers
      • Sip trunks
      • Calls
      • Call control
      • Usage
      • Voices
      • BYOK
      • Domains
      • Analysis templates
      • Tool templates
    • Webhooks
      • Overview
      • Assistant request
      • Tool calls
      • Status update
      • End of call report
      • Security
    • Guides
      • BYOK Setup
      • Call analysis
      • Custom Tools
      • Call Transfers
      • xAI Realtime Integration
      • Analysis templates
      • Billing
      • Error codes
      • Rate limits
      • Sip Trunks
      • Tool templates
      • Troubleshooting
WebsiteLinkedin
WebsiteLinkedin
  1. Guides

xAI Realtime Integration

xAI's Grok Realtime API provides speech-to-speech conversation with <700ms latency. Unlike traditional voice AI (STT → LLM → TTS), Grok processes audio directly in a single model.

Setup

1. Add xAI API Key

Navigate to Integrations → API Keys tab and add your xAI API key:

curl -X POST https://api.flireo.com/api/v1/byok 
  -H "Authorization: Bearer YOUR_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "provider": "xai",
    "api_key": "xai-..."
  }'

2. Configure Agent

When creating or editing an agent with xAI configured:

  • Provider: Select "xAI Realtime"
  • Model: grok-realtime-v1
  • Voice: ara (or other available voices)

Note: When using xAI Realtime, separate STT/TTS providers are ignored.

Backend Integration

Your backend agent will use:

from livekit.plugins import xai

session = AgentSession(
    llm=xai.realtime.RealtimeModel(
        api_key=xai_api_key,  # From Vault
        voice="ara",
    )
)

Pricing

xAI Realtime uses BYOK pricing:

  • €0,07/minute when using your xAI API key
  • Direct billing to your xAI account
  • No markup on xAI API usage

Differences from Traditional Mode

FeatureTraditional (STT+LLM+TTS)xAI Realtime
Latency~1-2 seconds<700ms
Providers3 separate (Deepgram + OpenAI + ElevenLabs)Single (xAI)
Voice QualityDepends on TTS providerNative to model
Custom ToolsSupported via llm_config.toolsCheck xAI docs for support
BYOK Keys Required3 keys (STT, LLM, TTS)1 key (xAI)

Limitations

  • Custom system prompts may work differently than OpenAI
  • Tool calling support depends on xAI API capabilities
  • Voice selection limited to xAI's available voices

API Reference

See BYOK API Reference for managing xAI API keys.

Modified at 2025-12-29 14:26:25
Previous
Call Transfers
Next
Analysis templates
Built with