Skip to main content

OpenRouter (AI)

OpenRouter gives you access to hundreds of AI models — Llama, Claude, GPT, and more — for fractions of a penny per request.

Setup

  1. Create an account at openrouter.ai and generate an API key under Profile → Keys
  2. Paste the key into config.lua:
Config.Keys = {
    ['openrouter'] = "YOUR_KEY_HERE",
}
  1. Set your provider and model:
Config.AI = {
    ['provider'] = "openrouter",
    ['model']    = "meta-llama/llama-3.1-8b-instruct",
}
  1. Fill in your server identity — OpenRouter uses this to identify your requests:
Config.ServerWebsite = "https://yourwebsite.com"
Config.ServerName    = "YourServerName"
Leaving ServerWebsite and ServerName blank risks rate limiting or blocks from OpenRouter.

Google Cloud TTS

Google’s free tier covers roughly 1–4 million characters per month depending on the voice model. Most servers never hit a charge.

Setup

  1. Go to console.cloud.google.com, create a new project, and enable the Cloud Text-to-Speech API
  2. Under APIs & Services → Credentials, create an API key and copy it
  3. Paste the key into config.lua:
Config.Keys = {
    ['google_tts'] = "YOUR_KEY_HERE",
}
  1. Set your voice model to match your locale:
Config.AI = {
    ['voice_model'] = "en-US-Standard-D",
    ['use_cache']   = true,
}
Google requires a billing account to enable APIs, but the free tier is generous enough that most servers never see a charge.

Voice Model Reference

LanguageStandard VoicesNeural/Studio Voices
English (en)en-US-Standard-D, en-US-Standard-Fen-US-Neural2-D, en-US-Studio-O
Spanish (es)es-ES-Standard-A, es-US-Standard-Bes-ES-Neural2-A, es-US-Neural2-B
French (fr)fr-FR-Standard-A, fr-CA-Standard-Bfr-FR-Neural2-A, fr-CA-Neural2-B
German (de)de-DE-Standard-B, de-DE-Standard-Dde-DE-Neural2-B, de-DE-Neural2-D
Italian (it)it-IT-Standard-A, it-IT-Standard-Cit-IT-Neural2-A, it-IT-Neural2-C
Portuguese (pt)pt-BR-Standard-A, pt-PT-Standard-Bpt-BR-Neural2-A, pt-PT-Neural2-B
Russian (ru)ru-RU-Standard-A, ru-RU-Standard-Dru-RU-Wavenet-A, ru-RU-Wavenet-D
Chinese (zh)cmn-CN-Standard-A, cmn-CN-Standard-Ccmn-CN-Wavenet-A, cmn-CN-Wavenet-C
Japanese (ja)ja-JP-Standard-B, ja-JP-Standard-Cja-JP-Neural2-B, ja-JP-Neural2-C
Arabic (ar)ar-XA-Standard-A, ar-XA-Standard-Bar-XA-Wavenet-A, ar-XA-Wavenet-B
The voice model must match your locale. If Config.Locale = 'zh' but your voice model is en-US-Standard-D, the Google API will return silence.