{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recruitmcp-com/json-schema/recruitmcp-com-usage-schema.json",
  "title": "Usage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recruitmcp-com-billing-api-openapi.yml#/components/schemas/Usage",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "usage"
      ]
    },
    "customer_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer this usage was scoped to. Null for the account."
    },
    "balance_credits": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Account balance, or the bound customer's remaining daily cap. Null when that customer has no cap."
    },
    "daily_cap_credits": {
      "type": [
        "integer",
        "null"
      ]
    },
    "group_by": {
      "type": "string",
      "enum": [
        "day",
        "purpose",
        "api_key",
        "customer"
      ]
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "credits": {
            "type": "integer"
          },
          "upstream_calls": {
            "type": "integer"
          }
        }
      }
    },
    "credits": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "object",
    "customer_id",
    "balance_credits",
    "buckets"
  ]
}