{
  "openapi": "3.1.0",
  "info": {
    "title": "NotCheapAI Price Index API",
    "description": "Verified primary pricing documentation, subscriptions, token tariffs, and compute rates across leading AI tools and models with exact check dates.",
    "version": "1.0.0",
    "contact": {
      "name": "Dejan Petkovic",
      "url": "https://notcheapai.com/about/#dejan-petkovic"
    },
    "license": {
      "name": "Creative Commons Attribution 4.0 International",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://notcheapai.com",
      "description": "Production origin"
    }
  ],
  "paths": {
    "/prices.json": {
      "get": {
        "summary": "Get all verified AI prices, subscriptions and model tariffs",
        "description": "Returns verified pricing records for 43 products and 123 plan tiers, including monthly subscription fees, API token tariffs per 1M tokens, credit allowances, official source links, and verification dates.",
        "operationId": "getAiPrices",
        "responses": {
          "200": {
            "description": "Complete verified AI pricing dataset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceIndexFeed"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PriceIndexFeed": {
        "type": "object",
        "required": ["schema_version", "publisher", "license", "last_updated", "total_products", "products"],
        "properties": {
          "schema_version": { "type": "integer" },
          "publisher": { "type": "string" },
          "homepage": { "type": "string" },
          "license": { "type": "string" },
          "last_updated": { "type": "string" },
          "total_products": { "type": "integer" },
          "total_plans": { "type": "integer" },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductItem"
            }
          }
        }
      },
      "ProductItem": {
        "type": "object",
        "required": ["id", "provider", "product_or_model", "category", "last_checked", "plans"],
        "properties": {
          "id": { "type": "string" },
          "provider": { "type": "string" },
          "product_or_model": { "type": "string" },
          "category": { "type": "string" },
          "free_tier": { "type": ["string", "null"] },
          "last_checked": { "type": "string" },
          "official_source_url": { "type": "string" },
          "plans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": { "type": "string" },
                "price": { "type": ["number", "null"] },
                "currency": { "type": "string" },
                "billing_unit": { "type": "string" },
                "billing_period": { "type": "string" },
                "pricing_type": { "type": "string" },
                "key_allowance_or_limit": { "type": "string" }
              }
            }
          }
        }
      }
    }
  }
}
