Waymaker API
WaymakerAPI
Developer Documentation
Documentation

API Usage Tracking

Last Updated: October 15, 2025 Category: API Keys

Overview

The Waymaker One API provides comprehensive usage tracking and analytics to help you monitor consumption, manage costs, and optimize API integration. All usage data is updated in real-time and available through the WaymakerOne dashboard.

Accessing Usage Analytics

Dashboard Location

From the WaymakerOne dashboard:

  1. Click "API Keys" in the left navigation
  2. Select the "Usage & Analytics" tab
  3. View comprehensive usage metrics

Quick access: waymakerone.com/api/usage


Usage Metrics

Summary View

Key metrics displayed:

API Usage Summary:
├── Today: 145 credits ($1.45)
├── Yesterday: 178 credits ($1.78)
├── Last 7 days: 892 credits ($8.92)
├── Last 30 days: 3,421 credits ($34.21)
└── All time: 12,847 credits ($128.47)

Includes:

  • Credit consumption by time period
  • Dollar cost equivalents ($0.01 per credit)
  • Total API calls made
  • Average credits per call

By Endpoint Breakdown

See which agents you're using most:

EndpointCallsCredits UsedAvg/Call% of Total
/v1/coordinate1421,84713.054%
/v1/framework891,02311.530%
/v1/research1228723.98%
/v1/data342788.28%

Use this to:

  • Identify most expensive endpoints
  • Optimize high-cost operations
  • Understand consumption patterns
  • Budget for expected usage

Daily Trends

30-day consumption chart showing:

  • Credits consumed per day
  • Spikes in usage (weekdays vs weekends)
  • Growth trends over time
  • Projected monthly spend

Example visualization:

Credits per day (last 30 days):
150 │                     ╭─╮
125 │         ╭─╮       ╭─╯ ╰─╮
100 │     ╭─╮ │ ╰─╮   ╭─╯     ╰─╮
 75 │   ╭─╯ ╰─╯   ╰─╮ │         ╰─╮
 50 │ ╭─╯           ╰─╯           ╰─
 25 │─╯
  0 └────────────────────────────────
    Oct 1        Oct 15        Oct 30

💡 Tip: Look for unexpected spikes that might indicate bugs or inefficient API calls.


Usage by API Key

Multi-Key Tracking

If you have multiple API keys (development, staging, production), usage is tracked separately for each key.

View key-specific usage:

Production Key (wm_****ab):
├── Last 30 days: 2,847 credits
├── Most used: /v1/coordinate (1,947 credits)
└── Avg cost per day: $0.95

Development Key (wm_****cd):
├── Last 30 days: 574 credits
├── Most used: /v1/framework (423 credits)
└── Avg cost per day: $0.19

Benefits:

  • Isolate production costs from testing
  • Track team member usage individually
  • Identify which environments consume most credits

Cost Forecasting

Monthly Projection

Based on current usage patterns, the system projects your monthly spend:

Current Usage Pattern:
├── Daily average: 114 credits ($1.14)
├── 30-day projection: 3,420 credits ($34.20)
├── Budget comparison: $34.20 / $50.00 (68%)
└── Recommendation: On track

Forecast calculation:

(Last 7 days average) × 30 days = Projected monthly spend

Use forecasting to:

  • Set appropriate auto top-up thresholds
  • Configure monthly spending limits
  • Budget for API costs
  • Identify growing usage trends

Budget Status

Visual budget tracking:

Monthly Budget: $50
Current Spend: $34.20
Remaining: $15.80 (31%)

Progress: [████████████████░░░░░] 68%

Alerts:

  • 50% reached: "You've used half your monthly budget"
  • 80% reached: "Approaching monthly budget limit"
  • 100% reached: "Monthly budget limit reached"

Usage Alerts

Configurable Notifications

Set up email alerts for:

  1. Daily usage threshold

    • Example: Alert when daily usage exceeds 200 credits
  2. Monthly spend limit

    • Example: Alert at 50%, 80%, 100% of monthly budget
  3. Unusual spikes

    • Example: Alert when usage is 3x normal daily average
  4. Low credit balance

    • Example: Alert when balance drops below 100 credits

Configure alerts:

Dashboard → API Keys → Usage Alerts → Configure

Detailed Usage Logs

Request-Level Data

Each API call is logged with:

  • Timestamp: When the call was made
  • Endpoint: Which agent was called
  • Credits consumed: Exact credit cost
  • Response time: Milliseconds to process
  • Status code: Success or error code
  • API key used: Which key made the call (last 4 chars)

Example log entry:

{
  "timestamp": "2025-10-15T14:32:18Z",
  "endpoint": "/v1/coordinate",
  "credits": 14,
  "responseTime": 2847,
  "status": 200,
  "apiKey": "wm_****ab"
}

Export Usage Data

Download usage logs:

  1. Navigate to Usage & Analytics tab
  2. Click "Export Usage Data"
  3. Select date range
  4. Choose format (CSV or JSON)
  5. Download file

CSV format includes:

