Cost Tracking provides real-time visibility into your AI model expenses, helping you optimize spending and maximize ROI across all providers.

Overview

Requestyโ€™s Cost Tracking system gives you granular control over your AI spending with real-time cost monitoring and optimization recommendations.

Why Cost Tracking is Essential

Without proper cost tracking, AI expenses can quickly spiral out of control. Many teams see 10-100x unexpected costs in their first month without monitoring.

The Hidden Costs of AI

  • Model Pricing Variability: GPT-4 costs 30x more than GPT-3.5 for the same request
  • Token Inefficiency: Unoptimized prompts can use 3-5x more tokens than necessary
  • Retry Costs: Failed requests that retry can double or triple costs
  • Development vs Production: Testing can consume significant budget without tracking

Benefits of Cost Tracking

  • Prevent Bill Shock: Know your spending before the invoice arrives
  • Optimize ROI: Identify which use cases provide the best value
  • Budget Planning: Accurately forecast AI spending for financial planning
  • Cost Attribution: Allocate costs to teams, projects, or customers
  • Waste Reduction: Identify and eliminate unnecessary AI calls

Cost Visualization

Real-Time Costs

Monitor your spending as it happens with live cost updates

Cost Breakdown

Visualize costs by model, provider, user, and time period

Savings Tracking

Track savings from caching, routing optimization, and BYOK usage

Budget Management

Set and monitor budgets with automated alerts

Cost Analytics Dashboard

Overview Metrics

  • Total Spend: Current billing period costs
  • Daily Average: Average daily spending rate
  • Cost Trend: Week-over-week and month-over-month changes
  • Projected Monthly: Estimated end-of-month costs

Provider Comparison

Compare costs across different providers:
  • Cost per 1K tokens by provider
  • Model efficiency rankings
  • Provider pricing trends
  • Best value recommendations

Cost Breakdown Views

By Model

  • Individual model costs
  • Cost per request by model
  • Token efficiency metrics
  • Usage vs cost correlation

By User/Team

  • Department-level cost allocation
  • Per-user spending limits
  • Team budget utilization
  • Cost center reporting

By Time Period

  • Hourly spending patterns
  • Daily cost trends
  • Monthly comparisons
  • Custom period analysis

Savings Optimization

Caching Savings

Track how much you save through intelligent caching:
  • Cache Hit Rate: Percentage of cached responses
  • Tokens Saved: Total cached tokens
  • Cost Avoided: Dollar savings from caching
  • Optimization Score: Overall caching efficiency

Smart Routing Savings

Monitor savings from optimal model routing:
  • Automatic model selection savings
  • Fallback cost prevention
  • Load balancing efficiency
  • Peak time optimization

BYOK (Bring Your Own Keys) Analysis

Compare costs between Requesty-managed and your own API keys:
  • Side-by-side cost comparison
  • Break-even analysis
  • Key utilization metrics
  • Optimization recommendations

Budget Management

Setting Budgets

Configure budgets at multiple levels:
# Set budget via API
import requests

response = requests.post(
    "https://router.requesty.ai/v1/budgets",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "type": "monthly",
        "amount": 5000,
        "alert_thresholds": [50, 80, 90, 100],
        "action_on_exceed": "alert"  # or "block"
    }
)

Budget Types

  • Organization Budget: Overall spending limit
  • Project Budget: Per-project allocation
  • User Budget: Individual user limits
  • API Key Budget: Per-key spending caps

Budget Monitoring

Track your spending against budgets:
  • View real-time budget utilization
  • Monitor daily spending rates
  • Project end-of-month costs
  • Compare actual vs budgeted spending

Cost Optimization Recommendations

Intelligent Model Selection

  • Use GPT-3.5 for simple tasks instead of GPT-4
  • Leverage Claude Haiku for high-volume, simple requests
  • Reserve premium models for complex tasks only

Example Savings

Switching appropriate tasks from GPT-4 to GPT-3.5 can reduce costs by up to 95%

Cost Reports

Automated Reporting

Schedule regular cost reports:
  • Daily Summary: Previous dayโ€™s spending
  • Weekly Report: Week-over-week comparison
  • Monthly Invoice: Detailed billing breakdown
  • Custom Reports: Tailored to your needs

Report Contents

Each report includes:
  • Total costs and breakdown
  • Top spending models/users
  • Cost trends and projections
  • Optimization opportunities
  • Savings achieved

Cost Allocation

Chargeback Support

Allocate costs to different departments or projects:
  • Tag requests with cost centers
  • Generate department invoices
  • Track project-specific spending
  • Export for accounting systems

Tagging Strategy

# Tag requests for cost allocation
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello"}],
    extra_headers={
        "X-Cost-Center": "engineering",
        "X-Project": "chatbot-v2",
        "X-Team": "ml-team"
    }
)

Cost Data Access

Viewing Cost Data

Access your cost analytics through:
  • Dashboard: Real-time cost visualization in the platform
  • Reports: Download detailed cost breakdowns
  • Exports: CSV/JSON exports for custom analysis

Cost Metrics Available

  • Total costs by time period
  • Cost per model and provider
  • Savings from caching and optimization
  • Department or project-level costs
  • Trending and projections

Best Practices

Integration

Cost Tracking integrates with: