Overview
The Endpoints API allows you to configure and retrieve available AI endpoints and models. LibreChat supports multiple AI providers including OpenAI, Anthropic, Google, Azure, and custom endpoints. All endpoint configuration endpoints are prefixed with/api/endpoints or /api/models.
Get Available Endpoints
Retrieve all configured AI endpoints:Response
Returns endpoint configuration including available models, capabilities, and settings.Get Models
Retrieve detailed model information for all endpoints:Response
Model configurations organized by endpoint
Endpoint Types
LibreChat supports the following endpoint types:OpenAI
- Endpoint:
openAI - Models: GPT-4, GPT-3.5, GPT-4 Vision, etc.
- Features: Function calling, vision, streaming
- Configuration: API key, organization ID
Anthropic (Claude)
- Endpoint:
anthropic - Models: Claude 3 Opus, Sonnet, Haiku
- Features: Long context, vision, tool use
- Configuration: API key
Google (Gemini)
- Endpoint:
google - Models: Gemini Pro, Gemini Pro Vision
- Features: Multimodal, safety settings
- Configuration: API key
Azure OpenAI
- Endpoint:
azureOpenAI - Models: Azure-hosted OpenAI models
- Features: Same as OpenAI with Azure integration
- Configuration: API key, instance name, deployment name
Custom Endpoints
- Endpoint:
custom - Models: Any OpenAI-compatible API
- Features: Varies by provider
- Configuration: API key, base URL
Assistants
- Endpoint:
assistants - Models: OpenAI Assistants API models
- Features: Code interpreter, file search, function calling
- Configuration: API key, assistant ID
Azure Assistants
- Endpoint:
azureAssistants - Models: Azure-hosted Assistants API
- Features: Same as OpenAI Assistants
- Configuration: API key, instance name
Endpoint Configuration
Endpoints are configured via:- Environment Variables: Set API keys and endpoint URLs
- Configuration File:
librechat.yamlfor advanced settings - Admin Interface: For dynamic endpoint management
Environment Variables
Configuration File (librechat.yaml)
Model Capabilities
Each model supports different capabilities:Vision Support
Models that can process images:gpt-4-vision-preview(OpenAI)claude-3-opus,claude-3-sonnet(Anthropic)gemini-pro-vision(Google)
Tool/Function Calling
Models that support function calling:- All GPT-4 models (OpenAI)
- Claude 3 models (Anthropic)
- Gemini Pro (Google)
Streaming
All endpoints support streaming responses via Server-Sent Events (SSE).Context Windows
- GPT-4: 8K-128K tokens depending on variant
- Claude 3: Up to 200K tokens
- Gemini Pro: Up to 32K tokens
User-Provided Endpoints
Some deployments allow users to provide their own API keys:userProvide is true, users can enter their own API key in the UI.
Model Selection
When starting a conversation, specify the endpoint and model:Model Fallbacks
If a requested model is unavailable, LibreChat can fall back to alternative models based on configuration.Rate Limits
Each endpoint has its own rate limits:- OpenAI: Based on account tier
- Anthropic: Based on account tier
- Google: Per-project limits
- Azure: Configurable per deployment
Cost Tracking
LibreChat can track token usage and costs:Error Responses
Invalid API Key
Model Not Available
Rate Limit Exceeded
Best Practices
- Use environment variables for API keys (never hardcode)
- Configure model lists to only show available models
- Set appropriate rate limits to prevent abuse
- Enable streaming for better user experience
- Monitor usage to track costs and usage patterns
- Use fallback models for reliability
- Test endpoints before deploying to production