Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.axiomancer.io/llms.txt

Use this file to discover all available pages before exploring further.

Every virtual key can carry a monthly USD budget. RouteShift enforces it server-side: a soft threshold fires a notification, the hard cap blocks new requests until the next monthly reset, and a projected-overrun model alerts you before either trips.

Budget mechanics

Budgets are stored in microcents (1/10,000th of a cent) so even fractional-cent calls aggregate cleanly. Each request decrements the running monthly total atomically; on the first day of each calendar month (UTC) the running total resets to zero. For a key with a $50 monthly budget and an 80% soft-alert threshold:
StateBehavior
0–80% usedNormal traffic. No alerts.
80–100% usedSoft alert fires once per threshold crossing (email, Slack, or webhook). Traffic continues.
100% usedHard cap. New requests return 429 with X-RouteShift-Reason: budget_exceeded. In-flight requests finish.
ResetAt 00:00 UTC on day 1, the running total drops to zero and the key resumes serving.

Projected-overrun alerts

In addition to the hard/soft thresholds, RouteShift fits a linear trend to the trailing 7 days of spend and projects month-end usage. If the projection exceeds the budget — even though current usage is still under the soft threshold — a projected overrun alert fires once per key per month. This catches sudden ramps before they hit the cap. The projection is shown on the Billing → Budgets page as a dotted forecast line over the actual spend curve.

Multi-tier alerts

Configure where alerts go at Settings → Notifications:
  • Email — to the workspace owner and any address on a mailing list.
  • Slack — via incoming webhook; the alert message includes the key name, percent used, and a deep link to the billing page.
  • Webhook — POST application/json payload with { key_id, threshold, used_microcents, budget_microcents, period }. Useful for routing into an oncall system.

Workspace-wide rollups

Beyond per-key budgets, the Billing → Spend view shows total workspace spend with the same projected-overrun model applied at the org level. Use it to set a rough business cap separate from per-key safety nets.
Budgets are a safety net, not a forecasting tool. For accurate forecasts, pair budgets with the Optimize page to remove waste before it shows up in the trend line.