{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knossot-org/json-schema/knossot-org-usage-schema.json",
  "title": "Usage",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knossot-org-openapi.json#/components/schemas/Usage",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "key",
    "credits"
  ],
  "properties": {
    "key": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "prefix",
        "agent_name",
        "spend_cap_usd",
        "created_at"
      ],
      "properties": {
        "prefix": {
          "type": "string"
        },
        "agent_name": {
          "type": "string"
        },
        "spend_cap_usd": {
          "type": "number"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "credits": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "free_run_available",
        "week_start",
        "balance_usd",
        "key_spent_usd",
        "run_price_usd"
      ],
      "properties": {
        "free_run_available": {
          "type": "boolean"
        },
        "week_start": {
          "type": "string",
          "format": "date"
        },
        "balance_usd": {
          "type": "number"
        },
        "key_spent_usd": {
          "type": "number"
        },
        "run_price_usd": {
          "type": "number"
        }
      }
    }
  }
}