{
  "openapi": "3.1.0",
  "info": {
    "title": "ModelMap Static Data API",
    "version": "1.0.0",
    "description": "Static JSON endpoints for AI model deployment, pricing, residency, and provider metadata."
  },
  "servers": [
    {
      "url": "https://modelmap.app"
    }
  ],
  "paths": {
    "/data/latest.json": {
      "get": {
        "summary": "Full catalog snapshot",
        "description": "Current full ModelMap catalog snapshot with active and historical deployment rows.",
        "responses": {
          "200": {
            "description": "Current ModelMap catalog snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSnapshot"
                }
              }
            }
          }
        }
      }
    },
    "/data/models.json": {
      "get": {
        "summary": "Model index",
        "description": "Models with canonical model facts separated from provider deployment metadata.",
        "responses": {
          "200": {
            "description": "Models grouped across deployments and providers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelIndex"
                }
              }
            }
          }
        }
      }
    },
    "/data/providers.json": {
      "get": {
        "summary": "Provider index",
        "description": "Inference platforms with model publisher, region, residency, and offering rollups.",
        "responses": {
          "200": {
            "description": "Providers, platforms, regions, and offering counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderIndex"
                }
              }
            }
          }
        }
      }
    },
    "/data/compliance.json": {
      "get": {
        "summary": "Compliance and residency rollup",
        "responses": {
          "200": {
            "description": "Residency scopes, assurance classes, and jurisdiction counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceIndex"
                }
              }
            }
          }
        }
      }
    },
    "/data/pricing.json": {
      "get": {
        "summary": "Pricing data",
        "responses": {
          "200": {
            "description": "Model pricing by pricing model name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingIndex"
                }
              }
            }
          }
        }
      }
    },
    "/data/weekly/latest.json": {
      "get": {
        "summary": "Latest weekly changes digest",
        "responses": {
          "200": {
            "description": "Latest weekly model deployment change digest",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyDigest"
                }
              }
            }
          }
        }
      }
    },
    "/feeds/changes.rss": {
      "get": {
        "summary": "Changes RSS feed",
        "responses": {
          "200": {
            "description": "RSS feed for weekly model deployment changes"
          }
        }
      }
    },
    "/feeds/changes.atom": {
      "get": {
        "summary": "Changes Atom feed",
        "responses": {
          "200": {
            "description": "Atom feed for weekly model deployment changes"
          }
        }
      }
    },
    "/feeds/index.json": {
      "get": {
        "summary": "Feed discovery index",
        "responses": {
          "200": {
            "description": "JSON index of ModelMap RSS, Atom, and weekly digest feeds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedIndex"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLM discovery guide",
        "responses": {
          "200": {
            "description": "Plain-text guide for AI systems"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DataSnapshot": {
        "type": "object",
        "description": "Full ModelMap catalog snapshot. Join modelOfferings[].offeringId to rows in /data/models.json.",
        "additionalProperties": true,
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "modelOfferings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ModelIndex": {
        "type": "object",
        "required": [
          "schemaVersion",
          "generatedAt",
          "source",
          "modelCount",
          "offeringCount",
          "models"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "schema": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "modelCount": {
            "type": "integer"
          },
          "offeringCount": {
            "type": "integer"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelIndexEntry"
            }
          }
        }
      },
      "ModelIndexEntry": {
        "type": "object",
        "required": [
          "modelId",
          "modelName",
          "provider",
          "offeringCount",
          "canonicalModel",
          "offerings"
        ],
        "properties": {
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "lifecycleStatus": {
            "type": "string"
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": true
          },
          "canonicalModel": {
            "$ref": "#/components/schemas/CanonicalModel"
          },
          "deploymentSummary": {
            "$ref": "#/components/schemas/DeploymentSummary"
          },
          "offeringCount": {
            "type": "integer"
          },
          "cloudProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceRegions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "destinationRegions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inferenceOptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "residencyScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "offerings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfferingReference"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "CanonicalModel": {
        "type": "object",
        "description": "Model-level facts independent of the serving platform where possible.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable publisher/model identifier derived from publisher and normalized model ID."
          },
          "sourceModelId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "publisher": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "lifecycleStatus": {
            "type": "string"
          },
          "releaseDate": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "modelCardUrl": {
            "type": "string",
            "format": "uri"
          },
          "metadataSource": {
            "type": "string"
          },
          "modalities": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "limits": {
            "type": "object",
            "additionalProperties": true
          },
          "features": {
            "type": "object",
            "additionalProperties": true
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "DeploymentSummary": {
        "type": "object",
        "properties": {
          "cloudProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceRegions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "destinationRegions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inferenceOptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "residencyScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "offeringCount": {
            "type": "integer"
          }
        }
      },
      "OfferingReference": {
        "type": "object",
        "properties": {
          "offeringId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "cloudProvider": {
            "type": "string"
          },
          "deploymentType": {
            "type": "string"
          },
          "sourceRegion": {
            "type": [
              "string",
              "null"
            ]
          },
          "destinationRegions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "profileUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ProviderIndex": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "schema": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "providerCount": {
            "type": "integer"
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "ComplianceIndex": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "caveat": {
            "type": "string"
          },
          "schema": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "scopeCounts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "assuranceCounts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "jurisdictionCounts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      },
      "PricingIndex": {
        "type": "object",
        "additionalProperties": true
      },
      "WeeklyDigest": {
        "type": "object",
        "additionalProperties": true
      },
      "FeedIndex": {
        "type": "object",
        "additionalProperties": true
      }
    }
  }
}
