{
  "openapi": "3.1.0",
  "info": {
    "title": "ModelRegistry API",
    "summary": "Free, read-only JSON API for the open frontier AI model registry",
    "version": "v1",
    "description": "Free unauthenticated read-only REST API for the open frontier AI model registry at https://modelregistry.tirup.in. No API keys, no signup. CORS-open (Access-Control-Allow-Origin: *). Human-readable reference: https://modelregistry.tirup.in/docs. Machine-readable site guide: https://modelregistry.tirup.in/llms.txt.\n\nEvery record carries provenance (sources, field-level citations, verification status, changelog); benchmark figures are lab-reported unless a model page shows otherwise. `lastVerifiedAt` is the date a source was reviewed, not a live availability signal.\n\nError contract: every 4xx/5xx body is `ErrorResponse` - a human-readable `error`, a machine-readable `code`, a recovery `hint`, and a `docs` link. Errors are never HTML.\n\nContent negotiation: send `Accept: text/markdown` to any HTML route (including `/`) to receive a Markdown rendering with `Vary: Accept`. HTML is unchanged for `Accept: text/html`.\n\nRate budget: 600 requests per 60-second window per client, advertised via `RateLimit` and `X-RateLimit-*` headers on every response. A 429 carries `Retry-After`.\n\nRevision policy: stable kebab-case record IDs; additive fields only within v1; breaking changes ship as v2. Dataset revisions are dated (see datasetVersion); record history at https://modelregistry.tirup.in/changelog.",
    "license": {
      "name": "MIT (Open Data)",
      "url": "https://github.com/TirupMehta/ModelRegistry/blob/main/LICENSE"
    },
    "contact": {
      "name": "ModelRegistry maintainer",
      "url": "https://modelregistry.tirup.in/contact"
    }
  },
  "servers": [
    {
      "url": "https://modelregistry.tirup.in",
      "description": "Production"
    }
  ],
  "tags": [
    { "name": "models", "description": "Registry records and provider listings" },
    { "name": "changes", "description": "Changelog and incremental sync" },
    { "name": "data", "description": "Dataset snapshots and health" },
    { "name": "feeds", "description": "RSS, JSON Feed, and agent-readable text" },
    { "name": "agents", "description": "Markdown negotiation and agent discovery" },
    { "name": "mcp", "description": "Model Context Protocol server for agent tool use" }
  ],
  "paths": {
    "/api/v1/models": {
      "get": {
        "operationId": "listModels",
        "tags": ["models"],
        "summary": "List tracked frontier AI models",
        "description": "Primary endpoint. Returns every tracked model plus a per-laboratory rollup. All query parameters are optional and combinable. Unknown filter values return 200 with an empty models list (total 0), never an error. Supports conditional requests: send the ETag back as If-None-Match to receive 304 when the dataset revision and filters are unchanged.",
        "parameters": [
          {
            "name": "company",
            "in": "query",
            "schema": { "type": "string" },
            "description": "Laboratory id (e.g. openai, anthropic, google, deepseek)."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["flagship", "reasoning", "open-weights", "code", "multimodal", "audio", "image", "video"]
            },
            "description": "Model bucket."
          },
          {
            "name": "openWeights",
            "in": "query",
            "schema": { "type": "string", "enum": ["true", "false"] },
            "description": "\"true\" for downloadable weights, \"false\" for proprietary API models."
          },
          {
            "name": "flagshipOnly",
            "in": "query",
            "schema": { "type": "string", "enum": ["true", "false"] },
            "description": "\"true\" returns exactly one primary flagship per laboratory."
          },
          {
            "name": "latestOnly",
            "in": "query",
            "schema": { "type": "string", "enum": ["true", "false"] },
            "description": "\"true\" returns each laboratory's newest shipped checkpoint(s)."
          },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Registry snapshot. Unknown filter values return an empty models list with total 0.",
            "headers": {
              "ETag": { "$ref": "#/components/headers/ETag" },
              "Last-Modified": { "$ref": "#/components/headers/LastModified" },
              "RateLimit": { "$ref": "#/components/headers/RateLimit" },
              "X-RateLimit-Limit": { "$ref": "#/components/headers/XRateLimitLimit" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ModelListResponse" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/v1/models/{id}": {
      "get": {
        "operationId": "getModel",
        "tags": ["models"],
        "summary": "Get one tracked model by id",
        "description": "Single-record fetch so consumers can poll one model without pulling the full registry. IDs are stable kebab-case and matched case-insensitively. Unknown ids return a JSON 404 with a laboratory flagship suggestion when the slug unambiguously belongs to one laboratory. Supports conditional requests via If-None-Match.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": { "type": "string" },
            "description": "Stable kebab-case record id (e.g. gpt-6-astra)."
          },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "One registry record.",
            "headers": {
              "ETag": { "$ref": "#/components/headers/ETag" },
              "Last-Modified": { "$ref": "#/components/headers/LastModified" },
              "RateLimit": { "$ref": "#/components/headers/RateLimit" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ModelDetailResponse" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/v1/models/{id}/providers": {
      "get": {
        "operationId": "getModelProviders",
        "tags": ["models"],
        "summary": "Get current OpenRouter listings for a tracked model",
        "description": "Returns current provider endpoints, provider-specific prices, and limits for an explicitly mapped OpenRouter model. This live provider snapshot is separate from lab-sourced registry facts and does not change their verification status. An unmapped model may still be available through other providers.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": { "type": "string" },
            "description": "Stable ModelRegistry record id."
          }
        ],
        "responses": {
          "200": {
            "description": "Provider snapshot; status is listed, unmapped, no_endpoints, or lookup_failed. Listed endpoints do not guarantee serving availability.",
            "headers": {
              "Cache-Control": {
                "description": "Shared cache may serve provider data for five minutes and stale data while refreshing.",
                "schema": { "type": "string" }
              },
              "RateLimit": { "$ref": "#/components/headers/RateLimit" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ProviderResponse" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/v1/changes": {
      "get": {
        "operationId": "listChanges",
        "tags": ["changes"],
        "summary": "List registry changelog entries (incremental sync)",
        "description": "Changelog history across all records, newest first (same source as /changelog). Poll with ?since=<YYYY-MM-DD> (inclusive) to fetch only what changed, then fetch changed records via GET /api/v1/models/{id}. Unknown model/company filters return 200 with an empty list; malformed dates or limits return 400 with code invalid_date or invalid_limit. Supports conditional requests via If-None-Match.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "schema": { "type": "string", "format": "date" },
            "description": "Inclusive lower bound, YYYY-MM-DD (e.g. 2026-10-01)."
          },
          {
            "name": "until",
            "in": "query",
            "schema": { "type": "string", "format": "date" },
            "description": "Inclusive upper bound, YYYY-MM-DD."
          },
          {
            "name": "model",
            "in": "query",
            "schema": { "type": "string" },
            "description": "Filter to one record id (case-insensitive)."
          },
          {
            "name": "company",
            "in": "query",
            "schema": { "type": "string" },
            "description": "Filter to one laboratory id (e.g. openai)."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 100 },
            "description": "Max entries returned. Defaults to 100, capped at 500."
          },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Changelog entries, newest first. total is the full match count; changes is capped by limit.",
            "headers": {
              "ETag": { "$ref": "#/components/headers/ETag" },
              "Last-Modified": { "$ref": "#/components/headers/LastModified" },
              "RateLimit": { "$ref": "#/components/headers/RateLimit" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ChangeListResponse" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/v1/snapshot": {
      "get": {
        "operationId": "getSnapshot",
        "tags": ["data"],
        "summary": "Download the versioned full dataset",
        "description": "The complete registry, including every field of every record, packaged as one citable JSON download. The Content-Disposition filename carries the dataset version so a citation can be reproduced.",
        "responses": {
          "200": {
            "description": "Versioned dataset snapshot.",
            "headers": {
              "Content-Disposition": {
                "description": "attachment; filename=\"modelregistry-<datasetVersion>.json\"",
                "schema": { "type": "string" }
              },
              "RateLimit": { "$ref": "#/components/headers/RateLimit" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/DatasetSnapshot" }
              }
            }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/check-updates": {
      "get": {
        "operationId": "getHealth",
        "tags": ["data"],
        "summary": "Service health and dataset verification snapshot",
        "description": "Honest health signal. Upstream reachability (OpenRouter heartbeat) is reported separately and never implies factual verification; factual freshness comes only from per-record verification dates. Poll no more than once every 5 minutes.",
        "responses": {
          "200": {
            "description": "Health payload.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HealthResponse" }
              }
            }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/v1/standing": {
      "get": {
        "operationId": "getStanding",
        "tags": ["agents"],
        "summary": "ModelRegistry Score: cross-test score of current models",
        "description": "Published summary of the per-test leaderboards: per-model ModelRegistry Score (a fixed-reference scale where 500 is the reference average and 100 points is one reference standard deviation, with no ceiling) across at least two tests, its 95% band and per-test points, tier, spread between tests, agreement label, auditability, its held-out gap (private-test minus public-test results in score points with a 95% half-width, null when either side has fewer than 2 tests), the cohorts behind it, a `secondEvaluator` block comparing the score with Epoch AI's Epoch Capabilities Index (a cross-check only, never an input: rank correlation and pair agreement over the shared models), and the full calibration constants so every score can be recomputed. Computed from independent results only (Artificial Analysis, same tasks and harness for every model); laboratory-reported scores are excluded. Only current (not superseded, not retired) models are ranked. Rows in the same tier are not separated by the evidence; `place` is sort order only.",
        "responses": {
          "200": {
            "description": "Standing, cohorts and single-test positions.",
            "content": { "application/json": { "schema": { "type": "object" } } }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/api/v1/cli": {
      "get": {
        "operationId": "getCliTable",
        "tags": ["agents"],
        "summary": "Plain-text registry table for terminals",
        "description": "Terminal-native view: primary flagships table plus recent specialized checkpoints. Fixed-width ASCII so raw consoles stay aligned. No parameters. `curl /` is rewritten here for curl user agents.",
        "responses": {
          "200": {
            "description": "Plain-text table.",
            "content": {
              "text/plain": {
                "schema": { "type": "string" }
              }
            }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/api/markdown": {
      "get": {
        "operationId": "getMarkdownView",
        "tags": ["agents"],
        "summary": "Markdown rendering of any HTML route",
        "description": "Returns the Markdown version of a public page. Requests that send `Accept: text/markdown` are rewritten here automatically. Two direct forms work as well: `GET /api/markdown/<page-path>` (e.g. /api/markdown/docs) and `GET /api/markdown?path=/docs`. The response keeps the real status code: an unknown path returns 404 with a Markdown recovery block that links the docs, sitemap, and llms.txt. Every response sets `Content-Type: text/markdown; charset=utf-8` and `Vary: Accept`.",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "default": "/" },
            "description": "Pathname of the page to render, e.g. /, /docs, /models/gpt-6-astra."
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown document for a known route.",
            "headers": {
              "Vary": {
                "description": "Always includes Accept.",
                "schema": { "type": "string" }
              }
            },
            "content": {
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          },
          "404": {
            "description": "The requested route does not exist. The body is a Markdown recovery block with links to /docs, /sitemap.xml, and /llms.txt.",
            "content": {
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "operationId": "getJsonFeed",
        "tags": ["feeds"],
        "summary": "JSON Feed of model releases",
        "description": "JSON Feed 1.1 with the same items and ordering as /rss.xml, plus per-item verification status and record modification dates.",
        "responses": {
          "200": {
            "description": "JSON Feed.",
            "headers": {
              "RateLimit": { "$ref": "#/components/headers/RateLimit" }
            },
            "content": {
              "application/feed+json": {
                "schema": { "$ref": "#/components/schemas/JsonFeed" }
              }
            }
          }
        }
      }
    },
    "/rss.xml": {
      "get": {
        "operationId": "getRssFeed",
        "tags": ["feeds"],
        "summary": "RSS 2.0 feed of model releases",
        "description": "Newest-first release items with stable /models/:id GUIDs.",
        "responses": {
          "200": {
            "description": "RSS feed.",
            "headers": {
              "RateLimit": { "$ref": "#/components/headers/RateLimit" }
            },
            "content": {
              "application/rss+xml": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "tags": ["agents"],
        "summary": "LLM-readable registry summary",
        "description": "Per-lab flagships and checkpoints with dataset version and verification counts, a 'When to use ModelRegistry' section, and the call conventions for agents. Benchmark figures are lab-reported.",
        "responses": {
          "200": {
            "description": "Plain text.",
            "content": {
              "text/plain": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsFullTxt",
        "tags": ["agents"],
        "summary": "Exhaustive machine-readable model matrix",
        "description": "Every record with verification status, sources, and changelog pointers. Benchmark figures are lab-reported.",
        "responses": {
          "200": {
            "description": "Plain text.",
            "content": {
              "text/plain": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/api/mcp": {
      "post": {
        "operationId": "mcpRpc",
        "tags": ["mcp"],
        "summary": "Model Context Protocol server (JSON-RPC 2.0, stateless)",
        "description": "Hosted MCP endpoint for any MCP-capable client (Claude, Cursor, Codex, custom agents). Stateless JSON-RPC 2.0 over POST per the MCP 2025-06-18 revision: initialize, ping, tools/list, tools/call. No auth, no session, CORS-open. Notifications (no id) return 202; unknown methods return a JSON-RPC -32601 error listing the supported set. GET and DELETE return 405 (stateless, POST only); OPTIONS is the CORS preflight. Tool outcomes mirror the REST API data and keep the code + hint error contract inside isError results (model_not_found, invalid_params, route_not_found, invalid_date). Tool results never imply live availability.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["jsonrpc", "method"],
                "properties": {
                  "jsonrpc": { "type": "string", "const": "2.0" },
                  "id": { "type": ["string", "number"], "description": "Request id. Missing or null id is treated as a notification (HTTP 202)." },
                  "method": { "type": "string", "enum": ["initialize", "ping", "tools/list", "tools/call"] },
                  "params": { "type": "object", "description": "For tools/call: { name, arguments }. Arguments are validated per tool; unknown tools and malformed arguments return -32602." }
                }
              },
              "examples": {
                "initialize": { "value": { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-06-18", "capabilities": {} } } },
                "listModels": { "value": { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "list_models", "arguments": { "company": "anthropic", "flagshipOnly": true } } } },
                "getModel": { "value": { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "get_model", "arguments": { "id": "gpt-6-1-sol" } } } }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 envelope (result or error). Tool errors ride inside a result's isError flag with the REST code + hint contract; only malformed requests produce JSON-RPC error objects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": { "type": "string", "const": "2.0" },
                    "id": {},
                    "result": { "type": "object" },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "integer", "enum": [-32700, -32600, -32601, -32602, -32603] },
                        "message": { "type": "string" },
                        "data": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "202": { "description": "Notification accepted (no id present); no body." },
          "405": { "description": "DELETE only: stateless server. POST runs JSON-RPC; GET returns the landing document." }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "IfNoneMatch": {
        "name": "If-None-Match",
        "in": "header",
        "required": false,
        "schema": { "type": "string" },
        "description": "ETag from a previous response. Returns 304 with an empty body when nothing changed."
      }
    },
    "headers": {
      "ETag": {
        "description": "Revision + query hash. Echo as If-None-Match.",
        "schema": { "type": "string" }
      },
      "LastModified": {
        "description": "Dataset revision date, not request time.",
        "schema": { "type": "string" }
      },
      "RateLimit": {
        "description": "Advisory budget in RFC RateLimit format, e.g. \"default\";r=600;t=60.",
        "schema": { "type": "string" }
      },
      "XRateLimitLimit": {
        "description": "Requests allowed per window (600).",
        "schema": { "type": "integer" }
      }
    },
    "responses": {
      "NotModified": {
        "description": "Not modified - the dataset revision and query are unchanged since the ETag was issued."
      },
      "BadRequest": {
        "description": "Missing or malformed input.",
        "content": {
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      },
      "NotFound": {
        "description": "Unknown record id or unknown API path. Lists valid endpoints and, where resolvable, a suggested record id.",
        "content": {
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      },
      "MethodNotAllowed": {
        "description": "The registry is read-only. Use GET or HEAD.",
        "headers": {
          "Allow": {
            "description": "Supported methods: GET, HEAD, OPTIONS.",
            "schema": { "type": "string" }
          }
        },
        "content": {
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      },
      "TooManyRequests": {
        "description": "The client is over the advisory rate budget, or the waitlist throttler tripped.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": { "type": "integer" }
          }
        },
        "content": {
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      },
      "ServerError": {
        "description": "Unexpected server failure. Retry once, then report it.",
        "content": {
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "description": "Uniform error body for every JSON endpoint. Branch on `code`; show `error` to people; follow `hint` to recover. `suggestion*` and `endpoints` appear where they help recovery.",
        "required": ["status", "error", "code", "hint", "docs"],
        "properties": {
          "status": { "type": "string", "const": "error" },
          "error": { "type": "string", "description": "Human-readable message.", "example": "Model 'xyz' not found." },
          "code": {
            "type": "string",
            "description": "Stable machine-readable code.",
            "enum": [
              "bad_request",
              "invalid_date",
              "invalid_limit",
              "model_not_found",
              "route_not_found",
              "method_not_allowed",
              "rate_limited",
              "temporarily_unavailable",
              "internal_error"
            ]
          },
          "hint": { "type": "string", "description": "How to recover.", "example": "List known ids via GET /api/v1/models." },
          "docs": { "type": "string", "format": "uri", "example": "https://modelregistry.tirup.in/docs#errors" },
          "methodology": { "type": "string", "format": "uri" },
          "id": { "type": "string", "description": "The id that was requested, when relevant." },
          "suggestion": { "type": "string", "description": "Suggested current record id, when resolvable." },
          "suggestionPage": { "type": "string" },
          "suggestionUrl": { "type": "string", "format": "uri" },
          "endpoints": { "type": "array", "items": { "type": "string" }, "description": "Known API endpoints, sent with route_not_found." },
          "path": { "type": "string" },
          "usage": { "type": "string" },
          "provider": { "type": "string" }
        }
      },
      "SourceRef": {
        "type": "object",
        "description": "One cited primary source behind a record.",
        "required": ["url", "publisher", "title", "accessedAt", "sourceType"],
        "properties": {
          "url": { "type": "string", "format": "uri", "example": "https://mistral.ai/news/mistral-large-4/" },
          "publisher": { "type": "string", "example": "Mistral AI" },
          "title": { "type": "string", "example": "Mistral Large 4 announcement" },
          "publishedAt": { "type": "string", "format": "date", "description": "Source publication date, when directly observed." },
          "accessedAt": { "type": "string", "format": "date", "description": "Date the registry last confirmed the source.", "example": "2026-10-07" },
          "sourceType": { "type": "string", "enum": ["announcement", "api-docs", "pricing", "model-card", "paper", "weights", "benchmark", "console"] },
          "live": { "type": "boolean", "description": "True when the source returned HTTP 2xx to the automated check." },
          "note": { "type": "string", "description": "Access limits or source weaknesses, e.g. bot-gated pages." }
        }
      },
      "Pricing": {
        "type": "object",
        "required": ["input", "output"],
        "properties": {
          "input": { "type": "number", "description": "USD per billing unit." },
          "output": { "type": "number" }
        }
      },
      "ModelItem": {
        "type": "object",
        "description": "One registry record. Benchmark figures are lab-reported, not independently reproduced.",
        "required": ["id", "companyId", "name", "releaseDate", "pricing", "sources", "fieldSources", "lastVerifiedAt", "changeLog"],
        "properties": {
          "id": { "type": "string", "description": "Stable kebab-case record ID.", "example": "mistral-large-4" },
          "companyId": { "type": "string", "example": "mistral" },
          "companyName": { "type": "string", "example": "Mistral AI" },
          "name": { "type": "string", "example": "Mistral Large 4" },
          "version": { "type": "string", "description": "Laboratory version string, when one is published." },
          "releaseDate": { "type": "string", "format": "date" },
          "isCompanyFlagship": { "type": "boolean", "description": "Laboratory's primary general-purpose model. Requires fresh, live evidence." },
          "isLatestCheckpoint": { "type": "boolean", "description": "Laboratory's newest shipped release. Requires fresh, live evidence." },
          "statusBadge": { "type": "string" },
          "category": { "type": "string" },
          "categoryLabel": { "type": "string" },
          "contextWindow": { "type": "string", "description": "Human-readable window, including descriptive non-token windows." },
          "contextWindowTokens": { "type": "integer", "description": "0 means undisclosed or non-token billing." },
          "maxOutputTokens": { "type": "string" },
          "parameters": { "type": "string" },
          "openWeights": { "type": "boolean" },
          "license": { "type": "string" },
          "pricing": { "$ref": "#/components/schemas/Pricing" },
          "pricingUnit": { "type": "string", "description": "Only 'per second'; absent means per-1M-tokens." },
          "pricingCurrency": { "type": "string", "enum": ["INR", "CNY"], "description": "Present only when the lab publishes its price in another currency; pricing is then in that currency exactly as published, never converted. Absent means USD." },
          "highlight": { "type": "string" },
          "modalities": { "type": "array", "items": { "type": "string" } },
          "benchmarks": {
            "type": "object",
            "description": "Lab-published scores keyed by benchmark. Empty object means none published.",
            "additionalProperties": { "type": "string" }
          },
          "links": {
            "type": "object",
            "properties": {
              "announcement": { "type": "string", "format": "uri" },
              "playground": { "type": "string", "format": "uri" },
              "paper": { "type": "string", "format": "uri" },
              "apiDocs": { "type": "string", "format": "uri" },
              "weights": { "type": "string", "format": "uri" }
            }
          },
          "sources": { "type": "array", "items": { "$ref": "#/components/schemas/SourceRef" } },
          "fieldSources": {
            "type": "object",
            "description": "Per-field citations keyed by releaseDate, contextWindow, maxOutputTokens, parameters, license, pricing, modalities, benchmarks, isCompanyFlagship, isLatestCheckpoint. Missing keys mean no citable source yet.",
            "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/SourceRef" } }
          },
          "lastVerifiedAt": { "type": "string", "format": "date", "description": "Date a source was reviewed. Not a live availability signal." },
          "verificationStatus": { "type": "string", "enum": ["verified", "retired"], "description": "Present only when the record is confirmed (verified) or retired." },
          "changeLog": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["date", "summary"],
              "properties": {
                "date": { "type": "string", "format": "date" },
                "summary": { "type": "string" },
                "sources": { "type": "array", "items": { "type": "string", "format": "uri" } }
              }
            }
          },
          "supersededBy": { "type": "string", "description": "Replacement record id, when retired." }
        }
      },
      "CompanyRollup": {
        "type": "object",
        "required": ["id", "name", "page"],
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "page": { "type": "string" },
          "latestFlagship": { "type": "string" },
          "latestCheckpoint": { "type": "string" }
        }
      },
      "ModelListResponse": {
        "type": "object",
        "required": ["status", "total", "models", "datasetVersion", "verification"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total": { "type": "integer" },
          "updatedAt": { "type": "string", "format": "date", "description": "Last real data revision (YYYY-MM-DD), never the request time." },
          "datasetVersion": { "type": "string", "example": "2026.11.05-r8" },
          "methodology": { "type": "string", "format": "uri" },
          "metadata": {
            "type": "object",
            "properties": {
              "registry": { "type": "string" },
              "documentation": { "type": "string", "format": "uri" },
              "docs": { "type": "string", "format": "uri" },
              "license": { "type": "string" },
              "revisionPolicy": { "type": "string" },
              "description": { "type": "string" }
            }
          },
          "companies": { "type": "array", "items": { "$ref": "#/components/schemas/CompanyRollup" } },
          "models": { "type": "array", "items": { "$ref": "#/components/schemas/ModelItem" } }
        }
      },
      "ModelDetailResponse": {
        "type": "object",
        "required": ["status", "model", "datasetVersion"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "updatedAt": { "type": "string", "format": "date" },
          "datasetVersion": { "type": "string" },
          "methodology": { "type": "string", "format": "uri" },
          "page": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "model": { "$ref": "#/components/schemas/ModelItem" }
        }
      },
      "ProviderEndpoint": {
        "type": "object",
        "required": ["provider", "tier", "contextTokens", "maxOutputTokens", "inputUsdPerMillion", "outputUsdPerMillion"],
        "properties": {
          "provider": { "type": "string" },
          "tier": { "type": ["string", "null"] },
          "contextTokens": { "type": ["integer", "null"] },
          "maxOutputTokens": { "type": ["integer", "null"] },
          "inputUsdPerMillion": { "type": ["number", "null"] },
          "outputUsdPerMillion": { "type": ["number", "null"] }
        }
      },
      "ProviderResponse": {
        "type": "object",
        "required": ["status", "modelId", "provider", "endpoints"],
        "properties": {
          "status": { "type": "string", "enum": ["listed", "unmapped", "no_endpoints", "lookup_failed"] },
          "modelId": { "type": "string" },
          "provider": { "type": "string", "example": "OpenRouter" },
          "providerModelId": { "type": "string" },
          "checkedAt": { "type": "string", "format": "date-time" },
          "endpointCount": { "type": "integer" },
          "endpoints": { "type": "array", "items": { "$ref": "#/components/schemas/ProviderEndpoint" } }
        }
      },
      "ChangeEntry": {
        "type": "object",
        "description": "One dated changelog entry from a model's changeLog history, with its owning record attached.",
        "required": ["date", "summary", "modelId", "modelName", "companyId"],
        "properties": {
          "date": { "type": "string", "format": "date", "example": "2026-10-07" },
          "summary": { "type": "string" },
          "sources": { "type": "array", "items": { "type": "string", "format": "uri" } },
          "modelId": { "type": "string" },
          "modelName": { "type": "string" },
          "companyId": { "type": "string" },
          "companyName": { "type": "string" },
          "page": { "type": "string" },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "ChangeListResponse": {
        "type": "object",
        "required": ["status", "total", "returned", "changes", "datasetVersion"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total": { "type": "integer", "description": "Full match count before the limit cap." },
          "returned": { "type": "integer", "description": "Entries in this response (<= limit)." },
          "limit": { "type": "integer" },
          "since": { "type": ["string", "null"], "format": "date" },
          "until": { "type": ["string", "null"], "format": "date" },
          "model": { "type": ["string", "null"] },
          "company": { "type": ["string", "null"] },
          "updatedAt": { "type": "string", "format": "date" },
          "datasetVersion": { "type": "string" },
          "methodology": { "type": "string", "format": "uri" },
          "changelog": { "type": "string", "format": "uri" },
          "changes": { "type": "array", "items": { "$ref": "#/components/schemas/ChangeEntry" } }
        }
      },
      "DatasetSnapshot": {
        "type": "object",
        "required": ["dataset", "datasetVersion", "revisedAt", "counts", "models"],
        "properties": {
          "dataset": { "type": "string", "const": "ModelRegistry" },
          "datasetVersion": { "type": "string" },
          "revisedAt": { "type": "string", "format": "date" },
          "license": { "type": "string" },
          "methodology": { "type": "string", "format": "uri" },
          "changelog": { "type": "string", "format": "uri" },
          "counts": {
            "type": "object",
            "properties": {
              "models": { "type": "integer" },
              "companies": { "type": "integer" }
            }
          },
          "companies": { "type": "array", "items": { "type": "object" } },
          "models": { "type": "array", "items": { "$ref": "#/components/schemas/ModelItem" } }
        }
      },
      "HealthResponse": {
        "type": "object",
        "required": ["status", "generatedAt", "datasetVersion", "trackedModelsCount"],
        "properties": {
          "status": { "type": "string", "example": "ok" },
          "generatedAt": { "type": "string", "format": "date-time", "description": "Response generation time. Not a verification claim." },
          "datasetVersion": { "type": "string" },
          "datasetLastChangedAt": { "type": "string", "format": "date" },
          "oldestVerificationDate": { "type": "string", "format": "date" },
          "retiredModelCount": { "type": "integer" },
          "upstreamAvailability": {
            "type": "object",
            "description": "Unrelated third-party reachability. Never read as registry verification.",
            "properties": {
              "openrouter": { "type": "string", "enum": ["reachable", "unreachable", "unchecked"] },
              "externalLiveCount": { "type": "integer" }
            }
          },
          "trackedLabsCount": { "type": "integer" },
          "trackedModelsCount": { "type": "integer" },
          "methodology": { "type": "string", "format": "uri" },
          "message": { "type": "string" }
        }
      },
      "JsonFeedItem": {
        "type": "object",
        "description": "One JSON Feed 1.1 item. The `_verification_status` extension is ModelRegistry-specific and does not alter the standard fields.",
        "required": ["id", "url", "title", "content_text", "date_published", "date_modified"],
        "properties": {
          "id": { "type": "string", "format": "uri" },
          "url": { "type": "string", "format": "uri" },
          "title": { "type": "string" },
          "content_text": { "type": "string" },
          "date_published": { "type": "string", "format": "date-time" },
          "date_modified": { "type": "string", "format": "date-time" },
          "authors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": { "name": { "type": "string" } }
            }
          },
          "_verification_status": { "type": "string", "enum": ["verified", "retired"] }
        }
      },
      "JsonFeed": {
        "type": "object",
        "required": ["version", "title", "home_page_url", "feed_url", "items"],
        "properties": {
          "version": { "type": "string", "example": "https://jsonfeed.org/version/1.1" },
          "title": { "type": "string" },
          "home_page_url": { "type": "string", "format": "uri" },
          "feed_url": { "type": "string", "format": "uri" },
          "description": { "type": "string" },
          "_dataset_version": { "type": "string" },
          "_dataset_revised": { "type": "string", "format": "date" },
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/JsonFeedItem" } }
        }
      }
    }
  }
}
