{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tachlestools-com/json-schema/tachlestools-com-usage-schema.json",
  "title": "Usage",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tachlestools-com-openapi.json#/components/schemas/Usage",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "plan",
    "expires",
    "month",
    "used",
    "limit",
    "remaining"
  ],
  "properties": {
    "plan": {
      "$ref": "#/$defs/Plan"
    },
    "expires": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "The last day the key works. `null` for a free key, which has no end date."
    },
    "month": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}$",
      "description": "The calendar month being counted (UTC)."
    },
    "used": {
      "type": [
        "integer",
        "null"
      ]
    },
    "limit": {
      "type": "integer"
    },
    "remaining": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "$defs": {
    "Plan": {
      "type": "string",
      "enum": [
        "free",
        "trial",
        "starter",
        "pro",
        "business"
      ],
      "description": "free: 100 calls a month; trial: 1,000 calls a month; starter: 10,000 calls a month; pro: 100,000 calls a month; business: 1,000,000 calls a month."
    }
  }
}