How Pricing Data Works
Pricing JSON System
Portkey uses a centralized pricing JSON system to maintain accurate cost information:- Automatic Updates: If you’re on the latest versions, this JSON updates automatically with the latest numbers
- Caching Strategy: Pricing data is cached for 24 hours, after which the latest values are pulled from the central control plane
- Version Requirements: This automatic pricing update feature is available in gateway version 1.12 series and later
Cost Calculation
For token-based budgets, Portkey tracks both input and output tokens across all supported models. Cost calculations include:- Input token costs based on provider pricing
- Output token costs with different rates where applicable
- Real-time cost tracking per request
- Aggregated cost reporting across time periods
Deployment-Specific Pricing Management
Portkey supports three deployment modes, each with different pricing update mechanisms:1. SaaS Deployment (Portkey Cloud)
- Update Frequency: Instant pricing updates
- Management: Fully managed by Portkey
- Maintenance: No action required from customers
2. Hybrid Deployment
- Update Frequency: Automatic updates every 24 hours
- Gateway Version: Requires version 1.12+ for automatic updates
- Maintenance: Minimal - pricing JSON updates automatically from central control plane
- Manual Updates: Only required when new pricing features are introduced
3. Air-Gapped Deployment
- Update Frequency: Manual deployment required
- Management: Customer-managed pricing updates
- Process: Requires new deployments to update pricing information
- Considerations: May have delayed pricing updates compared to other deployment modes
Model Catalog and Custom Pricing
Upgrading to Model Catalog
The Model Catalog is the evolution of Virtual Keys, providing a centralized and powerful way to manage, discover, and use AI models within your workspace. Key benefits include:- Centralized Management: Create a single (or multiple) provider integration at the organization level, and securely provision it to multiple workspaces
- Custom Pricing Support: Update pricing for models directly from the UI
- Model Overrides: Create custom models with specific pricing configurations
Custom Model Pricing
For customers with preferential pricing from providers, Portkey offers:- UI-Based Updates: Modify pricing for existing models through the dashboard
- Custom Models: Create new model entries with specific pricing
- Model Overrides: Override default pricing for specific use cases
Cost Tracking and Analytics
Real-Time Monitoring
The AI gateway records real-time API requests, including cost and guardrail violations, providing:- Per-request cost visibility
- Token usage tracking
- Provider-specific cost breakdown
- Time-based cost analysis
Analytics Dashboard
You can track your spending and token usage for any specific providers and model by navigating to the Analytics tab and filtering by the desired key and timeframe. Available Metrics:- Total spend across providers
- Cost per model/provider/token
- Usage patterns and trends
- Budget utilization tracking
Pricing Support Coverage
Supported Models
Budget limits currently apply to all providers and models for which Portkey has pricing support. This includes:- All major LLM providers (OpenAI, Claude, etc.)
- Vision and multimodal models
- Audio processing models
- Image generation models
Unsupported Models
If a specific request log shows 0 cents in the COST column, it means that Portkey does not currently track pricing for that model, and it will not count towards the virtual key’s budget limit. For models without pricing support:- Cost tracking shows $0.00
- Budget limits don’t apply
- Manual cost tracking may be required
Troubleshooting Pricing Issues
Common Issues and Solutions
Q: Pricing data seems outdated- A: Ensure you’re running gateway version 1.12+. Pricing updates automatically every 24 hours.
- A: Upgrade to Model Catalog for UI-based pricing management. Contact enterprise support for custom pricing configuration.
- A: Verify that Portkey has pricing support for those models. Unsupported models show $0.00 in cost tracking.
- A: Request updated deployment packages that include latest pricing data.
Enterprise Support
For enterprise customers requiring:- Custom pricing configurations
- Advanced budget management
- Pricing data exports
- Integration assistance
Best Practices
Cost Optimization
- Use Budget Limits: Set appropriate spending limits to prevent overages
- Monitor Usage: Regularly review cost analytics to identify optimization opportunities
- Model Selection: Use cost-effective models for appropriate use cases
- Caching: Leverage Portkey’s caching features to reduce redundant API calls
Pricing Management
- Stay Updated: Keep gateway versions current for automatic pricing updates
- Regular Reviews: Monitor pricing changes across providers
- Custom Pricing: Configure preferential rates when available
- Budget Planning: Set realistic budgets based on usage patterns
Support and Resources
Community Resources
- Discord community for general questions
- GitHub repository for technical issues
This documentation covers Portkey’s pricing management capabilities. For the most current information about specific model pricing or enterprise features, please contact support.