Skip to content

Providers

Any provider supported by laravel/ai works — add a section to config/ai.php (credentials) and config/ai-tasks.php (model, price). No code changes needed.

Pre-configured in config/ai-tasks.php — only the .env key is needed:

ProviderDriver keyPre-configured
OpenAIopenaiyes
Anthropicanthropicyes
Google Geminigeminiyes
DeepSeekdeepseekyes
Groqgroqyes
Mistralmistralyes
xAI (Grok)xaiyes
Ollama (local)ollamayes
OpenRouteropenrouteryes
ElevenLabselevenyes, audio/TTS only
Null (no calls)nullyes
AWS Bedrockbedrockadd manually, plus composer require aws/aws-sdk-php
Azure OpenAI, Cohere, Jina, VoyageAI, OpenAI-compatible, …see laravel/aiadd manually

Prices are pre-filled for OpenAI, Anthropic, Gemini and DeepSeek; for the others price is null and cost isn’t tracked until you set it. Default models and rates change over time — check them against the provider before relying on cost numbers.

laravel/ai reads API keys from config/ai.php. The key is not stored in config/ai-tasks.php — that file only holds models, prices and routing. A driver counts as configured when ai.providers.{driver}.key is set (access_key_id for Bedrock).

The .env variable each provider expects is in vendor/laravel/ai/config/ai.php.

// 1. config/ai.php (laravel/ai) — most providers are already listed there
'voyageai' => [
'driver' => 'voyageai',
'key' => env('VOYAGEAI_API_KEY'),
],
// 2. config/ai-tasks.php → drivers; the key must match the one in config/ai.php
'voyageai' => [
'embed_model' => '<model name>',
'price' => ['in' => 0.00], // per 1M tokens, from the provider's pricing page
],

Which modalities a provider supports is defined by laravel/ai (VoyageAI, for instance, does embeddings only). Then route tasks to it — see Driver routing.

For per-user keys or a self-hosted OpenAI-compatible endpoint without touching config, see Per-request provider override.