Timestamp,Endpoint,Credits,Cost,Status,API Key
2025-10-15 14:32:18,/v1/coordinate,14,$0.14,200,wm_****ab
2025-10-15 14:28:04,/v1/framework,11,$0.11,200,wm_****ab

Use exports for:

  • Accounting and billing reconciliation
  • Internal cost allocation
  • Usage analysis in spreadsheets
  • Integration with billing systems

Optimization Strategies

1. Identify High-Cost Operations

Review by-endpoint breakdown to find expensive calls:

Endpoint Analysis:
/v1/research: 287 credits for 12 calls = 23.9 avg
→ High cost per call, consider alternatives

Optimization:

  • Use direct framework agent instead of coordination for known agent types
  • Cache common responses when appropriate
  • Batch related questions in conversation threads

2. Monitor Conversation Context

Long conversation threads consume more credits due to context size.

Example:

Short conversation (2 turns): 12 credits
Long conversation (10 turns): 18 credits

Optimization:

  • Start new sessions for unrelated topics
  • Use sessionId strategically
  • Monitor average credits per call

3. Development vs Production

Separate keys for different environments:

Development: wm_dev_****
├── Usage: 574 credits/month
└── Cost: $5.74

Production: wm_prod_****
├── Usage: 2,847 credits/month
└── Cost: $28.47

Benefits:

  • Prevent test traffic from inflating production costs
  • Track actual vs development usage
  • Set lower limits on dev keys

4. Rate Limiting Your Application

Implement client-side rate limiting to prevent runaway costs:

// Example: Simple rate limiter
const rateLimiter = new Map();

function checkRateLimit(userId) {
  const now = Date.now();
  const userRequests = rateLimiter.get(userId) || [];

  // Filter requests from last minute
  const recentRequests = userRequests.filter(
    timestamp => now - timestamp < 60000
  );

  if (recentRequests.length >= 10) {
    throw new Error('Rate limit exceeded');
  }

  recentRequests.push(now);
  rateLimiter.set(userId, recentRequests);
}

API Response Headers

Usage Information in Headers

Every API response includes usage headers:

HTTP/1.1 200 OK
X-Credits-Consumed: 14
X-Credits-Remaining: 1234
X-Rate-Limit-Remaining: 58
X-Rate-Limit-Reset: 1697385600

Use these headers to:

  • Track credits consumed per call in your application
  • Monitor remaining balance programmatically
  • Display usage info to end users
  • Trigger warnings when balance is low

JavaScript example:

const response = await fetch('https://api.waymakerone.com/v1/coordinate', {
  method: 'POST',
  headers: { 'apikey': process.env.WAYMAKER_API_KEY },
  body: JSON.stringify({ messages })
});

const creditsConsumed = response.headers.get('X-Credits-Consumed');
const creditsRemaining = response.headers.get('X-Credits-Remaining');

console.log(`This call: ${creditsConsumed} credits`);
console.log(`Balance: ${creditsRemaining} credits`);

Troubleshooting

Usage Not Updating

If usage metrics aren't updating in real-time:

Possible causes:

  • Dashboard cache (try hard refresh: ⌘⇧R or Ctrl+Shift+R)
  • Network issues (check browser console)
  • Recent API calls not yet processed (wait 1-2 minutes)

Solutions:

  1. Hard refresh the page
  2. Clear browser cache
  3. Wait 2-3 minutes for processing
  4. Contact support if still missing after 10 minutes

Unexpected High Usage

If you see higher usage than expected:

Check:

  1. By-endpoint breakdown - Which agents are consuming most credits?
  2. Daily trends - Was there a spike on a specific day?
  3. API key usage - Is a dev key being used in production?
  4. Recent changes - Did you deploy new code that makes more API calls?

Common causes:

  • Test loops or retries in development
  • Long conversation contexts consuming extra credits
  • Using research/data agents instead of simpler framework queries
  • Multiple redundant API calls for same information

Prevention:

  • Implement rate limiting in your application
  • Set up usage alerts for unexpected spikes
  • Use appropriate agent types for each task
  • Cache common responses

Missing Usage Data

If API calls aren't appearing in usage logs:

Verify:

  • API key is valid and not revoked
  • Calls are completing successfully (check status codes)
  • Using correct organization context
  • Sufficient credits in account

Note: Failed API calls (401, 402, 500) may not be logged in usage analytics.


Best Practices

1. Monitor Daily

Set a routine:

  • Check usage summary each morning
  • Review by-endpoint breakdown weekly
  • Export monthly reports for accounting

2. Set Appropriate Alerts

Configure notifications:

Daily limit: 200 credits ($2)
Monthly budget: 80% of expected ($40 of $50)
Low balance: 100 credits ($1)

3. Track by Environment

Use separate keys:

  • Development: Lower limits, separate tracking
  • Staging: Medium limits, pre-production testing
  • Production: Full limits, primary usage tracking

4. Regular Optimization

Monthly review:

  • Which endpoints are most expensive?
  • Any unused API calls that can be removed?
  • Opportunities to cache or batch requests?
  • Is usage growing as expected?

Next Steps

Related Articles


Questions about usage tracking? → Contact support@waymakerone.com