ONE health:providers
← Receivers

health:providers

health family

The paid model providers, read now, for the doctor's health round: per provider (openrouter, openai, elevenlabs) ok | low | out | unread, the number (balance in USD, failures in a row, characters left), the last success, a closed cause and the fix line. OpenAI has no balance a key can read, so it is judged by the AI Gateway mirror (filled hourly, so up to about an hour late; asOf says how fresh) and a free key probe while failing; it never claims out of credit without evidence. A provider that could not be read is unread with the reason, never ok. Read-only: the hourly notifier (channels credits-watch) is the one alert path. Platform owners and staff only (the books gate).

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_workspace
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/health:providers \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {}}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

Takes no arguments.

Response

What comes back from the call.

  • ok boolean
  • verdict ok | unread | low | out The worst provider state: out > low > unread > ok
  • providers object[]
  • checkedAt string
  • error string unauthenticated | forbidden | no_db

Traffic

Every call to health:providers, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names health:providers, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:225
  • one.ie/web/src/lib/resolvers/health.ts:168
→

Answered by

health:providers one.ie/web/src/lib/resolvers/health.ts:191 Dispatched through POST /api/ask/health:providers, after the envelope validates the payload.

health family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "verdict": {
      "description": "The worst provider state: out > low > unread > ok",
      "type": "string",
      "enum": [
        "ok",
        "unread",
        "low",
        "out"
      ]
    },
    "providers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "openrouter",
              "openai",
              "elevenlabs"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "ok",
              "low",
              "out",
              "unread"
            ]
          },
          "measure": {
            "type": "string",
            "enum": [
              "balance_usd",
              "failure_streak",
              "characters_left"
            ]
          },
          "number": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Balance in USD, failures in a row, or characters left; null when unread"
          },
          "lastSuccessAt": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Epoch seconds of the last uncached success seen (openai), or null"
          },
          "cause": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "out_of_credit | balance_low | key_refused | failing_with_working_key | failing; null when ok or unread"
          },
          "fix": {
            "type": "string",
            "description": "The fix line: top up the provider, or replace the refused key"
          },
          "reason": {
            "description": "Why an unread provider could not be read",
            "type": "string"
          },
          "asOf": {
            "type": "number",
            "description": "Epoch seconds the answer is true as of (openai: the mirror's newest row)"
          }
        },
        "required": [
          "provider",
          "state",
          "measure",
          "number",
          "lastSuccessAt",
          "cause",
          "fix",
          "asOf"
        ]
      }
    },
    "checkedAt": {
      "type": "string"
    },
    "error": {
      "description": "unauthenticated | forbidden | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}