{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/aipolicy.schema.json",
  "title": "aipolicy",
  "type": "object",
  "required": [],
  "properties": {
    "revision": {
      "type": "integer",
      "minimum": 0,
      "x-heart-privacy": "public"
    },
    "modes": {
      "type": "array",
      "items": {
        "enum": [
          "byok",
          "org-proxy"
        ]
      },
      "x-heart-privacy": "public"
    },
    "providers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-heart-privacy": "internal"
    },
    "regions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-heart-privacy": "internal"
    },
    "uses": {
      "description": "What a model may be used for. Missing allows every use.",
      "type": "array",
      "items": {
        "enum": [
          "explain",
          "serve",
          "propose",
          "plan",
          "chat"
        ]
      },
      "x-heart-privacy": "internal"
    },
    "dailyBudgetUsd": {
      "type": "number",
      "minimum": 0,
      "x-heart-privacy": "internal",
      "description": "Model spending allowed per day (UTC), in US dollars. Missing means no daily limit."
    },
    "monthlyBudgetUsd": {
      "type": "number",
      "minimum": 0,
      "x-heart-privacy": "internal",
      "description": "Model spending allowed per calendar month (UTC), in US dollars. Missing means no monthly limit."
    },
    "maxCallUsd": {
      "description": "Most one model call may cost, in US dollars.",
      "type": "number",
      "minimum": 0,
      "x-heart-privacy": "internal"
    },
    "allowFallback": {
      "type": "boolean",
      "x-heart-privacy": "internal"
    },
    "ext": {
      "$ref": "common.schema.json#/$defs/ext",
      "x-heart-privacy": "private"
    }
  }
}
