SpicyAPI · Schema

BalanceEnvelope

CompanyArtificial IntelligenceGenerative MediaLLMVideo GenerationImage GenerationModel Aggregator

Properties

Name Type Description
code integer
msg string
request_id string Correlation identifier. Include it in support requests.
data object
View JSON Schema on GitHub

JSON Schema

spicyapi-balance-envelope-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spicyapi/json-schema/spicyapi-balance-envelope-schema.json",
  "title": "BalanceEnvelope",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spicyapi-account-api-openapi.yml#/components/schemas/BalanceEnvelope",
  "allOf": [
    {
      "$ref": "#/$defs/EnvelopeBase"
    },
    {
      "type": "object",
      "required": [
        "data"
      ],
      "properties": {
        "code": {
          "type": "integer",
          "const": 200
        },
        "msg": {
          "type": "string",
          "const": "success"
        },
        "data": {
          "$ref": "#/$defs/Balance"
        }
      }
    }
  ],
  "$defs": {
    "Balance": {
      "type": "object",
      "required": [
        "available",
        "held",
        "total"
      ],
      "properties": {
        "funding": {
          "$ref": "#/$defs/FundingOverview"
        },
        "available": {
          "$ref": "#/$defs/USDString"
        },
        "held": {
          "$ref": "#/$defs/USDString"
        },
        "total": {
          "$ref": "#/$defs/USDString"
        }
      }
    },
    "CreditFacilityItem": {
      "type": "object",
      "required": [
        "enabled",
        "limitUsd",
        "availableUsd",
        "usedUsd",
        "heldUsd",
        "status",
        "version"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "limitUsd": {
          "type": "string",
          "description": "Approved ceiling",
          "not wallet funds.": null
        },
        "availableUsd": {
          "type": "string"
        },
        "usedUsd": {
          "type": "string",
          "description": "Outstanding settled principal."
        },
        "heldUsd": {
          "type": "string",
          "description": "Credit reserved for accepted tasks."
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "status": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "EnvelopeBase": {
      "type": "object",
      "required": [
        "code",
        "msg",
        "request_id"
      ],
      "properties": {
        "code": {
          "type": "integer"
        },
        "msg": {
          "type": "string"
        },
        "request_id": {
          "type": "string",
          "description": "Correlation identifier. Include it in support requests."
        }
      }
    },
    "FundingGrantItem": {
      "type": "object",
      "required": [
        "id",
        "name",
        "amountUsd",
        "availableUsd",
        "heldUsd",
        "spentUsd",
        "status",
        "startsAt",
        "modelSlugs",
        "customerMemo",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "amountUsd": {
          "type": "string"
        },
        "availableUsd": {
          "type": "string"
        },
        "heldUsd": {
          "type": "string"
        },
        "spentUsd": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "startsAt": {
          "type": "string",
          "format": "date-time"
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "modelSlugs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Empty means all models."
        },
        "customerMemo": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "FundingOverview": {
      "type": "object",
      "required": [
        "balanceUsd",
        "heldUsd",
        "prepaidAvailableUsd",
        "grantAvailableUsd",
        "cashShortfallUsd",
        "credit",
        "grants",
        "grantsHasMore"
      ],
      "properties": {
        "balanceUsd": {
          "type": "string",
          "description": "Net wallet available balance; may be negative for approved credit consumption or external payment recovery."
        },
        "heldUsd": {
          "type": "string"
        },
        "prepaidAvailableUsd": {
          "type": "string",
          "description": "Unrestricted prepaid or legacy available funds."
        },
        "grantAvailableUsd": {
          "type": "string",
          "description": "Active available grants; model applicability is checked at task admission."
        },
        "cashShortfallUsd": {
          "type": "string",
          "description": "External payment recovery shortfall that cannot be covered by grants or credit."
        },
        "credit": {
          "$ref": "#/$defs/CreditFacilityItem"
        },
        "grants": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FundingGrantItem"
          }
        },
        "grantsHasMore": {
          "type": "boolean"
        }
      }
    },
    "USDString": {
      "type": "string",
      "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
      "description": "Decimal USD amount encoded as a string to avoid binary floating-point loss."
    }
  }
}

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/spicyapi-balance-envelope"
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.