Opsmeter.io logo
Opsmeter.io
AI Cost & Inference Control
Integration docs

Implementation guide for AI cost control

Ship telemetry fast, keep attribution stable, and move from ingest to governance without changing your app network path.

Recommended path

Start with direct ingest, validate one stable payload shape, then harden budgets, retries, and incident workflows.

What this page answers
  • What happens when a plan limit pauses telemetry ingest.
  • How budget warning and budget exceeded states are calculated.
  • Why provider calls continue even when Opsmeter.io telemetry pauses.
QuickstartShip a first payload and validate required fields in minutes.Open guide
No-proxy telemetryKeep your app path unchanged while preserving request-level attribution.Review flow
OperationsSet budget posture, retry rules, and escalation checks for production.Harden runtime
Updated for 2026API v1 Read cost playbook npmPyPIGitHub

Implementation rhythm

5 minfirst ingest path
No proxyapp path unchanged
One schemaacross providers

Use quickstart for initial payloads, then operations docs to harden production workflows.

Limits and budgets

Plan limit and budget are different controls. Plan limit pauses telemetry ingest when request capacity is exhausted. Budget tracks spend thresholds (daily and monthly) for warning/exceeded workflows.

ControlWhat it monitorsWhen it triggersEffect
Plan limitTelemetry request countRemaining request count reaches 0Telemetry paused (402, reason plan_limit_reached)
Budget warningSpend utilization ratioDaily or monthly spend reaches warning thresholdWarning only, telemetry still active
Budget exceededSpend versus configured limitDaily or monthly spend goes above limitExceeded signal, hard-stop depends on workspace policy

Workspace status endpoint

Use GET /v1/settings/workspace-status (Bearer) or GET /v1/diagnostics/workspace-status (X-API-Key) to read current state with top-level booleans and nested daily/monthly budget windows.

{
  "workspaceId": "f0f2d17d-7bf7-4efa-a11e-4f13e8a0216b",
  "isPlanLimitReached": false,
  "telemetryPaused": false,
  "providerCallsContinue": true,
  "isBudgetWarning": true,
  "isBudgetExceeded": false,
  "severity": "warning",
  "plan": {
    "planTier": "starter",
    "planName": "Starter",
    "currentRequestCount": 98231,
    "planRequestLimit": 100000,
    "remainingRequestCount": 1769,
    "isPlanLimitReached": false,
    "telemetryPaused": false,
    "periodStart": "2026-03-01T00:00:00Z",
    "periodEnd": "2026-03-31T23:59:59Z"
  },
  "budget": {
    "warningThresholdRatio": 0.8,
    "daily": {
      "limitUsd": 50,
      "currentSpendUsd": 41.25,
      "utilizationRatio": 0.825,
      "isWarning": true,
      "isExceeded": false,
      "period": "daily",
      "periodStart": "2026-03-07T00:00:00Z",
      "periodEnd": "2026-03-07T23:59:59Z"
    },
    "monthly": {
      "limitUsd": 500,
      "currentSpendUsd": 412.55,
      "utilizationRatio": 0.8251,
      "isWarning": true,
      "isExceeded": false,
      "period": "monthly",
      "periodStart": "2026-03-01T00:00:00Z",
      "periodEnd": "2026-03-31T23:59:59Z"
    }
  }
}

Plan-limit blocked ingest response

When telemetry ingest is blocked by plan capacity, ingest returns 402 with explicit fields.

{
  "ok": false,
  "accepted": false,
  "reason": "plan_limit_reached",
  "telemetryPaused": true,
  "providerCallsContinue": true,
  "isPlanLimitReached": true,
  "budgetWarning": false,
  "budgetExceeded": false,
  "planLimitRequests": 100000,
  "freeLimitRemainingRequests": 0
}

Telemetry pause affects Opsmeter.io ingest only. Your provider calls continue normally.