Portkey tracks pricing for all providers and models for which it has pricing support, providing real-time cost visibility and budget management capabilities. The platform automatically handles pricing updates and supports custom pricing configurations for enterprise customers.

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.
Q: Custom pricing not reflecting in dashboard
  • A: Upgrade to Model Catalog for UI-based pricing management. Contact enterprise support for custom pricing configuration.
Q: Budget limits not working for specific models
  • A: Verify that Portkey has pricing support for those models. Unsupported models show $0.00 in cost tracking.
Q: Air-gapped deployment has stale pricing
  • 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
Contact: [email protected]

Best Practices

Cost Optimization

  1. Use Budget Limits: Set appropriate spending limits to prevent overages
  2. Monitor Usage: Regularly review cost analytics to identify optimization opportunities
  3. Model Selection: Use cost-effective models for appropriate use cases
  4. Caching: Leverage Portkey’s caching features to reduce redundant API calls

Pricing Management

  1. Stay Updated: Keep gateway versions current for automatic pricing updates
  2. Regular Reviews: Monitor pricing changes across providers
  3. Custom Pricing: Configure preferential rates when available
  4. Budget Planning: Set realistic budgets based on usage patterns

Support and Resources

Community Resources


This documentation covers Portkey’s pricing management capabilities. For the most current information about specific model pricing or enterprise features, please contact support.