{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/greenpixie/json-schema/greenpixie-aimodel-ratecard-response-schema.json",
  "title": "AIModelRatecardResponse",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/greenpixie-openapi.yml#/components/schemas/AIModelRatecardResponse",
  "properties": {
    "version": {
      "type": "string",
      "title": "Version",
      "description": "Ratecard version returned (from the `version` param, or the latest if omitted)."
    },
    "grid_period": {
      "type": "string",
      "title": "Grid Period",
      "description": "Grid period the total-carbon figures are computed for (from the `grid_period` param, or the last complete month of grid data if omitted)."
    },
    "grid_version": {
      "type": "string",
      "title": "Grid Version",
      "description": "Grid version the carbon intensity was read from. Empty when no grid data is loaded at all; in that case, and whenever the default period has no data behind it, the total carbon figures are null."
    },
    "meta": {
      "$ref": "#/$defs/RatecardPageMeta"
    },
    "links": {
      "$ref": "#/$defs/RatecardPageLinks"
    },
    "records": {
      "items": {
        "$ref": "#/$defs/AIModelRatecardRecord"
      },
      "type": "array",
      "title": "Records"
    }
  },
  "type": "object",
  "required": [
    "version",
    "grid_period",
    "grid_version",
    "meta",
    "links",
    "records"
  ],
  "$defs": {
    "AIModelRatecardRecord": {
      "properties": {
        "provider": {
          "type": "string",
          "title": "Provider",
          "description": "Model provider."
        },
        "model": {
          "type": "string",
          "title": "Model",
          "description": "Model name."
        },
        "model_family": {
          "title": "Model Family",
          "description": "The model's product line, as distinct from its provider: e.g. `GPT-5`, `Claude Opus`, `Llama 4`. Null for versions loaded before the family was recorded.",
          "type": "string"
        },
        "context_length": {
          "title": "Context Length",
          "description": "Always null. The context-length dimension was withdrawn from the methodology because the benchmarking behind it did not support it, and no figure on this ratecard varies with context length. The column is served so that a query selecting it by name keeps working, and it will either be removed or filled with measured values in a later version.",
          "type": "string"
        },
        "token_type": {
          "type": "string",
          "title": "Token Type",
          "description": "Token type this row's figures apply to: input, cached_input or output. cached_input covers prefix-cached input tokens (your provider's cache reads)."
        },
        "effective_batch_size": {
          "type": "string",
          "title": "Effective Batch Size",
          "description": "Batching profile this row's figures apply to. `low` and `high` are fitted at a pinned number of parallel requests — higher batching amortises fixed per-request energy over more tokens — while `unknown` is fitted over a range of them, for when the serving configuration is not known."
        },
        "hardware_kwh_per_1000_tokens": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hardware Kwh Per 1000 Tokens",
          "description": "IT hardware electricity per 1000 tokens (kWh): the energy drawn by the GPUs and CPUs serving the model, before data-centre overhead. hardware + overhead = `total_kwh_per_1000_tokens`. \"OUTSIDE_OF_PLAN\" if your plan doesn't cover this ratecard."
        },
        "overhead_kwh_per_1000_tokens": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Overhead Kwh Per 1000 Tokens",
          "description": "Data-centre overhead electricity per 1000 tokens (kWh): cooling, power distribution and other facility loads on top of the hardware energy. hardware + overhead = `total_kwh_per_1000_tokens`. \"OUTSIDE_OF_PLAN\" if your plan doesn't cover this ratecard."
        },
        "total_kwh_per_1000_tokens": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Kwh Per 1000 Tokens",
          "description": "Total facility electricity per 1000 tokens (kWh): the hardware energy plus the data-centre overhead (hardware + overhead). Named apart from the gold table's `kwh_per_1000_tokens`, which is the hardware figure — same unit, different quantity. \"OUTSIDE_OF_PLAN\" if your plan doesn't cover this ratecard."
        },
        "total_tonnes_co2e_per_1000_tokens": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Tonnes Co2E Per 1000 Tokens",
          "description": "Total carbon per 1000 tokens (tonnes CO2e): operational (total electricity x grid intensity) plus embodied (scope 3), using the requested `grid_period`'s average AWS-region grid intensity. Null when no grid data is loaded; \"OUTSIDE_OF_PLAN\" if your plan doesn't cover this ratecard."
        },
        "water_litres_per_1000_tokens": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Water Litres Per 1000 Tokens",
          "description": "Water consumption per 1000 tokens (litres): on-site cooling (hardware electricity x WUE) plus off-site electricity generation (total electricity x grid water intensity), using the average AWS-region factors. Null when no water data is loaded; \"OUTSIDE_OF_PLAN\" if your plan doesn't cover this ratecard."
        },
        "cost_per_1000_tokens": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cost Per 1000 Tokens",
          "description": "Published cloud list price per 1000 tokens (USD): the price the cloud marketplaces charge for these tokens (the AWS Bedrock and Azure AI token SKUs), averaged over the SKUs behind the model. Not a modelled figure — it carries no PUE, grid or water factor — and not your negotiated or committed-use rate. Null where the model has no priced cloud SKU, which is routine rather than an error, and on every `cached_input` row (prefix-cached tokens are priced separately upstream). \"OUTSIDE_OF_PLAN\" if your plan doesn't cover this ratecard."
        }
      },
      "type": "object",
      "required": [
        "provider",
        "model",
        "token_type",
        "effective_batch_size"
      ],
      "title": "AIModelRatecardRecord"
    },
    "RatecardPageLinks": {
      "properties": {
        "self": {
          "type": "string",
          "title": "Self",
          "description": "URL of the current page."
        },
        "next": {
          "title": "Next",
          "description": "URL of the next page, if any.",
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "self"
      ],
      "title": "RatecardPageLinks"
    },
    "RatecardPageMeta": {
      "properties": {
        "limit": {
          "type": "integer",
          "title": "Limit",
          "description": "Maximum number of records requested on this page."
        },
        "returned_count": {
          "type": "integer",
          "title": "Returned Count",
          "description": "Actual number of records returned on this page."
        },
        "total_count": {
          "title": "Total Count",
          "description": "Total number of records matching the current filters (ignoring pagination). Useful for progress indicators. Only present on the first page of results.",
          "type": "integer"
        },
        "total_count_at_least": {
          "title": "Total Count At Least",
          "description": "A floor on the total when counting the matches exactly would cost more than the page itself: there are at least this many records, and counting stopped there. Present instead of `total_count`, never alongside it. Narrow the query with a column filter to get an exact figure.",
          "type": "integer"
        },
        "has_more": {
          "type": "boolean",
          "title": "Has More",
          "description": "True if more records exist beyond this page."
        },
        "unlocked_count": {
          "title": "Unlocked Count",
          "description": "How many of the matching records your plan returns real values for. Only present alongside `total_count` (first page, `include_totals=true`).",
          "type": "integer"
        },
        "locked_count": {
          "title": "Locked Count",
          "description": "How many of the matching records come back with their sustainability values withheld as OUTSIDE_OF_PLAN. Only present alongside `total_count`.",
          "type": "integer"
        },
        "next_cursor": {
          "title": "Next Cursor",
          "description": "Opaque cursor for the next page. Pass this back as the `cursor` query parameter to fetch the next page. Null when there are no more pages.",
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "limit",
        "returned_count",
        "has_more"
      ],
      "title": "RatecardPageMeta"
    }
  }
}