> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voiceblox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Complete reference for all required and optional environment variables.

# Environment Variables

All environment variables go in `.env.local` at the project root. Restart the dev server after changes.

## Framework

| Variable             | Required | Description                                |
| -------------------- | -------- | ------------------------------------------ |
| `LIVEKIT_URL`        | ✅        | LiveKit server WebSocket URL (`wss://...`) |
| `LIVEKIT_API_KEY`    | ✅        | LiveKit API key                            |
| `LIVEKIT_API_SECRET` | ✅        | LiveKit API secret                         |

## Core

| Variable                        | Required                                | Description                                                               |
| ------------------------------- | --------------------------------------- | ------------------------------------------------------------------------- |
| `BUILDER_LLM_PROVIDER`          | ❌                                       | LLM provider for the AI flow generator: `anthropic` (default) or `gemini` |
| `BUILDER_LLM_ANTHROPIC_API_KEY` | ✅ when `BUILDER_LLM_PROVIDER=anthropic` | AI flow generator (Anthropic)                                             |
| `BUILDER_LLM_GEMINI_API_KEY`    | ✅ when `BUILDER_LLM_PROVIDER=gemini`    | AI flow generator (Gemini)                                                |
| `BUILDER_STT_PROVIDER`          | ❌                                       | STT provider for voice dictation: `deepgram` (default) or `gemini`        |
| `BUILDER_STT_DEEPGRAM_API_KEY`  | ✅ when `BUILDER_STT_PROVIDER=deepgram`  | Voice dictation in builder (Deepgram)                                     |
| `BUILDER_STT_GEMINI_API_KEY`    | ✅ when `BUILDER_STT_PROVIDER=gemini`    | Voice dictation in builder (Gemini)                                       |

## LLM

| Variable             | Provider       |
| -------------------- | -------------- |
| `OPENAI_API_KEY`     | OpenAI         |
| `GEMINI_API_KEY`     | Google Gemini  |
| `GROQ_API_KEY`       | Groq           |
| `TOGETHER_API_KEY`   | Together AI    |
| `MOONSHOT_API_KEY`   | Moonshot AI    |
| `DEEPSEEK_API_KEY`   | DeepSeek       |
| `MISTRALAI_API_KEY`  | Mistral AI     |
| `CEREBRAS_API_KEY`   | Cerebras       |
| `FIREWORKS_API_KEY`  | Fireworks AI   |
| `PERPLEXITY_API_KEY` | Perplexity     |
| `XAI_API_KEY`        | xAI            |
| `OPENROUTER_API_KEY` | OpenRouter     |
| `OVHCLOUD_API_KEY`   | OVHCloud       |
| `BEDROCK_API_KEY`    | Amazon Bedrock |
| `LETTA_API_KEY`      | Letta          |
| `OLLAMA_API_KEY`     | Ollama (local) |
| `TELNYX_API_KEY`     | Telnyx         |

## TTS

| Variable             | Provider    |
| -------------------- | ----------- |
| `ELEVENLABS_API_KEY` | ElevenLabs  |
| `CARTESIA_API_KEY`   | Cartesia    |
| `NEUPHONIC_API_KEY`  | Neuphonic   |
| `RESEMBLE_API_KEY`   | Resemble AI |
| `RIME_API_KEY`       | Rime        |
| `INWORLD_API_KEY`    | Inworld     |

## STT

| Variable               | Provider     |
| ---------------------- | ------------ |
| `ASSEMBLYAI_API_KEY`   | AssemblyAI   |
| `FAL_API_KEY`          | fal.ai       |
| `GLADIA_API_KEY`       | Gladia       |
| `SONIOX_API_KEY`       | Soniox       |
| `SPEECHMATICS_API_KEY` | Speechmatics |

## Integrations

| Variable      | Description       |
| ------------- | ----------------- |
| `EXA_API_KEY` | Exa.ai web search |

## Sharing

| Variable             | Required | Description                                                                                                                                                 |
| -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LIVEKIT_SANDBOX_ID` | ❌        | LiveKit Sandbox Token Server ID — needed for public share links. Enable at [LiveKit Cloud Settings](https://cloud.livekit.io/projects/p_/settings/project). |

## Database

| Variable         | Required | Description                                                                                                      |
| ---------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `DATABASE_URL`   | ✅        | PostgreSQL connection string (e.g. `postgresql://voiceblox:voiceblox@localhost:5432/voiceblox`)                  |
| `ENCRYPTION_KEY` | ✅        | 64-char hex key for AES-256-GCM encryption of stored provider credentials. Generate with: `openssl rand -hex 32` |

## Notes

* `OPENAI_API_KEY` is shared across LLM, TTS (gpt-4o-mini-tts), and STT (Whisper)
* `BUILDER_STT_DEEPGRAM_API_KEY` is for voice dictation in the builder only; use `DEEPGRAM_API_KEY` for Deepgram STT/TTS nodes in your flow
* `GROQ_API_KEY` is shared across LLM and TTS
* `BUILDER_LLM_ANTHROPIC_API_KEY` is for the AI flow generator only; use `ANTHROPIC_API_KEY` for Anthropic LLM nodes in your flow
* `BUILDER_LLM_GEMINI_API_KEY` and `BUILDER_STT_GEMINI_API_KEY` can hold the same Google API key value if you use a single Google project
