{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "adjudication_run_id": {
      "pattern": "^adj_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "attempt": {
      "default": 0,
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "billing_workspace_id": {
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "binding_id": {
      "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "environment_id": {
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "estimated_units": {
      "minimum": 0,
      "type": "number"
    },
    "fix_run_id": {
      "pattern": "^fix_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "product_id": {
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "subject_id": {
      "pattern": "^(mres|ws|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "unit": {
      "enum": [
        "tokens",
        "ms",
        "calls",
        "bytes"
      ],
      "type": "string"
    },
    "usage_category": {
      "enum": [
        "ai_tokens",
        "runtime",
        "provider_call",
        "storage"
      ],
      "type": "string"
    }
  },
  "required": [
    "subject_id",
    "usage_category",
    "billing_workspace_id",
    "estimated_units",
    "unit"
  ],
  "type": "object"
}
