While you can configure providers with API keys manually, I wouldn’t recommend it. It’s much easier to just use the conventionally API key name and let your provider grab it from the environment.Documentation Index
Fetch the complete documentation index at: https://docs.dartantic.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
You can just set up the API key values in your environment and let dartantic find them automatically:Provider Variable Names
| Provider | Variable | Required |
|---|---|---|
| OpenAI | OPENAI_API_KEY | ✅ |
| Anthropic | ANTHROPIC_API_KEY | ✅ |
GEMINI_API_KEY | ✅ | |
| Mistral | MISTRAL_API_KEY | ✅ |
| Cohere | COHERE_API_KEY | ✅ |
| OpenRouter | OPENROUTER_API_KEY | ✅ |
| xAI / xAI Responses | XAI_API_KEY | ✅ |
| Ollama | None (local) | ❌ |
dartantic_firebase_ai)
does not use these environment variables; it relies on Firebase configuration,
and the Google AI backend uses API keys configured in the Firebase project.
Agent Environment
The environment provided by your platform is a fall-back mechanism and it’s not always available, e.g. when you’re running dartantic in your Flutter web app. The first place that dartantic looks is the environment supplied by theAgent
class itself:
Examples
Next Steps
- Quick Start - Start building
- Providers - Available providers

