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
  • How to branch n8n workflows on workspace status and budget flags.
  • What a blocked ingest response means for downstream automation.
  • Which templates cover status checks, ingest, and Slack-style alerts.
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.

n8n integration

Use workspace status booleans directly in n8n If nodes. No string casting is required.

Fieldn8n use
isPlanLimitReachedPause or reroute telemetry pipelines.
telemetryPausedShow clear operator message in Slack/Discord/email.
isBudgetWarningSend early warning notification.
isBudgetExceededTrigger escalation flow.
severitySingle branch key (normal/warning/critical).

Status check workflow (example)

  1. HTTP Request node calls GET /v1/diagnostics/workspace-status with X-API-Key.
  2. If node checks $json.telemetryPaused and $json.isBudgetExceeded.
  3. Slack/Discord/email nodes notify the correct channel.
{
  "method": "GET",
  "url": "https://api.opsmeter.io/v1/diagnostics/workspace-status",
  "headers": {
    "X-API-Key": "YOUR_WORKSPACE_API_KEY"
  }
}

Ingest branch for 402

Provider calls should continue. Branch only telemetry behavior when ingest returns 402.

if ($json.statusCode === 402 && $json.body.reason === "plan_limit_reached") {
  // pause telemetry retries; notify owner/admin
}

Ready-to-import templates: n8n workflow templates.