Shardflux · Schema

SpendCap

Opt-in overage with a spend cap. Off by default. While it is on, workspaces open and run past the plan’s CPU-hours and RAM GiB-hours allowances, and the usage past them is charged at the rates below, up to the effective cap per billing period. At the cap, and while a plan invoice is past due, a used-up allowance refuses new starts (402 allowance_exhausted) and running workspaces are paused. Nothing is deleted.

Serverless ComputeAI AgentsGPU RenderingDeveloper ToolsCloud Infrastructure

Properties

Name Type Description
state object unavailable: the plan has no opt-in overage or the organization has no paid subscription. off: available, not turned on. paused: on, but a plan invoice is past due, so overage behaves as off until it
available boolean The plan offers opt-in overage (catalog overage `opt_in`) and the organization pays for the plan with a subscription.
enabled boolean An owner or billing member turned overage on (spend-policy overage_enabled).
paused boolean A plan invoice is past due (payment grace or restriction): overage behaves as off until it is paid.
cap_minor object
effective_cap_minor integer The cap that applies: min(cap_minor, max_cap_minor), or max_cap_minor when no cap is set. 0 when overage is unavailable.
max_cap_minor object
charges_minor integer Overage charged this period so far, whole minor units (floor). It is billed on the next invoice and never exceeds the effective cap. Accrued charges stay when overage is turned off or paused.
remaining_minor integer What is left under the effective cap, whole minor units (floor).
percent_of_cap object
currency string ISO 4217 code, lower case (the plan price currency).
resets_at string When the billing period ends: charges and the cap start again from zero.
lines array One line per dimension, RAM first (the invoice lines of the period). Empty when the plan has no overage rates.
projected_reached_at object When the charges reach the effective cap at the average burn of this period so far. Null when not accruing or when it would fall after resets_at.
View JSON Schema on GitHub

JSON Schema

shardflux-dev-spend-cap-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shardflux-dev/json-schema/shardflux-dev-spend-cap-schema.json",
  "title": "SpendCap",
  "description": "Opt-in overage with a spend cap. Off by default. While it is on, workspaces open and run past the plan’s CPU-hours and RAM GiB-hours allowances, and the usage past them is charged at the rates below, up to the effective cap per billing period. At the cap, and while a plan invoice is past due, a used-up allowance refuses new starts (402 allowance_exhausted) and running workspaces are paused. Nothing is deleted.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shardflux-dev-openapi.json#/components/schemas/SpendCap",
  "type": "object",
  "required": [
    "state",
    "available",
    "enabled",
    "paused",
    "cap_minor",
    "effective_cap_minor",
    "max_cap_minor",
    "charges_minor",
    "remaining_minor",
    "percent_of_cap",
    "currency",
    "resets_at",
    "lines",
    "projected_reached_at"
  ],
  "properties": {
    "state": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "unavailable"
          ]
        },
        {
          "type": "string",
          "enum": [
            "off"
          ]
        },
        {
          "type": "string",
          "enum": [
            "paused"
          ]
        },
        {
          "type": "string",
          "enum": [
            "within_allowance"
          ]
        },
        {
          "type": "string",
          "enum": [
            "accruing"
          ]
        },
        {
          "type": "string",
          "enum": [
            "warning"
          ]
        },
        {
          "type": "string",
          "enum": [
            "reached"
          ]
        }
      ],
      "description": "unavailable: the plan has no opt-in overage or the organization has no paid subscription. off: available, not turned on. paused: on, but a plan invoice is past due, so overage behaves as off until it is paid. within_allowance: on, no usage past the allowances yet. accruing: on, usage past an allowance is being charged. warning: charges are 80 % of the effective cap or more. reached: less than one cent of the cap is left, so starts are refused (402 allowance_exhausted, reason spend_cap_reached) and running workspaces are paused."
    },
    "available": {
      "type": "boolean",
      "description": "The plan offers opt-in overage (catalog overage `opt_in`) and the organization pays for the plan with a subscription."
    },
    "enabled": {
      "type": "boolean",
      "description": "An owner or billing member turned overage on (spend-policy overage_enabled)."
    },
    "paused": {
      "type": "boolean",
      "description": "A plan invoice is past due (payment grace or restriction): overage behaves as off until it is paid."
    },
    "cap_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "The configured spend cap per billing period, minor units of `currency`. Null: never set."
        },
        {
          "type": "null"
        }
      ]
    },
    "effective_cap_minor": {
      "type": "integer",
      "description": "The cap that applies: min(cap_minor, max_cap_minor), or max_cap_minor when no cap is set. 0 when overage is unavailable."
    },
    "max_cap_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "The current plan price: the largest cap that can be set, so a downgrade lowers the effective cap. Null without a subscription price."
        },
        {
          "type": "null"
        }
      ]
    },
    "charges_minor": {
      "type": "integer",
      "description": "Overage charged this period so far, whole minor units (floor). It is billed on the next invoice and never exceeds the effective cap. Accrued charges stay when overage is turned off or paused."
    },
    "remaining_minor": {
      "type": "integer",
      "description": "What is left under the effective cap, whole minor units (floor)."
    },
    "percent_of_cap": {
      "anyOf": [
        {
          "type": "number",
          "description": "Charges as a percentage of the effective cap (2 decimals). Null when overage is unavailable."
        },
        {
          "type": "null"
        }
      ]
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 code, lower case (the plan price currency)."
    },
    "resets_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the billing period ends: charges and the cap start again from zero."
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "allowance",
          "unit",
          "units_over",
          "billed_units",
          "rate_minor",
          "amount_minor"
        ],
        "properties": {
          "allowance": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ram_gib_hours"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "cpu_hours"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "gpu_hours"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "retained_state_gib"
                ]
              }
            ],
            "description": "The allowances overage covers (gpu_hours on plans with a GPU-hour rate; retained_state_gib, retained storage above the included GiB, on plans with a storage rate). Transfer never accrues overage."
          },
          "unit": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "gib_hours"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "hours"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "gib_months"
                ]
              }
            ],
            "description": "gib_hours for ram_gib_hours, hours for cpu_hours (CPU-hours) and gpu_hours (GPU-hours), gib_months for retained_state_gib (a GiB-month is 730 GiB-hours)."
          },
          "units_over": {
            "type": "number",
            "description": "Usage past the allowance this period, in unit-hours (charged or not: usage before overage was turned on, while paused or past the cap is never charged)."
          },
          "billed_units": {
            "type": "number",
            "description": "The part of it charged this period, in unit-hours."
          },
          "rate_minor": {
            "type": "number",
            "description": "Minor units per unit-hour past the allowance (4 = $0.04 per RAM GiB-hour; 12 = $0.12 per CPU-hour)."
          },
          "amount_minor": {
            "type": "integer",
            "description": "billed_units × rate_minor, whole minor units (floor). Lines are floored one by one, so they may add up to one minor unit less than charges_minor."
          }
        },
        "additionalProperties": false
      },
      "description": "One line per dimension, RAM first (the invoice lines of the period). Empty when the plan has no overage rates."
    },
    "projected_reached_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "description": "When the charges reach the effective cap at the average burn of this period so far. Null when not accruing or when it would fall after resets_at."
    }
  },
  "additionalProperties": false
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/shardflux-dev-spend-cap"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.