Adding AI Providers
Providers are connections to external AI APIs. Liona lets you seamlessly integrate with popular AI services like OpenAI, Anthropic, Grok, and Gemini, allowing you to share these services with your users or employees without exposing your original API keys.
Setting Up a Provider
Navigate to AI Providers
In the Liona dashboard, click “AI Providers” in the sidebar navigation.
Add a new provider
Click the “New AI Provider” button in the top-right corner of the page.
Choose the AI provider you want to add from the available options:
- OpenAI
- Anthropic
- Grok
- And more
Enter your API key
Enter the API key for the selected provider.
We recommend generating a new API key specifically for use with Liona. This allows you to revoke it independently if needed without affecting other applications.
For some providers, you may need to enter additional information:
- OpenAI: Organization ID (optional)
- Azure OpenAI: Resource name, deployment ID
- Anthropic: API key only
- Grok: API key only
Name your provider
Give your provider connection a descriptive name (e.g., “OpenAI Production”, “Anthropic Testing”).
Save the provider
Click “Save Provider” to add the provider to your project.
Managing Provider Keys
After adding a provider, you can:
- Edit: Update the provider name or API key
- Deactivate/Activate: Temporarily disable a provider without deleting it
- Delete: Permanently remove a provider from your project
Deleting a provider will immediately stop any users from accessing that provider. Make sure you have alternative providers set up if you need uninterrupted service.
Balancing Requests Across Multiple Providers
Liona offers a powerful feature for distributing requests across multiple providers of the same type. This can help you:
- Avoid rate limits from AI providers
- Increase your overall throughput capabilities
- Provide failover if one provider has an outage
- Optimize costs across different provider options
How Request Balancing Works
- Add multiple providers of the same type (e.g., multiple OpenAI providers)
- Set a “weight” for each provider to control request distribution
- Liona automatically routes requests based on the assigned weights
Setting Provider Weights
The weight determines what percentage of requests go to each provider:
Provider's request percentage = (Provider's weight) / (Sum of all weights)
For example, if you have two OpenAI providers with weights of 50 and 70:
- First provider: 50 / (50 + 70) = 41.7% of requests
- Second provider: 70 / (50 + 70) = 58.3% of requests
To adjust provider weights:
- Go to “AI Providers” in the sidebar
- Find the provider card
- Use the weight slider to adjust the distribution
- The percentage is automatically calculated and displayed
Providers must be of the same type (e.g., OpenAI, Anthropic) to be balanced. Request balancing works on a per-provider-type basis.
Next Steps
After adding providers:
- Create policies to control usage limits
- Add users who will access these AI providers