Available providers
Anthropic
Model: claude-sonnet-4-6
not setBest overall architecture performance. $5 free credit on sign-up.
- Create a key at console.anthropic.com/settings/keys
- Set
ANTHROPIC_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Google
Model: gemini-2.0-flash
not setGenerous free tier. Gemini 2.0 Flash by default.
- Create a key at aistudio.google.com/apikey
- Set
GOOGLE_GENERATIVE_AI_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Most broadly compatible. Pay-as-you-go from $5 minimum.
- Create a key at platform.openai.com/api-keys
- Set
OPENAI_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Groq
Model: llama-3.3-70b-versatile
not setFree tier, fastest inference. Llama 3.3 70B by default.
- Create a key at console.groq.com/keys
- Set
GROQ_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
DeepSeek
Model: deepseek-chat
not setCheapest frontier-class reasoning. DeepSeek V3 by default.
- Create a key at platform.deepseek.com/api_keys
- Set
DEEPSEEK_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Mistral
Model: mistral-large-latest
not setEU-hosted, GDPR-friendly. Mistral Large by default.
- Create a key at console.mistral.ai/api-keys
- Set
MISTRAL_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Alibaba Model Studio (Qwen)
Model: qwen-plus
not setQwen 2.5 / 3 family. Free tier on sign-up.
- Create a key at modelstudio.console.alibabacloud.com
- Set
DASHSCOPE_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
xAI (Grok)
Model: grok-2-latest
not setGrok 2 / 4 family with live web context.
- Create a key at console.x.ai
- Set
XAI_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
OpenRouter
Model: anthropic/claude-3.5-sonnet
not setOne key, 200+ models. Set OPENROUTER_MODEL to switch.
- Create a key at openrouter.ai/keys
- Set
OPENROUTER_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Together AI
Model: meta-llama/Llama-3.3-70B-Instruct-Turbo
not setOpen-weights focused. Llama 3.3 70B by default.
- Create a key at api.together.xyz/settings/api-keys
- Set
TOGETHER_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Fireworks
Model: accounts/fireworks/models/llama-v3p3-70b-instruct
not setFast OSS hosting. Llama 3.3 70B by default.
- Create a key at fireworks.ai/account/api-keys
- Set
FIREWORKS_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.
Cerebras
Model: llama-3.3-70b
not setWafer-scale inference, ~2k tokens/sec. Llama 3.3 70B.
- Create a key at cloud.cerebras.ai
- Set
CEREBRAS_API_KEY=<your-key> in .env.local (dev) or your host's env panel (Vercel / Fly / Railway). - Restart the server so Next.js loads the new env var.