{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "compute_seconds": {
      "type": "number",
      "minimum": 0
    },
    "compute_cost_usd": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
      "description": "Draft exact decimal USD string, e.g. 25.00. Never convert through floating point for accounting."
    },
    "api_calls": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cost_usd": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "description": "Draft exact decimal USD string, e.g. 25.00. Never convert through floating point for accounting."
          }
        },
        "required": [
          "provider",
          "model",
          "tokens",
          "cost_usd"
        ],
        "additionalProperties": false
      }
    },
    "storage_bytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "storage_cost_usd": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
      "description": "Draft exact decimal USD string, e.g. 25.00. Never convert through floating point for accounting."
    },
    "human_labor_minutes": {
      "type": "number",
      "minimum": 0
    },
    "human_labor_cost_usd": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
      "description": "Draft exact decimal USD string, e.g. 25.00. Never convert through floating point for accounting."
    },
    "total_usd": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
      "description": "Draft exact decimal USD string, e.g. 25.00. Never convert through floating point for accounting."
    }
  },
  "required": [
    "compute_seconds",
    "compute_cost_usd",
    "api_calls",
    "storage_bytes",
    "storage_cost_usd",
    "human_labor_minutes",
    "human_labor_cost_usd",
    "total_usd"
  ],
  "additionalProperties": false,
  "description": "§6.4 line items; decimal string encoding is draft. Coordinator checks sum, budget, plausibility and outliers separately.",
  "title": "CostBreakdown",
  "$comment": "owp-docs-draft/0.1: proposed documentation shape only. Source: https://app.notion.com/p/338ed9cb3201819d96e9fc7b8e88594a §6.4. No production conformance claim."
}
