Zuplo AI Gateway Getting Started
This guide will walk you through setting up your first AI Gateway project, from initial configuration to making your first LLM request through Zuplo.
Prerequisites
- A Zuplo account (sign up free at zuplo.com)
- API keys for at least one LLM provider (OpenAI, Anthropic, Google Gemini, etc.)
- An application that needs to call LLM APIs
Step 1: Create an AI Gateway Project
- Log into your Zuplo account
- Click Create New Project
- Select the AI Gateway template
- Give your project a name (e.g., "MyCompany AI Gateway")
- Click Create Project
Your AI Gateway project will be created in seconds. You'll notice the interface includes Apps, Teams, and a setup guide to help you get started.
Step 2: Configure Providers
Providers are the LLM services (like OpenAI or Google Gemini) that your applications will use. You'll configure these once as an administrator, and your team members can use them without needing direct access to provider API keys.
Adding Your First Provider
- Click Add Provider
- Select your AI provider (e.g., OpenAI)
- Enter a name for this provider configuration
- Paste your provider's API key
- Select which models you want to make available to your teams
- Click Create
Adding Additional Providers
Repeat the process above to add more providers. This allows your teams to switch between providers (OpenAI, Gemini, etc.) without changing application code.
Example providers you might add:
- OpenAI (for GPT models)
- Google Gemini (for Gemini models)
- Additional providers as they become available
Step 3: Create a Team
Teams allow you to organize users and set hierarchical budget controls. Even if you're starting solo, you'll need at least one team.
Creating Your Root Team
- Click Create Team
- Name your team (e.g., "Root" or your company name)
- Choose an icon for easy identification
- Set organization-wide limits (optional) by clicking on Settings:
- Daily Budget: Maximum spend per day (e.g., $1,000)
- Rate Limits: Request limits if needed
- Click Create
Creating Sub-Teams (Optional)
For larger organizations, create sub-teams with their own budgets:
- From your root team, click Create Sub-Team
- Name the team (e.g., "Engineering Team", "Credit Team")
- Choose an icon
- Set team-specific limits by clicking on Settings:
- Daily budgets that are equal to or less than the parent team's limit
- Example: If root is $1,000/day, a sub-team might be $500/day
- Click Save Changes
Step 4: Create Applications
Applications represent individual projects or services that will use the AI Gateway. Each app gets its own unique URL and API key.
Creating Your First App
- Click Apps followed by Create App
- Configure your app:
- App Name: Descriptive name (e.g., "Tennis Chat", "Customer Support Bot")
- Team: Select which team owns this app
- Provider: Choose your LLM provider (e.g., OpenAI)
- Model: Select the specific model (e.g., GPT-4o) for completions and/or embeddings
- Set application-level budgets:
- Daily Limit: (e.g., $1/day for a hackathon project)
- Monthly Limit: (e.g., $10/month)
- Enable Semantic Caching (optional):
- Caches similar prompts to reduce costs and improve performance
- Best for applications with repeated queries
- Click Create
Access Your App Credentials
After creating your application, you'll see:
- API Key: Your Zuplo-managed key. You'll need them to integrate with your application.
Step 5: Integrate with Your Application
Now you'll update your application to use the Zuplo AI Gateway instead of calling LLM providers directly.
Before: Direct Provider Integration
Code
After: Using Zuplo AI Gateway
Code
What Changed?
- URL: Replace your provider's URL with your Zuplo Gateway URL
- API Key: Use your Zuplo API key instead of the provider's key
- Everything else stays the same: The request format remains compatible with OpenAI's API
Verify Your Setup
Make Your First Request
Send a test request through your gateway:
Code
Check Your Dashboard
- Return to your AI Gateway project
- Click on your app
- Click on Dashboard to view:
- Request count
- Token usage
- Time to first byte
- Current spending
You should see your test request appear with token usage and performance metrics.
Next Steps
Now that your AI Gateway is running, explore additional features:
Switch Providers Without Code Changes
- Go to your app settings
- Change the Provider dropdown (e.g., from OpenAI to Gemini)
- Select a new model
- Click Save CHanges
Your application will now use the new provider without any code changes.
Common Issues
Issue: "Authentication failed" error
- Solution: Verify you're using your Zuplo API key, not your provider's key
Issue: Budget limit reached immediately
- Solution: Check that sub-team limits don't exceed available budget from parent team
Issue: Semantic caching not working
- Solution: Ensure caching is enabled in your application settings and prompts are similar enough to match