Overview
Providers in Asta represent different AI services that can process chat requests. Each provider has its own configuration, models, and capabilities.Available Providers
Asta currently supports the following AI providers:- ollama - Local Ollama instance
- groq - Groq cloud API
- google - Google Gemini API
- claude - Anthropic Claude API
- openai - OpenAI API
- openrouter - OpenRouter API
List Providers
GET /api/providers
Retrieve a list of all available AI providers.Response
Array of provider identifier strings. These can be used in the
provider parameter when sending chat requests.Provider Details
Each provider implements a standardized interface with the following characteristics:Provider Response Structure
All providers return responses in a consistent format:Error Types
API key is invalid or missing
Rate limit exceeded for the provider
The specified model does not exist or is not accessible
Request timed out
Temporary error (connection reset, 500 error, etc.)
Provider Configuration
Providers are configured via environment variables or the Asta configuration file. Each provider may require different credentials:Ollama
Groq
Google (Gemini)
Claude (Anthropic)
OpenAI
OpenRouter
Provider Selection
When sending a chat request, you can specify which provider to use:Default Provider
If you don’t specify a provider (or useprovider: "default"), Asta will use the user’s configured default provider.
Specific Provider
You can explicitly choose a provider:Provider Capabilities
Streaming Support
All providers support both standard and streaming responses:- Use
/api/chatfor complete responses - Use
/api/chatfor token-by-token streaming
Vision Support
Providers with vision capabilities can process images:- claude - Supports image inputs
- google - Supports image inputs
- openai - Supports image inputs (GPT-4 Vision)
image_base64 and image_mime parameters:
Tool/Function Calling
Providers support tool calling for extended capabilities:- Web search
- Web page fetching
- Code execution
- File operations
Provider Runtime State
Each provider maintains runtime state including:- Connection status - Whether the provider is reachable
- Model availability - Which models are currently available
- Rate limit status - Current rate limit state
- Error tracking - Recent errors and their types