API Reference

Usage & Credits

Monitor your token usage, credit balance, and spending by model and time period.

Check your balance GET

GET /v1/usage
curl https://api.computeshare.servequake.com/v1/usage \
  -H "Authorization: Bearer ngk_your_key"
{
  "customer": "you@example.com",
  "tier": "free",
  "credit_balance_usd": 4.872,
  "rate_limits": {
    "requests_this_minute": 3,
    "requests_today": 47,
    "limit_per_minute": 60,
    "limit_per_day": 5000,
    "remaining_this_minute": 57,
    "remaining_today": 4953
  },
  "usage_30d": {
    "total_requests": 47,
    "total_input_tokens": 1840,
    "total_output_tokens": 6230,
    "total_cost_microdollars": 128000,
    "avg_latency_ms": 1240
  }
}

Token usage over time GET

GET /v1/usage/tokens?days=30&interval=day
ParameterValuesDefault
days1–36530
intervalhour | day | week | monthday
curl "https://api.computeshare.servequake.com/v1/usage/tokens?days=7&interval=day" \
  -H "Authorization: Bearer ngk_your_key"
{
  "period_days": 7,
  "interval": "day",
  "totals": {
    "input_tokens": 1840,
    "output_tokens": 6230,
    "total_tokens": 8070,
    "cost_usd": 0.000128,
    "requests": 47
  },
  "timeseries": [
    {
      "period": "2026-04-13T00:00:00+00:00",
      "input_tokens": 340,
      "output_tokens": 1120,
      "total_tokens": 1460,
      "cost_usd": 0.0000248,
      "requests": 9,
      "local_requests": 7,
      "hoster_requests": 1,
      "cloud_requests": 1,
      "avg_latency_ms": 1842
    }
  ]
}

Cost breakdown by model GET

GET /v1/usage/breakdown?days=30
curl "https://api.computeshare.servequake.com/v1/usage/breakdown?days=30" \
  -H "Authorization: Bearer ngk_your_key"
{
  "by_model": [
    {
      "model_id": "gemma-4-31B-it-Q8_0.gguf",
      "provider": "hoster",
      "requests": 32,
      "input_tokens": 1200,
      "output_tokens": 4800,
      "total_cost_usd": 0.00072,
      "platform_fee_usd": 0.000144,
      "hoster_earned_usd": 0.000576,
      "avg_latency_ms": 1540
    }
  ],
  "daily": [...]
}

Export usage as CSV GET

GET /v1/usage/export?days=30
curl "https://api.computeshare.servequake.com/v1/usage/export?days=30" \
  -H "Authorization: Bearer ngk_your_key" \
  -o usage.csv

Returns a CSV with columns: timestamp, model, provider, input_tokens, output_tokens, total_tokens, cost_usd, latency_ms, success

Credits

Credits are denominated in USD and deducted per request. Token costs depend on which model and hoster serves your request. Use /v1/usage to check your balance before making expensive requests.

💡 New accounts start with $5.00 in free credits — enough for thousands of requests on small models.