Environment Configuration

Configure your environment variables to enable all features of the AI agent system. You only need the services you want to use.

4
Categories
16
Variables
1
Required
15
Optional

Quick Setup

Copy this template to your .env.local file

# One Last AI - Environment Variables

# AI Service Providers
# Configure AI models for agent responses

# OpenAI API key for GPT models
# Get your key at: https://platform.openai.com/api-keys
NEXT_PUBLIC_OPENAI_API_KEY=sk-...

# Anthropic API key for Claude models
# Get your key at: https://console.anthropic.com/keys
NEXT_PUBLIC_ANTHROPIC_API_KEY=sk-ant-...

# Google Gemini API key
# Get your key at: https://aistudio.google.com/app/apikey
NEXT_PUBLIC_GEMINI_API_KEY=AIza...

# Cohere API key for Command models
# Get your key at: https://dashboard.cohere.ai/api-keys
NEXT_PUBLIC_COHERE_API_KEY=co_...


# Voice Services
# Configure text-to-speech and speech recognition

# ElevenLabs API key for high-quality voice synthesis
# Get your key at: https://elevenlabs.io/app/subscription
NEXT_PUBLIC_ELEVENLABS_API_KEY=el_...

# Default voice ID for ElevenLabs
NEXT_PUBLIC_ELEVENLABS_VOICE_ID=pNInz6obpgDQGcFmaJgB

# Azure Cognitive Services Speech key
# Get your key at: https://portal.azure.com/
NEXT_PUBLIC_AZURE_SPEECH_KEY=abc123...

# Azure Speech service region
NEXT_PUBLIC_AZURE_SPEECH_REGION=eastus


# Translation Services
# Configure language translation providers

# Google Cloud Translation API key
# Get your key at: https://console.cloud.google.com/apis/credentials
NEXT_PUBLIC_GOOGLE_TRANSLATE_API_KEY=AIza...

# DeepL API key for high-quality translation
# Get your key at: https://www.deepl.com/pro-api
NEXT_PUBLIC_DEEPL_API_KEY=abc123:fx

# Azure Translator service key
NEXT_PUBLIC_AZURE_TRANSLATOR_KEY=abc123...


# Application Settings
# Configure general application behavior

# Backend API URL
NEXT_PUBLIC_API_URL=http://localhost:3002

# Enable multilingual features
NEXT_PUBLIC_ENABLE_MULTILINGUAL=true

# Default language code
NEXT_PUBLIC_DEFAULT_LANGUAGE=en

# Enable voice features
NEXT_PUBLIC_ENABLE_VOICE=true

# Enable translation features
NEXT_PUBLIC_ENABLE_TRANSLATION=true

AI Service Providers

4 vars

Configure AI models for agent responses

NEXT_PUBLIC_OPENAI_API_KEY

OpenAI API key for GPT models

sk-...Get Key
NEXT_PUBLIC_ANTHROPIC_API_KEY

Anthropic API key for Claude models

sk-ant-...Get Key
NEXT_PUBLIC_GEMINI_API_KEY

Google Gemini API key

AIza...Get Key
NEXT_PUBLIC_COHERE_API_KEY

Cohere API key for Command models

co_...Get Key

Voice Services

4 vars

Configure text-to-speech and speech recognition

NEXT_PUBLIC_ELEVENLABS_API_KEY

ElevenLabs API key for high-quality voice synthesis

el_...Get Key
NEXT_PUBLIC_ELEVENLABS_VOICE_ID

Default voice ID for ElevenLabs

pNInz6obpgDQGcFmaJgB
NEXT_PUBLIC_AZURE_SPEECH_KEY

Azure Cognitive Services Speech key

abc123...Get Key
NEXT_PUBLIC_AZURE_SPEECH_REGION

Azure Speech service region

eastus

Translation Services

3 vars

Configure language translation providers

NEXT_PUBLIC_GOOGLE_TRANSLATE_API_KEY

Google Cloud Translation API key

AIza...Get Key
NEXT_PUBLIC_DEEPL_API_KEY

DeepL API key for high-quality translation

abc123:fxGet Key
NEXT_PUBLIC_AZURE_TRANSLATOR_KEY

Azure Translator service key

abc123...

Application Settings

5 vars

Configure general application behavior

Required
NEXT_PUBLIC_API_URL

Backend API URL

http://localhost:3002
NEXT_PUBLIC_ENABLE_MULTILINGUAL

Enable multilingual features

true
NEXT_PUBLIC_DEFAULT_LANGUAGE

Default language code

en
NEXT_PUBLIC_ENABLE_VOICE

Enable voice features

true
NEXT_PUBLIC_ENABLE_TRANSLATION

Enable translation features

true

Important Notes

1

Variables with NEXT_PUBLIC_ prefix are exposed to the browser

2

Keep API keys secure and never commit them to version control

3

Only configure the services you want to use

4

The system automatically falls back to available services

5

Restart your dev server after changing environment variables

6

For production, use your hosting platform environment settings

File Structure

Create these files in your project root:

/frontend/
.env.localYour actual API keys (DO NOT COMMIT)
.env.exampleTemplate file (safe to commit)
/backend/
.env.localBackend environment variables
.env.exampleBackend template file

Ready to Get Started?

Once configured, explore our AI agents and powerful developer tools.