{
  "openapi": "3.1.0",
  "info": {
    "title": "TrueFloat API",
    "version": "1.0.0",
    "summary": "Public API and dataset of CS2 pattern-seed guides, transcribed faithfully from their Steam sources.",
    "description": "TrueFloat serves a hand-transcribed dataset of CS2 pattern-seed guides:\nwhich seed goes in which author's tier, group or rank, quoted verbatim\nfrom the guide it came from. It backs the Diamond Index and is open for\nanyone else to build on.\n\n## The shape everything shares\n\n```\nitem        AK-47 | Case Hardened        def_index 7, paint_index 44\n └ guide     one Steam guide, one author\n    └ system  one property being ranked   \"Blue Gem\", \"Max Black\"\n       └ level one place in that ranking   \"top\", \"1\", \"2\"\n          └ seeds\n```\n\nA tier guide is one system with many levels. A group guide is many\nsystems with one level each. Same JSON either way, so no consumer\nbranches on the guide's shape. Levels are ordered best first;\n`level.key` is an opaque identifier and never an ordinal. `scale.kind`\ntells a UI how to draw the system, not how to read it.\n\n## Addressing\n\n`(def_index, paint_index)` is canonical. An item slug covers several\npaint indexes (`karambit-doppler` is Ruby 415, Sapphire 416, Black Pearl\n417), so a slug alone is not a query key. Slug and market hash name are\naliases that resolve to the canonical pair through `GET /resolve`.\n\n## Guides are never merged\n\nGrouping and merging are different things and only one is safe: grouping\n(\"which systems are about blue gems\") combines nothing, merging (\"what\ntier is seed 387 overall\") is unsafe because one guide's Tier 1 is\nanother's Tier 2. `topic` (on a **system**, not a guide) does grouping\nonly. Every response keeps each guide's own scale intact, side by side,\nand a verdict is always reported against its own guide's list: \"1st of 5\"\ndescribes that guide's list alone. No single cross-guide tier is ever\nemitted. The topic vocabulary itself is still open (`topic` is present\nand `null` on every system until it lands), so `?topic=` filtering is\nlive but every system currently reports `topic: null`.\n\n## The envelope\n\nEvery response under `/v1` that has a body is one JSON object. A\nsuccess carries `data`; a failure carries `error` with a `code` and a\nhuman `message`. Two responses are not enveloped: a `304 Not Modified`\nhas no body at all, and `/health` answers a bare `{\"status\": ...}`.\n`dataset_version` is present on every enveloped response, success or\nfailure: it is a content hash\nof `data/items`, `data/guides`, `api/rows.py` (where derived fields\nsuch as `place`, `of`, counts and aliases are computed) and\n`api/RESPONSE_VERSION` (a counter bumped alongside any `api/app.py`\nchange that alters response content) as loaded — not a commit sha. A\ndata change or a fix to how responses are derived changes it; a\nformatting, docs-only or infrastructure-only commit leaves it\nunchanged.\n\n```json\n{\"dataset_version\": \"e9c25a6\", \"data\": { }}\n{\"dataset_version\": \"e9c25a6\", \"error\": {\"code\": \"not_found\", \"message\": \"no item def 7 paint 45\"}}\n```\n\nError codes in use: `not_found` (404), `bad_request` (400 and 422),\n`rate_limited` (429, with `Retry-After`), `internal_error` (503, from\n`/dump` when a rebuild fails or from any endpoint on an unexpected\nserver error; never cached, safe to retry).\n\n## Empty versus missing\n\n| request | answer |\n|---|---|\n| unknown def_index, or a paint_index the item does not have | 404 `not_found` |\n| known item, seed no guide grades | 200, `verdicts: []`, every covering system in `not_listed` |\n| known item with no guide | 200, `guides: []` or `seeds: {}` |\n| unknown steam_id or system | 404 `not_found` |\n\n## Attribution\n\nEvery guide block in every response carries its attribution: `steam_id`,\n`title`, `authors`, `url`, `permission`, `updated`. No licence is claimed\non guide data — every guide is `permission: \"unknown\"` unless its author\nhas separately granted one — so the data belongs to its authors and\nshowing a grading means showing its author and Steam link.\n\n## Rate limits and caching\n\nThere is nothing to sign up for and nothing to send: every caller gets\n**1000 requests per minute per client IP**, enforced inside the app.\nCloudflare sits in front of that and enforces its own, tighter burst\nlimit — **170 requests per 10 seconds per client IP**, blocking for 10\nseconds past it — before a request reaches the app at all. Exceeding the\napp's limit returns `429 rate_limited` with a `Retry-After` header; the\nedge's block response carries no CORS headers, so browser JavaScript\ncan't read it as a `429` at all — a `fetch()` call just throws a network\nerror. Treat that the same as a `429`: back off and retry after a few\nseconds. Responses carry `ETag: \"<dataset_version>\"`,\nso a conditional request with `If-None-Match` gets a cheap, bodiless\n`304 Not Modified`, and a short public `Cache-Control` for edge/browser\ncaching. Send the `ETag` back exactly as you received it (a proxy may\nhand it to you weak, `W/\"...\"`, which still matches) and don't compare\nit to `dataset_version` yourself.\n`/dump` is cached longer and reused verbatim for every request against\nthe same `dataset_version`, and is served gzip-encoded when the caller's\n`Accept-Encoding` includes `gzip`.\n\n## CORS\n\nAny origin, `GET` only, no credentials. Every response, errors, `429`\nand `304` included, carries `Access-Control-Allow-Origin: *` and\n`Access-Control-Expose-Headers: ETag, Retry-After`, whether or not the\nrequest sent an `Origin`, so browser JavaScript can read both headers.\nResponses do not vary on `Origin`: one cached copy serves every caller.\nA preflight (`OPTIONS`) allows `GET` with an `If-None-Match` header.\n",
    "contact": {
      "name": "TrueFloat",
      "url": "https://truefloat.app/api/"
    }
  },
  "servers": [
    {
      "url": "https://truefloat.app/api/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Items",
      "description": "An item is a `(def_index, paint_index)` pair: one weapon or knife\nfinish at one paint index. `GET /items/{def_index}/{paint_index}`\nreturns the item plus a menu of every guide covering it. `GET\n/resolve` turns a slug or Steam market hash name into the\n`(def_index, paint_index)` pairs it covers.\n"
    },
    {
      "name": "Guides",
      "description": "A guide is one Steam guide by one author: provenance, every system it\ndefines, every level in order, every seed graded, with the verbatim\nquote each grading came from.\n"
    },
    {
      "name": "Seeds & patterns",
      "description": "Look up what every guide says about one seed, or fetch an item's whole\nseed map in bulk. `/patterns` is the bulk twin of `/seeds/{seed}`: a\nmarketplace overlay fetches it once per item page, then looks up each\nlisting locally instead of one request per listing.\n"
    },
    {
      "name": "Bulk",
      "description": "Download the whole dataset in one response instead of crawling the\nother endpoints.\n"
    },
    {
      "name": "Utilities",
      "description": "Dataset metadata and liveness.\n"
    }
  ],
  "paths": {
    "/health": {
      "servers": [
        {
          "url": "https://truefloat.app/api",
          "description": "Production (health lives outside /v1, unprefixed)"
        }
      ],
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness check",
        "description": "Returns `200` once the database is loaded and reachable, `503`\notherwise. Not rate limited, and not wrapped in the usual envelope\n— no `dataset_version`, no `data`/`error`. Use this for\ninfrastructure health checks, not for reading data.\n",
        "tags": [
          "Utilities"
        ],
        "responses": {
          "200": {
            "description": "Database is loaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthOk"
                },
                "examples": {
                  "ok": {
                    "summary": "Healthy",
                    "value": {
                      "status": "ok"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Database is not loaded or not reachable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthError"
                },
                "examples": {
                  "down": {
                    "summary": "Database unavailable",
                    "value": {
                      "status": "error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/meta": {
      "get": {
        "operationId": "getMeta",
        "summary": "Dataset metadata",
        "description": "`dataset_version`, when it was loaded, and counts of items, guides,\nsystems and gradings currently served. `counts.items` counts\n`(def_index, paint_index)` pairs, not item files. Poll this (or\nwatch the `ETag`) to notice a new `dataset_version` without\nfetching `/dump`.\n",
        "tags": [
          "Utilities"
        ],
        "responses": {
          "200": {
            "description": "Metadata for the currently loaded dataset.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaEnvelope"
                },
                "examples": {
                  "live": {
                    "summary": "Real response from GET /v1/meta (taken 2026-09-25). `loaded_at` and the\ncounts move with every load and every data change.\n",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "dataset_version": "e9c25a6",
                        "loaded_at": "2026-09-25T21:04:35.586086+00:00",
                        "counts": {
                          "items": 298,
                          "guides": 308,
                          "aliases": 1312,
                          "systems": 536,
                          "gradings": 83836
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "404": {
            "description": "No metadata row loaded (should not occur in normal operation).",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ]
      }
    },
    "/items/{def_index}/{paint_index}": {
      "get": {
        "operationId": "getItem",
        "summary": "Item and its guide menu",
        "description": "The item, plus a menu of every guide covering it: author, title,\nand each system's id, label, topic, `scale.kind`, level count and\nseed count. No seeds — fetch `/guides/{steam_id}` or\n`/items/{def_index}/{paint_index}/patterns` for those.\n\n`?topic=blue-gem` returns the same shape narrowed to systems\ncarrying that topic, and drops guides left with none. The topic\nvocabulary is not finalized yet (`topic` is `null` on every system\ntoday), so filtering by a topic currently always yields an empty\n`guides: []` rather than the `400` API.md describes for the future,\nfinished vocabulary.\n",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DefIndex"
          },
          {
            "$ref": "#/components/parameters/PaintIndex"
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "description": "Narrow the guide menu to systems carrying this topic. A system\nhas exactly one topic; a guide with systems on several topics\nappears under each, showing only the matching system(s). The\ntopic vocabulary is still open, so every system currently\nreports `topic: null` and any topic value here yields an empty\n`guides: []`.\n",
            "schema": {
              "type": "string"
            },
            "example": "blue-gem"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The item and its guide menu, possibly filtered by topic.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemMenuEnvelope"
                },
                "examples": {
                  "ak47_case_hardened": {
                    "summary": "Real response from GET /v1/items/7/44 (AK-47 Case Hardened, two guides)",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "item": {
                          "def_index": 7,
                          "paint_index": 44,
                          "slug": "ak47-case-hardened",
                          "weapon": "AK-47",
                          "finish": "Case Hardened",
                          "paint_label": "Case Hardened"
                        },
                        "guides": [
                          {
                            "steam_id": "2941982575",
                            "title": "AK-47 Case Hardened | Blue Gem",
                            "authors": [
                              "korenevskiy"
                            ],
                            "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2941982575",
                            "permission": "unknown",
                            "updated": "2026-03-01T13:29:00",
                            "systems": [
                              {
                                "id": "ak47-blue-gem",
                                "label": "AK-47 Blue Gem",
                                "alias": null,
                                "topic": null,
                                "kind": "tier",
                                "levels": 4,
                                "seeds": 97
                              }
                            ]
                          },
                          {
                            "steam_id": "3313951742",
                            "title": "The Complete Gold Gem Patterns Guide",
                            "authors": [
                              "korenevskiy"
                            ],
                            "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=3313951742",
                            "permission": "unknown",
                            "updated": "2026-06-19T17:01:00",
                            "systems": [
                              {
                                "id": "ak47-gold-gem",
                                "label": "Gold Gem Patterns",
                                "alias": null,
                                "topic": null,
                                "kind": "group",
                                "levels": 1,
                                "seeds": 4
                              }
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "unknown_topic": {
                    "summary": "Real response from GET /v1/items/7/44?topic=nonexistent-topic-xyz — 200 with an empty menu, not 400",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "item": {
                          "def_index": 7,
                          "paint_index": 44,
                          "slug": "ak47-case-hardened",
                          "weapon": "AK-47",
                          "finish": "Case Hardened",
                          "paint_label": "Case Hardened"
                        },
                        "guides": []
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "404": {
            "description": "Unknown `def_index`, or a `paint_index` this item does not have.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "not_found": {
                    "summary": "Real response from GET /v1/items/99999/99999",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "error": {
                        "code": "not_found",
                        "message": "no item def 99999 paint 99999"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/guides/{steam_id}": {
      "get": {
        "operationId": "getGuide",
        "summary": "Whole guide, or one of its systems",
        "description": "The guide file exactly as stored in `data/guides/`, unchanged:\nprovenance, every system, every level in order, every seed, with\nthe verbatim quote each grading and definition came from.\n\n`?system={id}` returns the same document with `systems` narrowed to\nthat one system; every other top-level field (`remarks`,\n`item_claims`, `discrepancies`, `callouts`, ...) is returned\nunfiltered, since those are guide-level, not system-level. An\nunknown `system` is `404`.\n",
        "tags": [
          "Guides"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SteamId"
          },
          {
            "name": "system",
            "in": "query",
            "required": false,
            "description": "Narrow the guide to one system, by `system.id`.",
            "schema": {
              "type": "string"
            },
            "example": "ak47-blue-gem"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The guide, or the one system requested.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuideEnvelope"
                },
                "examples": {
                  "filtered_system": {
                    "summary": "Real response from GET /v1/guides/2941982575?system=ak47-blue-gem\n(korenevskiy's AK-47 Blue Gem guide), taken from the app's response.\n`systems[0].gradings` has 97 entries; truncated here to the first 3.\nEvery other field and array is complete.\n",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "steam_id": "2941982575",
                        "schema": "0.5.0",
                        "title": "AK-47 Case Hardened | Blue Gem",
                        "authors": [
                          "korenevskiy"
                        ],
                        "collaborators": 1,
                        "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2941982575",
                        "posted": "2023-03-04T04:00:00",
                        "updated": "2026-03-01T13:29:00",
                        "snapshot": {
                          "path": "sources/2941982575",
                          "retrieved_at": "2026-09-11T09:44:29.010688+00:00",
                          "sha256": "aa15d4cdf6cd970ea4165a4a0cad3dee0873df42a5c6858c2af8e859080e3936"
                        },
                        "permission": "unknown",
                        "permission_quote": "Сopies of this guide will have DMCA complaints",
                        "incomplete": null,
                        "complete": null,
                        "notes": "",
                        "related_guides": [
                          {
                            "steam_id": "3090086681",
                            "quote": "https://steamcommunity.com/sharedfiles/filedetails/?id=3090086681"
                          }
                        ],
                        "remarks": [
                          {
                            "quote": "Patterns with a predominance of yellow are more affordable and common.",
                            "note": "author's price statement about yellow-dominant patterns",
                            "system": "ak47-blue-gem"
                          }
                        ],
                        "item_claims": [
                          {
                            "quote": "The metal parts of the rifle are hardened and coated with blue, yellow and purple stains. The handguard and the buttstock are made of wood. The handle is painted solid brown.",
                            "note": "finish description",
                            "system": null
                          },
                          {
                            "quote": "Float Value of the skin ranges from 0.00 to 1.00, which makes AK-47 | Case Hardened available in all conditions. Traces of wear such as scratches and abrasions do not appear on the body of the weapon even at the highest Float Values. At levels of wear close to the maximum, the metal parts of the rifle are coated with a layer of patina, which makes the skin look much darker.",
                            "note": "float range and wear behaviour",
                            "system": null
                          }
                        ],
                        "callouts": [
                          {
                            "kind": "example",
                            "label": "High Tier",
                            "quote": null,
                            "system": "ak47-blue-gem",
                            "images": [
                              "images/003.jpg",
                              "images/004.jpg",
                              "images/005.jpg",
                              "images/006.jpg",
                              "images/007.jpg",
                              "images/008.jpg"
                            ],
                            "note": "image-only showcase section between '#1' and 'Rank 1'; the six captioned seeds (670, 321, 955, 179, 151, 760) all appear in the Rank 1 text list, so this is a highlighted subset of Rank 1, not a level above it (the prose says patterns are 'divided into three tiers')"
                          }
                        ],
                        "discrepancies": [],
                        "systems": [
                          {
                            "id": "ak47-blue-gem",
                            "label": "AK-47 Blue Gem",
                            "item": "ak47-case-hardened",
                            "paint_indexes": [
                              44
                            ],
                            "definition": {
                              "quote": "The pattern index affects the appearance of the skin as well as its price. Variations of the pattern with a predominance of blue areas on the top of the receiver Blue Top are considered to be the rarest and the most expensive ones. Patterns with a predominance of yellow are more affordable and common."
                            },
                            "scale": {
                              "kind": "tier",
                              "best": 1,
                              "worst": 3,
                              "definition": {
                                "quote": "All other patterns, except for #661 , are divided into three tiers by the amount of blue colour on the weapon finish. But at the same time, this blue is taken into account only on the central part of the gun’s case and the mag. Blue spots on the barrel’s end and the buttstock’s back do not affect the tier."
                              }
                            },
                            "remarks": [],
                            "levels": [
                              {
                                "key": "top",
                                "label": "#1",
                                "images": [
                                  "images/002.jpg"
                                ],
                                "ordered": false,
                                "ordered_quote": null,
                                "definition": {
                                  "quote": "AK-47 Case Hardened with pattern #661 . It got its name in honour of a small yellow stripe on the side. Look, it’s placed just above the gun’s clip. This is an extremely rare skin."
                                }
                              },
                              {
                                "key": "1",
                                "label": "Rank 1",
                                "images": [
                                  "images/009.jpg"
                                ],
                                "ordered": false,
                                "ordered_quote": null
                              },
                              {
                                "key": "2",
                                "label": "Rank 2",
                                "images": [
                                  "images/010.jpg"
                                ],
                                "ordered": false,
                                "ordered_quote": null
                              },
                              {
                                "key": "3",
                                "label": "Rank 3",
                                "images": [
                                  "images/011.jpg"
                                ],
                                "ordered": false,
                                "ordered_quote": null
                              }
                            ],
                            "gradings": [
                              {
                                "seed": 661,
                                "level": "top",
                                "quote": "with pattern #661",
                                "evidence": "caption",
                                "position": 0,
                                "rank": 1,
                                "note": {
                                  "quote": "It got its name in honour of a small yellow stripe on the side. Look, it’s placed just above the gun’s clip. This is an extremely rare skin."
                                }
                              },
                              {
                                "seed": 151,
                                "level": "1",
                                "quote": "151 168 179 321 387 555 592 617 670 760 809 828 955",
                                "evidence": "caption",
                                "position": 0
                              },
                              {
                                "seed": 168,
                                "level": "1",
                                "quote": "151 168 179 321 387 555 592 617 670 760 809 828 955",
                                "evidence": "text",
                                "position": 1
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "404": {
            "description": "Unknown `steam_id`, or an unknown `system` on a known guide.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "unknown_guide": {
                    "summary": "Real response from GET /v1/guides/9999999999",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "error": {
                        "code": "not_found",
                        "message": "no guide 9999999999"
                      }
                    }
                  },
                  "unknown_system": {
                    "summary": "Real response from GET /v1/guides/2941982575?system=nonexistent",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "error": {
                        "code": "not_found",
                        "message": "no system nonexistent in guide 2941982575"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/items/{def_index}/{paint_index}/seeds/{seed}": {
      "get": {
        "operationId": "getSeed",
        "summary": "One seed, every guide's verdict, side by side",
        "description": "Every guide's verdict on one seed of one item, side by side, each\nreported against its own guide's scale — never merged into one\ncross-guide tier. `not_listed` names every system covering the item\nthat has no verdict for this seed, distinguishing \"not listed\" from\n\"not covered\": a system's absence from both `verdicts` and\n`not_listed` means it does not cover this item at all.\n",
        "tags": [
          "Seeds & patterns"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DefIndex"
          },
          {
            "$ref": "#/components/parameters/PaintIndex"
          },
          {
            "$ref": "#/components/parameters/Seed"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Every guide's verdict on this seed, plus the systems that cover the item but don't list it.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeedEnvelope"
                },
                "examples": {
                  "two_guides": {
                    "summary": "Real response from GET /v1/items/507/38/seeds/16 (Karambit Fade, seed graded by\nboth of the item's two Fade guides — the normal case for a multi-guide item).\n",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "item": {
                          "def_index": 507,
                          "paint_index": 38,
                          "slug": "karambit-fade"
                        },
                        "seed": 16,
                        "verdicts": [
                          {
                            "guide": {
                              "steam_id": "2875620478",
                              "title": "The Complete Fade Guide",
                              "authors": [
                                "korenevskiy"
                              ],
                              "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2875620478",
                              "permission": "unknown",
                              "updated": "2026-08-29T16:12:00"
                            },
                            "system": {
                              "id": "karambit-fade",
                              "label": "Fade",
                              "topic": null,
                              "kind": "band"
                            },
                            "level": {
                              "key": "100",
                              "label": "Full Fade",
                              "place": 1,
                              "of": 1
                            },
                            "rank": null,
                            "equivalent_to": null,
                            "value": null,
                            "evidence": "text",
                            "quote": "16, 129, 146, 152, 241, 281, 292, 332, 344, 359, 393, 412 , 541, 602, 628, 649, 673, 688, 701, 743, 777, 792, 918, 994"
                          },
                          {
                            "guide": {
                              "steam_id": "3217178645",
                              "title": "Karambit Knife Fade | Guide",
                              "authors": [
                                "korenevskiy"
                              ],
                              "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=3217178645",
                              "permission": "unknown",
                              "updated": "2026-08-24T08:29:00"
                            },
                            "system": {
                              "id": "karambit-fade",
                              "label": "Fade",
                              "topic": null,
                              "kind": "band"
                            },
                            "level": {
                              "key": "100",
                              "label": "100%",
                              "place": 1,
                              "of": 11
                            },
                            "rank": null,
                            "equivalent_to": null,
                            "value": null,
                            "evidence": "text",
                            "quote": "100% 16 129 146 152 241 281 292 332 344 359 393 412 541 602 628 649 673 688 701 743 777 792 918 994"
                          }
                        ],
                        "not_listed": []
                      }
                    }
                  },
                  "one_guide_not_listed": {
                    "summary": "Real response from GET /v1/items/7/44/seeds/387 (AK-47 Case Hardened — graded by one guide, not listed by the other)",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "item": {
                          "def_index": 7,
                          "paint_index": 44,
                          "slug": "ak47-case-hardened"
                        },
                        "seed": 387,
                        "verdicts": [
                          {
                            "guide": {
                              "steam_id": "2941982575",
                              "title": "AK-47 Case Hardened | Blue Gem",
                              "authors": [
                                "korenevskiy"
                              ],
                              "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2941982575",
                              "permission": "unknown",
                              "updated": "2026-03-01T13:29:00"
                            },
                            "system": {
                              "id": "ak47-blue-gem",
                              "label": "AK-47 Blue Gem",
                              "topic": null,
                              "kind": "tier"
                            },
                            "level": {
                              "key": "1",
                              "label": "Rank 1",
                              "place": 2,
                              "of": 4
                            },
                            "rank": null,
                            "equivalent_to": null,
                            "value": null,
                            "evidence": "text",
                            "quote": "151 168 179 321 387 555 592 617 670 760 809 828 955"
                          }
                        ],
                        "not_listed": [
                          {
                            "steam_id": "3313951742",
                            "system": "ak47-gold-gem"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "404": {
            "description": "Unknown `def_index`, or a `paint_index` this item does not have.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "`seed` outside `0..1000`, or a non-numeric path segment.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "out_of_range": {
                    "summary": "Real response from GET /v1/items/7/44/seeds/1001",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "error": {
                        "code": "bad_request",
                        "message": "seed must be 0..1000"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/items/{def_index}/{paint_index}/patterns": {
      "get": {
        "operationId": "getPatterns",
        "summary": "Every graded seed for the item, in bulk",
        "description": "The bulk twin of `/seeds/{seed}`: every graded seed for the item,\nwith each guide's and system's details (title, authors, levels,\n...) given once rather than repeated per seed. This is what a\nmarketplace overlay fetches once per item page, then uses to look\nup each of possibly hundreds of listings locally.\n\nMeasured 2026-09-25: the median item with a guide is about 250\ngradings, about 30 KB; the largest, M9 Bayonet Crimson Web, is 1,418\ngradings over 2 guides, about 180 KB (uncompressed).\n",
        "tags": [
          "Seeds & patterns"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DefIndex"
          },
          {
            "$ref": "#/components/parameters/PaintIndex"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Every graded seed for the item, guides and systems given once.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatternsEnvelope"
                },
                "examples": {
                  "ak47_truncated": {
                    "summary": "Real response from GET /v1/items/7/44/patterns (AK-47 Case Hardened), truncated:\nthe live response covers 101 seeds and two guides' full level lists; only seeds\n\"387\" and \"661\" are shown here.\n",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "item": {
                          "def_index": 7,
                          "paint_index": 44,
                          "slug": "ak47-case-hardened"
                        },
                        "guides": {
                          "2941982575": {
                            "title": "AK-47 Case Hardened | Blue Gem",
                            "authors": [
                              "korenevskiy"
                            ],
                            "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2941982575",
                            "permission": "unknown",
                            "updated": "2026-03-01T13:29:00",
                            "systems": {
                              "ak47-blue-gem": {
                                "label": "AK-47 Blue Gem",
                                "topic": null,
                                "kind": "tier",
                                "levels": [
                                  {
                                    "key": "top",
                                    "label": "#1"
                                  },
                                  {
                                    "key": "1",
                                    "label": "Rank 1"
                                  },
                                  {
                                    "key": "2",
                                    "label": "Rank 2"
                                  },
                                  {
                                    "key": "3",
                                    "label": "Rank 3"
                                  }
                                ]
                              }
                            }
                          },
                          "3313951742": {
                            "title": "The Complete Gold Gem Patterns Guide",
                            "authors": [
                              "korenevskiy"
                            ],
                            "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=3313951742",
                            "permission": "unknown",
                            "updated": "2026-06-19T17:01:00",
                            "systems": {
                              "ak47-gold-gem": {
                                "label": "Gold Gem Patterns",
                                "topic": null,
                                "kind": "group",
                                "levels": [
                                  {
                                    "key": "gold-gem",
                                    "label": "Gold Gem Patterns"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "seeds": {
                          "387": [
                            {
                              "guide": "2941982575",
                              "system": "ak47-blue-gem",
                              "level": "1",
                              "place": 2,
                              "rank": null,
                              "equivalent_to": null,
                              "value": null
                            }
                          ],
                          "661": [
                            {
                              "guide": "2941982575",
                              "system": "ak47-blue-gem",
                              "level": "top",
                              "place": 1,
                              "rank": 1,
                              "equivalent_to": null,
                              "value": null
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "404": {
            "description": "Unknown `def_index`, or a `paint_index` this item does not have.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/resolve": {
      "get": {
        "operationId": "resolve",
        "summary": "Resolve a slug or market hash name to items",
        "description": "Turns a slug or Steam market hash name into every\n`(def_index, paint_index)` pair it covers, with labels. A slug can\ncover several paint indexes — `karambit-doppler` resolves to Ruby\n(415), Sapphire (416), Black Pearl (417) and all four phases — so\nthis is a list, not a single item. Exactly one of `slug` or\n`market_hash_name` must be given.\n",
        "tags": [
          "Items"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "description": "An item slug, e.g. `karambit-doppler`. Mutually exclusive with `market_hash_name`.",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "example": "karambit-doppler"
          },
          {
            "name": "market_hash_name",
            "in": "query",
            "required": false,
            "description": "A Steam market hash name, e.g. `AK-47 | Case Hardened (Field-Tested)`. Mutually exclusive with `slug`.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Every `(def_index, paint_index)` pair the alias resolves to.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveEnvelope"
                },
                "examples": {
                  "karambit_doppler": {
                    "summary": "Real response from GET /v1/resolve?slug=karambit-doppler",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "items": [
                          {
                            "def_index": 507,
                            "paint_index": 415,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Ruby"
                          },
                          {
                            "def_index": 507,
                            "paint_index": 416,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Sapphire"
                          },
                          {
                            "def_index": 507,
                            "paint_index": 417,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Black Pearl"
                          },
                          {
                            "def_index": 507,
                            "paint_index": 418,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Phase 1"
                          },
                          {
                            "def_index": 507,
                            "paint_index": 419,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Phase 2"
                          },
                          {
                            "def_index": 507,
                            "paint_index": 420,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Phase 3"
                          },
                          {
                            "def_index": 507,
                            "paint_index": 421,
                            "slug": "karambit-doppler",
                            "weapon": "Karambit",
                            "finish": "Doppler",
                            "paint_label": "Phase 4"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "description": "Neither `slug` nor `market_hash_name` was given.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "missing_params": {
                    "summary": "Real response from GET /v1/resolve (no query params)",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "error": {
                        "code": "bad_request",
                        "message": "slug or market_hash_name required"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The slug or market hash name matches no known item.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "`slug` or `market_hash_name` longer than 200 characters.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/dump": {
      "get": {
        "operationId": "getDump",
        "summary": "The whole dataset in one response",
        "description": "Every item and every guide, in one response, for bulk consumers who\nwant to download once instead of crawling the other endpoints.\nCached in full per `dataset_version` and reused for every request\nagainst that version, so this is cheap to call repeatedly as long\nas you send `If-None-Match`.\n\nServed gzip-encoded when `Accept-Encoding` includes `gzip` (the\ncommon case for any HTTP client); otherwise decompressed on the fly\nand served plain. Measured 2026-09-25, across all 298 items and 308\nguides: 30.2 MB uncompressed, 1.3 MB gzip, so let your client\nnegotiate gzip (`curl --compressed`).\n",
        "tags": [
          "Bulk"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          },
          {
            "name": "Accept-Encoding",
            "in": "header",
            "required": false,
            "description": "Include `gzip` to receive a gzip-compressed body with `Content-Encoding: gzip`.",
            "schema": {
              "type": "string"
            },
            "example": "gzip"
          }
        ],
        "responses": {
          "200": {
            "description": "The whole dataset.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "description": "Public cache directive, longer-lived than other endpoints (`public, max-age=3600` as set by the app).",
                "schema": {
                  "type": "string"
                },
                "example": "public, max-age=3600"
              },
              "Vary": {
                "description": "`Accept-Encoding`: the body differs between a gzip and a plain request, so caches key on it. Only `/dump` sends `Vary`.",
                "schema": {
                  "type": "string"
                },
                "example": "Accept-Encoding"
              },
              "Content-Encoding": {
                "description": "`gzip` when the response body is gzip-compressed; absent for a plain response.",
                "schema": {
                  "type": "string"
                },
                "example": "gzip"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DumpEnvelope"
                },
                "examples": {
                  "truncated": {
                    "summary": "Shape of GET /v1/dump (structure from API.md; the live response is 30.2 MB\nuncompressed as of 2026-09-25, so `items` and `guides` are cut to one entry each here).\nThe guide shown is also cut: its one system is left out (`systems` shown\nempty) and `permission_quote`, `complete`, `related_guides`, `remarks`,\n`item_claims` and `callouts` are omitted.\n",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "data": {
                        "items": [
                          {
                            "def_index": 7,
                            "paint_index": 44,
                            "slug": "ak47-case-hardened",
                            "weapon": "AK-47",
                            "finish": "Case Hardened",
                            "paint_label": "Case Hardened"
                          }
                        ],
                        "guides": [
                          {
                            "schema": "0.5.0",
                            "steam_id": "2941982575",
                            "title": "AK-47 Case Hardened | Blue Gem",
                            "authors": [
                              "korenevskiy"
                            ],
                            "collaborators": 1,
                            "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2941982575",
                            "posted": "2023-03-04T04:00:00",
                            "updated": "2026-03-01T13:29:00",
                            "snapshot": {
                              "path": "sources/2941982575",
                              "retrieved_at": "2026-09-11T09:44:29.010688+00:00",
                              "sha256": "aa15d4cdf6cd970ea4165a4a0cad3dee0873df42a5c6858c2af8e859080e3936"
                            },
                            "permission": "unknown",
                            "incomplete": null,
                            "notes": "",
                            "discrepancies": [],
                            "systems": []
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "The caller's `If-None-Match` matches the current `dataset_version`. No body, as on\nevery other endpoint; `Cache-Control` and `Vary` are the same as on the 200.\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "public, max-age=3600"
              },
              "Vary": {
                "description": "Sent on the 304 too, same as the 200: `Accept-Encoding`.",
                "schema": {
                  "type": "string"
                },
                "example": "Accept-Encoding"
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The dump failed to build or decompress. Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "build_failed": {
                    "summary": "Dump build failure (illustrative; not captured live)",
                    "value": {
                      "dataset_version": "e9c25a6",
                      "error": {
                        "code": "internal_error",
                        "message": "failed to build dataset dump"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "DefIndex": {
        "name": "def_index",
        "in": "path",
        "required": true,
        "description": "The item's game definition index (weapon or knife type).",
        "schema": {
          "type": "integer",
          "minimum": 0
        },
        "example": 7
      },
      "PaintIndex": {
        "name": "paint_index",
        "in": "path",
        "required": true,
        "description": "The item's paint index (finish, or one Doppler/gem phase of it).",
        "schema": {
          "type": "integer",
          "minimum": 0
        },
        "example": 44
      },
      "SteamId": {
        "name": "steam_id",
        "in": "path",
        "required": true,
        "description": "The guide's Steam Community sharedfile id.",
        "schema": {
          "type": "string",
          "pattern": "^\\d+$"
        },
        "example": "2941982575"
      },
      "Seed": {
        "name": "seed",
        "in": "path",
        "required": true,
        "description": "A pattern seed / paint seed, 0 to 1000 inclusive.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000
        },
        "example": 387
      },
      "IfNoneMatch": {
        "name": "If-None-Match",
        "in": "header",
        "required": false,
        "description": "A previously-seen `ETag`, sent back as received (the weak `W/\"...\"`\nform a proxy may hand you matches too), or a comma-separated list of\nthem, or `*`. When it matches the current `dataset_version`, the\nserver returns `304 Not Modified` with no body.\n",
        "schema": {
          "type": "string"
        },
        "example": "\"e9c25a6\""
      }
    },
    "headers": {
      "ETag": {
        "description": "The dataset version, quoted: `\"<dataset_version>\"`. Unchanged until a data change or a fix to how responses are derived changes it.",
        "schema": {
          "type": "string"
        },
        "example": "\"e9c25a6\""
      },
      "CacheControl": {
        "description": "Public cache directive for edges and browsers.",
        "schema": {
          "type": "string"
        },
        "example": "public, max-age=300"
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying, on a `429`.",
        "schema": {
          "type": "integer"
        },
        "example": 60
      }
    },
    "responses": {
      "NotModified": {
        "description": "`If-None-Match` matched the current `dataset_version`. No body: reuse the copy you already have.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/ETag"
          },
          "Cache-Control": {
            "$ref": "#/components/headers/CacheControl"
          }
        }
      },
      "ValidationError": {
        "description": "A path or query parameter failed type validation (e.g. a non-numeric `def_index`).",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/ETag"
          },
          "Cache-Control": {
            "$ref": "#/components/headers/CacheControl"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "invalid_parameters": {
                "summary": "Real response from GET /v1/items/abc/44",
                "value": {
                  "dataset_version": "e9c25a6",
                  "error": {
                    "code": "bad_request",
                    "message": "invalid parameters"
                  }
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "More than 1000 requests in the last 60 seconds from this client IP.\nUnlike other error responses, this one carries `Retry-After` (and\nthe CORS headers every response has) but no `ETag` or\n`Cache-Control`. If `Retry-After` is ever missing, wait 60 seconds.\n",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "rate_limited": {
                "summary": "Illustrative (not captured live — the live API was not flooded to produce this)",
                "value": {
                  "dataset_version": "e9c25a6",
                  "error": {
                    "code": "rate_limited",
                    "message": "Too many requests"
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "HealthOk": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          }
        }
      },
      "HealthError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "not_found",
              "bad_request",
              "rate_limited",
              "internal_error"
            ],
            "description": "Machine-readable error code. `not_found` (404): unknown item,\nguide or system. `bad_request` (400 and 422): a missing,\nmalformed or out-of-range parameter. `rate_limited` (429): see\n`Retry-After`. `internal_error` (503): from `/dump` when a\nrebuild or decompression fails, or from any endpoint on an\nunexpected server error. Never cached; safe to retry.\n"
          },
          "message": {
            "type": "string",
            "description": "Human-readable detail. Stable in shape, not a contract to pattern-match on — match `code` instead."
          }
        },
        "example": {
          "code": "not_found",
          "message": "no item def 7 paint 45"
        }
      },
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "error"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "DatasetVersion": {
        "type": "string",
        "description": "Content hash of `data/items`, `data/guides`, `api/rows.py` and\n`api/RESPONSE_VERSION` as loaded, truncated to 7 hex characters.\nNot the commit sha: a data change or a fix to how responses are\nderived (`api/rows.py`, or an `api/app.py` change with a bumped\n`api/RESPONSE_VERSION`) changes it, but a formatting, docs-only or\ninfrastructure-only deploy leaves it unchanged. Matches the\nunquoted `ETag` value.\n",
        "example": "e9c25a6"
      },
      "Permission": {
        "type": "string",
        "enum": [
          "unknown",
          "asked",
          "granted",
          "declined"
        ],
        "description": "Whether the author has granted reuse permission for this guide.\nEvery guide is `\"unknown\"` unless its author has separately agreed;\nno licence is claimed on guide data regardless of this value —\nattribution (author, title, Steam link) is required either way.\n"
      },
      "ScaleKind": {
        "type": "string",
        "enum": [
          "tier",
          "rank",
          "group",
          "sublevel",
          "band"
        ],
        "description": "How a UI should draw the system; never how to read it — order\nalways comes from `levels` position, best first, regardless of\nkind.\n\n| kind | meaning |\n|---|---|\n| tier | numbered levels, 1 best |\n| rank | a strict order, P1..Pn (always has `best`/`worst`) |\n| group | membership only, no order (one level, `best`/`worst` null) |\n| sublevel | named levels without numbers, best first |\n| band | numeric thresholds on a value (e.g. Fade percent bands) |\n"
      },
      "Evidence": {
        "type": "string",
        "enum": [
          "text",
          "caption",
          "image"
        ],
        "description": "Where a grading's seed came from: a text list (`text`), an image\ncaption (`caption`), or an image with no supporting text\n(`image`, only ever recorded after two independent readings agreed).\n"
      },
      "GuideAttribution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "steam_id",
          "title",
          "authors",
          "url",
          "permission",
          "updated"
        ],
        "description": "The attribution every guide block carries, everywhere a guide appears in a response.",
        "properties": {
          "steam_id": {
            "type": "string",
            "pattern": "^\\d+$",
            "description": "The guide's Steam Community sharedfile id."
          },
          "title": {
            "type": "string",
            "description": "The guide's title",
            "as published.": null
          },
          "authors": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Author name(s), with any \"and N collaborators\" byline stripped out."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical Steam Community link to the guide."
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          },
          "updated": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 timestamp of the guide's last edit on Steam, or `null` if Steam reports none."
          }
        },
        "example": {
          "steam_id": "2941982575",
          "title": "AK-47 Case Hardened | Blue Gem",
          "authors": [
            "korenevskiy"
          ],
          "url": "https://steamcommunity.com/sharedfiles/filedetails/?id=2941982575",
          "permission": "unknown",
          "updated": "2026-03-01T13:29:00"
        }
      },
      "Item": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "def_index",
          "paint_index",
          "slug",
          "weapon",
          "finish",
          "paint_label"
        ],
        "description": "Identity of one `(def_index, paint_index)` pair.",
        "properties": {
          "def_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Game definition index (weapon or knife type)."
          },
          "paint_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Paint index (finish",
            "or one phase of it).": null
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "description": "Item slug. May be shared by several paint indexes (e.g. all `karambit-doppler` phases), so a slug alone is not a query key."
          },
          "weapon": {
            "type": "string",
            "description": "Weapon or knife name, e.g. \"AK-47\", \"Karambit\"."
          },
          "finish": {
            "type": "string",
            "description": "Finish family name, e.g. \"Case Hardened\", \"Doppler\"."
          },
          "paint_label": {
            "type": "string",
            "description": "This paint index's own label within the finish, e.g. \"Phase 2\", \"Ruby\", or the finish name again for a single-paint item."
          }
        },
        "example": {
          "def_index": 7,
          "paint_index": 44,
          "slug": "ak47-case-hardened",
          "weapon": "AK-47",
          "finish": "Case Hardened",
          "paint_label": "Case Hardened"
        }
      },
      "ItemRef": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "def_index",
          "paint_index",
          "slug"
        ],
        "description": "The reduced item identity used inside `/seeds/{seed}` and\n`/patterns` responses (no `weapon`/`finish`/`paint_label` — fetch\n`/items/{def_index}/{paint_index}` for those).\n",
        "properties": {
          "def_index": {
            "type": "integer",
            "minimum": 0
          },
          "paint_index": {
            "type": "integer",
            "minimum": 0
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        },
        "example": {
          "def_index": 7,
          "paint_index": 44,
          "slug": "ak47-case-hardened"
        }
      },
      "GuideMenuSystem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "alias",
          "topic",
          "kind",
          "levels",
          "seeds"
        ],
        "description": "One system's summary, as listed in an item's guide menu.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The system's id, unique within its guide. Use with `/guides/{steam_id}?system=` or as the `system` key in `/patterns`."
          },
          "label": {
            "type": "string",
            "description": "The author's own name for the system."
          },
          "alias": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Other names this same author gives this same system, verbatim, if any."
          },
          "topic": {
            "type": [
              "string",
              "null"
            ],
            "description": "The shared vocabulary word for what this system ranks (e.g. \"blue-gem\"). `null` until the topic vocabulary lands; every system reports `null` today."
          },
          "kind": {
            "$ref": "#/components/schemas/ScaleKind"
          },
          "levels": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of levels in this system's scale."
          },
          "seeds": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of distinct seeds graded in this system."
          }
        },
        "example": {
          "id": "ak47-blue-gem",
          "label": "AK-47 Blue Gem",
          "alias": null,
          "topic": null,
          "kind": "tier",
          "levels": 4,
          "seeds": 97
        }
      },
      "GuideMenuEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "steam_id",
          "title",
          "authors",
          "url",
          "permission",
          "updated",
          "systems"
        ],
        "description": "One guide's entry in an item's guide menu — attribution plus the systems it carries for this item.",
        "properties": {
          "steam_id": {
            "type": "string",
            "pattern": "^\\d+$",
            "description": "The guide's Steam Community sharedfile id."
          },
          "title": {
            "type": "string",
            "description": "The guide's title",
            "as published.": null
          },
          "authors": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Author name(s), with any \"and N collaborators\" byline stripped out."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical Steam Community link to the guide."
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          },
          "updated": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 timestamp of the guide's last edit on Steam, or `null` if Steam reports none."
          },
          "systems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuideMenuSystem"
            },
            "description": "This guide's systems that cover the item (narrowed further by `?topic=` when given)."
          }
        }
      },
      "ItemMenu": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "item",
          "guides"
        ],
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Item"
          },
          "guides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuideMenuEntry"
            },
            "description": "Every guide covering this item (narrowed by `?topic=` when given); a guide left with no matching system is dropped entirely."
          }
        }
      },
      "ItemMenuEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/ItemMenu"
          }
        }
      },
      "MetaCounts": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "guides",
          "aliases",
          "systems",
          "gradings"
        ],
        "properties": {
          "items": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of `(def_index",
            "paint_index)` pairs": null,
            "not item files.": null
          },
          "guides": {
            "type": "integer",
            "minimum": 0
          },
          "aliases": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of slug and market-hash-name aliases resolvable via `/resolve`."
          },
          "systems": {
            "type": "integer",
            "minimum": 0
          },
          "gradings": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "Meta": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "loaded_at",
          "counts"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "loaded_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this dataset version was loaded into the serving database."
          },
          "counts": {
            "$ref": "#/components/schemas/MetaCounts"
          }
        }
      },
      "MetaEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "SeedSystemRef": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "topic",
          "kind"
        ],
        "description": "A system, as referenced from a seed verdict.",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/ScaleKind"
          }
        }
      },
      "SeedLevelRef": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "label",
          "place",
          "of"
        ],
        "description": "The level a seed was placed in, within its own system's own list.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Opaque level identifier",
            "never an ordinal.": null
          },
          "label": {
            "type": "string",
            "description": "The author's own label for the level",
            "as written.": null
          },
          "place": {
            "type": "integer",
            "minimum": 1,
            "description": "1-based position in this system's own level list, best first."
          },
          "of": {
            "type": "integer",
            "minimum": 1,
            "description": "Total number of levels in this system's list. `place`/`of` together read as \"2nd of 4\"."
          }
        }
      },
      "GradingValue": {
        "type": [
          "object",
          "null"
        ],
        "description": "A named measurement the author wrote beside this entry (e.g. a Fade percent), or `null`.",
        "additionalProperties": false,
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "e.g. \"fade_pct\", \"blue_pct\", \"white_pct\"."
          },
          "value": {
            "type": "number"
          }
        },
        "example": {
          "name": "fade_pct",
          "value": 97.0
        }
      },
      "SeedVerdict": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "guide",
          "system",
          "level",
          "rank",
          "equivalent_to",
          "value",
          "evidence",
          "quote"
        ],
        "description": "One seed in one system of one guide.",
        "properties": {
          "guide": {
            "$ref": "#/components/schemas/GuideAttribution"
          },
          "system": {
            "$ref": "#/components/schemas/SeedSystemRef"
          },
          "level": {
            "$ref": "#/components/schemas/SeedLevelRef"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The author's explicit rank within the level (e.g. Phoenix Blacklight's \"P1\"), else `null`."
          },
          "equivalent_to": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            },
            "description": "Seed(s) the author explicitly calls one and the same thing as this one, else `null`. Never widened to mere resemblance."
          },
          "value": {
            "$ref": "#/components/schemas/GradingValue"
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "quote": {
            "type": "string",
            "description": "The verbatim span this grading was extracted from."
          }
        }
      },
      "SeedNotListed": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "steam_id",
          "system"
        ],
        "description": "A system that covers the item but has no verdict for this seed.",
        "properties": {
          "steam_id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "system": {
            "type": "string"
          }
        },
        "example": {
          "steam_id": "3313951742",
          "system": "ak47-gold-gem"
        }
      },
      "Seed": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "item",
          "seed",
          "verdicts",
          "not_listed"
        ],
        "properties": {
          "item": {
            "$ref": "#/components/schemas/ItemRef"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "verdicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeedVerdict"
            },
            "description": "One entry per guide-system that grades this seed. A seed listed twice within one system (a recorded `duplicate_seed`) produces two entries here — nothing is deduplicated."
          },
          "not_listed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeedNotListed"
            }
          }
        }
      },
      "SeedEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/Seed"
          }
        }
      },
      "PatternsLevelRef": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "label"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "PatternsSystem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "label",
          "topic",
          "kind",
          "levels"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/ScaleKind"
          },
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatternsLevelRef"
            },
            "description": "This system's full level list, best first, given once for the whole response."
          }
        }
      },
      "PatternsGuide": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "authors",
          "url",
          "permission",
          "updated",
          "systems"
        ],
        "description": "One guide's details, given once and referenced by `steam_id` from every seed's verdicts.",
        "properties": {
          "title": {
            "type": "string"
          },
          "authors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          },
          "updated": {
            "type": [
              "string",
              "null"
            ]
          },
          "systems": {
            "type": "object",
            "description": "Map of `system_id` -> system details, for every system of this guide that covers the item.",
            "additionalProperties": {
              "$ref": "#/components/schemas/PatternsSystem"
            }
          }
        }
      },
      "PatternsVerdict": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "guide",
          "system",
          "level",
          "place",
          "rank",
          "equivalent_to",
          "value"
        ],
        "description": "One seed's grading in the bulk `/patterns` shape — guide and system given as id references into `data.guides`, not inlined.",
        "properties": {
          "guide": {
            "type": "string",
            "description": "`steam_id`, key into `data.guides`."
          },
          "system": {
            "type": "string",
            "description": "`system_id`, key into `data.guides[guide].systems`."
          },
          "level": {
            "type": "string",
            "description": "Level key; look up its label in `data.guides[guide].systems[system].levels`."
          },
          "place": {
            "type": "integer",
            "minimum": 1
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "equivalent_to": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            }
          },
          "value": {
            "$ref": "#/components/schemas/GradingValue"
          }
        }
      },
      "Patterns": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "item",
          "guides",
          "seeds"
        ],
        "properties": {
          "item": {
            "$ref": "#/components/schemas/ItemRef"
          },
          "guides": {
            "type": "object",
            "description": "Map of `steam_id` -> guide and system details, for every guide covering the item.",
            "additionalProperties": {
              "$ref": "#/components/schemas/PatternsGuide"
            }
          },
          "seeds": {
            "type": "object",
            "description": "Map of seed number (as a string key) -> every verdict on that seed. A known item with no covering guide reports `seeds: {}`.",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PatternsVerdict"
              }
            }
          }
        }
      },
      "PatternsEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/Patterns"
          }
        }
      },
      "Resolve": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "Every `(def_index, paint_index)` pair this slug or market hash name resolves to."
          }
        }
      },
      "ResolveEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/Resolve"
          }
        }
      },
      "Dump": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "guides"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            }
          },
          "guides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Guide"
            },
            "description": "Every guide, each exactly as `GET /guides/{steam_id}` returns it."
          }
        }
      },
      "DumpEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/Dump"
          }
        }
      },
      "Quoted": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quote"
        ],
        "description": "A verbatim span from the guide's frozen snapshot.",
        "properties": {
          "quote": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "Snapshot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "path",
          "retrieved_at",
          "sha256"
        ],
        "description": "Provenance of the frozen snapshot this guide was transcribed from. Snapshots are immutable; a re-fetch is a versioned subfolder, never an overwrite.",
        "properties": {
          "path": {
            "type": "string",
            "description": "Repo-relative path, e.g. \"sources/2941982575\"."
          },
          "retrieved_at": {
            "type": "string",
            "description": "ISO 8601 timestamp of the fetch."
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "RelatedGuide": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "steam_id",
          "quote"
        ],
        "description": "A companion guide this one links to. Linking never reconciles the two guides' gradings, here or anywhere else.",
        "properties": {
          "steam_id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "quote": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "Remark": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quote"
        ],
        "description": "An author statement — licensing, update promise, comparison — that isn't a system definition or an item claim.",
        "properties": {
          "quote": {
            "type": "string",
            "minLength": 1
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "description": "Our gloss on why this was recorded",
            "never guide text.": null
          },
          "system": {
            "type": [
              "string",
              "null"
            ],
            "description": "The system this remark is scoped to, or `null` for a guide-wide remark."
          }
        }
      },
      "ItemClaim": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quote"
        ],
        "description": "A fact the guide's author asserts about the item itself (finish\ndescription, float behaviour, a naming claim) rather than about\nthe author's own ranking of it. Stored verbatim, never\nauto-applied — identity always comes from `data/items`, never from\na guide.\n",
        "properties": {
          "quote": {
            "type": "string",
            "minLength": 1
          },
          "note": {
            "type": "string",
            "minLength": 1
          },
          "system": {
            "type": [
              "string",
              "null"
            ]
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "description": "A name the author claims for the finish, e.g. \"Marble Fade\"."
          }
        }
      },
      "CompletenessClaim": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "description": "The author's own completeness claim for the guide, a system, or a\ncallout — one quote, present only when the author made the claim.\n`complete` and `incomplete` are independent fields (both may be\n`null`); together they decide what \"not listed\" means for that\nscope.\n",
        "required": [
          "quote"
        ],
        "properties": {
          "quote": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "GuideLevelBest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "seed",
          "quote"
        ],
        "properties": {
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "quote": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "UnverifiedReading": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "image",
          "seed"
        ],
        "description": "An image-only seed reading not yet confirmed by a second independent read.",
        "properties": {
          "image": {
            "type": "string",
            "minLength": 1
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          }
        }
      },
      "GuideLevel": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "label",
          "ordered"
        ],
        "description": "A named place in a system's scale, in the guide's order (best\nfirst — position in the array is the only ordering signal;\n`key` is opaque and never an ordinal).\n",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "description": "The author's own label",
            "as written.": null
          },
          "definition": {
            "$ref": "#/components/schemas/Quoted"
          },
          "ordered": {
            "type": "boolean",
            "description": "Whether the guide states that seeds within this level are themselves ranked."
          },
          "ordered_quote": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sentence `ordered` was read from, whichever way it reads. Present whenever `ordered` was decided from text."
          },
          "best": {
            "$ref": "#/components/schemas/GuideLevelBest"
          },
          "best_seeds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            },
            "description": "Every seed named in `best.quote`, in order; `best.seed` is `best_seeds[0]`. Present whenever `best` is."
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "gradings": {
            "type": "null",
            "description": "Present and always `null`; marks an image-only level. The level's actual gradings live in the system's flat `gradings` array, evidenced `image` or `caption`."
          },
          "unverified_readings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnverifiedReading"
            }
          }
        }
      },
      "Grading": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "seed",
          "level",
          "quote"
        ],
        "description": "One seed under one system.",
        "properties": {
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "level": {
            "type": "string",
            "minLength": 1,
            "description": "The level's `key`."
          },
          "rank": {
            "type": "integer",
            "minimum": 1,
            "description": "The author's explicit rank, from the guide's top-level ranked list or an interleaved ordinal span. See `rank_scope`."
          },
          "rank_scope": {
            "type": "string",
            "enum": [
              "level",
              "guide"
            ],
            "description": "Scope `rank` was assigned at. `level`: from an ordinal\nwritten inside one level's own span (\"#1 37 #2 753\"), so the\nrank compares only within that level. Absent (guide-scope):\nfrom the guide's top-level ranked list, and comparable\nacross the whole guide — only valid when the seed is graded\nin exactly one level.\n"
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "description": "Index of this seed within its quoted span",
            "for bare ordered lists (e.g. Solitude).": null
          },
          "equivalent_to": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            },
            "description": "Seed(s) the author explicitly calls one and the same thing as this one."
          },
          "value": {
            "$ref": "#/components/schemas/GradingValue"
          },
          "note": {
            "$ref": "#/components/schemas/Quoted"
          },
          "quote": {
            "type": [
              "string",
              "null"
            ],
            "description": "The verbatim span this grading was extracted from; `null` only for an image-only grading with no caption text."
          },
          "image": {
            "type": "string",
            "minLength": 1,
            "description": "Image file this grading's evidence came from",
            "when `evidence` is `caption` or `image`.": null
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          }
        }
      },
      "Callout": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "label"
        ],
        "description": "Something outside the scale — an exclusion, an illustrative example, a mention — kept separate from gradings.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "exclusion",
              "mention",
              "common",
              "example"
            ],
            "description": "`exclusion`: the author's explicit negatives (\"fake diamond\").\n`example`: illustrates a category, real-vs-fake. `mention`:\nan honorable mention, outside the scale. `common`: a baseline\n\"common patterns\" section, image-only.\n"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "quote": {
            "type": [
              "string",
              "null"
            ]
          },
          "system": {
            "type": [
              "string",
              "null"
            ],
            "description": "System this callout belongs to",
            "or `null` when author-unassigned.": null
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "note": {
            "type": "string",
            "minLength": 1
          },
          "definition": {
            "$ref": "#/components/schemas/Quoted"
          },
          "incomplete": {
            "$ref": "#/components/schemas/CompletenessClaim"
          },
          "complete": {
            "$ref": "#/components/schemas/CompletenessClaim"
          }
        }
      },
      "GuideSystemScale": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ScaleKind"
          },
          "best": {
            "type": "integer",
            "description": "Best-scoring bound. Always present for `rank`; present for others only when the guide states bounds; absent (never present) for `group`."
          },
          "worst": {
            "type": "integer",
            "description": "Worst-scoring bound. Same presence rule as `best`."
          },
          "definition": {
            "$ref": "#/components/schemas/Quoted"
          }
        }
      },
      "StatedCount": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "quote"
        ],
        "description": "The count the author states for a system, kept alongside the count actually found (see `count_mismatch` discrepancies) rather than reconciled.",
        "properties": {
          "value": {
            "type": "integer",
            "minimum": 0
          },
          "quote": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "GuideSystem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "item",
          "paint_indexes",
          "scale",
          "levels",
          "gradings"
        ],
        "description": "One ranking dimension from this guide, about one target — the full internal representation returned inside a `Guide` document.",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Unique within the guide."
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "description": "The author's own name for the system."
          },
          "alias": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Other names this same author gives this same system, verbatim."
          },
          "item": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "description": "`data/items` slug this system targets."
          },
          "paint_indexes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "minItems": 1,
            "description": "A subset of the item's paint indexes this system narrows to, or `null` for all of them."
          },
          "definition": {
            "$ref": "#/components/schemas/Quoted"
          },
          "scale": {
            "$ref": "#/components/schemas/GuideSystemScale"
          },
          "stated_count": {
            "$ref": "#/components/schemas/StatedCount"
          },
          "incomplete": {
            "$ref": "#/components/schemas/CompletenessClaim"
          },
          "complete": {
            "$ref": "#/components/schemas/CompletenessClaim"
          },
          "remarks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "$ref": "#/components/schemas/Remark"
                }
              ]
            }
          },
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuideLevel"
            },
            "description": "Ordered best first. A `group` system has exactly one level, keyed with the author's own section name."
          },
          "gradings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Grading"
            }
          }
        }
      },
      "DiscrepancyDuplicateSeed": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "seed",
          "where"
        ],
        "description": "A seed listed twice — within a system, or across two — kept as two gradings rather than deduplicated.",
        "properties": {
          "kind": {
            "type": "string",
            "const": "duplicate_seed"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "where": {
            "type": "array",
            "minItems": 2,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "`system:level` locations the seed appears in."
          }
        }
      },
      "DiscrepancyCountMismatch": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "system",
          "stated",
          "found"
        ],
        "description": "The author's stated count for a system doesn't match the count actually transcribed.",
        "properties": {
          "kind": {
            "type": "string",
            "const": "count_mismatch"
          },
          "system": {
            "type": "string",
            "minLength": 1
          },
          "stated": {
            "type": "integer",
            "minimum": 0
          },
          "found": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "DiscrepancyUnparseable": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "quote",
          "system"
        ],
        "description": "A quoted span that could not be turned into seed(s).",
        "properties": {
          "kind": {
            "type": "string",
            "const": "unparseable"
          },
          "quote": {
            "type": "string",
            "minLength": 1
          },
          "system": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "DiscrepancyProseContradiction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "quote_a",
          "quote_b"
        ],
        "description": "Two spans in the same guide that contradict each other, neither corrected.",
        "properties": {
          "kind": {
            "type": "string",
            "const": "prose_contradiction"
          },
          "quote_a": {
            "type": "string",
            "minLength": 1
          },
          "quote_b": {
            "type": "string",
            "minLength": 1
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "DiscrepancyCaptionVsList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "seed",
          "quote_caption"
        ],
        "description": "An image caption shows a seed under a different level than its text list does.",
        "properties": {
          "kind": {
            "type": "string",
            "const": "caption_vs_list"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "quote_caption": {
            "type": "string",
            "minLength": 1
          },
          "listed_under": {
            "type": [
              "string",
              "null"
            ]
          },
          "shown_under": {
            "type": "string",
            "minLength": 1
          },
          "quote_list": {
            "type": "string",
            "minLength": 1
          },
          "nearest_level": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "DiscrepancyCaptionUnlisted": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "seed",
          "quote_caption",
          "graded_under"
        ],
        "description": "A seed shown and labelled in an image, graded under that image's level, but never written in any text list.",
        "properties": {
          "kind": {
            "type": "string",
            "const": "caption_unlisted"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "quote_caption": {
            "type": "string",
            "minLength": 1
          },
          "graded_under": {
            "type": "string",
            "minLength": 1
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "DiscrepancyImageReused": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "image",
          "captions"
        ],
        "description": "One image file (byte-identical) captioned with two different seeds elsewhere in the guide. The text lists decide gradings; nothing is added, removed or moved because of this.",
        "properties": {
          "kind": {
            "type": "string",
            "const": "image_reused"
          },
          "image": {
            "type": "string",
            "minLength": 1
          },
          "captions": {
            "type": "array",
            "minItems": 2,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "seed",
                "quote_caption"
              ],
              "properties": {
                "seed": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000
                },
                "quote_caption": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "Discrepancy": {
        "description": "An internal inconsistency in the guide — a stated count that\ndoesn't match, a seed listed twice, a typo, two contradicting\nsentences — recorded rather than silently corrected. See\n`kind` for which shape applies.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DiscrepancyDuplicateSeed"
          },
          {
            "$ref": "#/components/schemas/DiscrepancyCountMismatch"
          },
          {
            "$ref": "#/components/schemas/DiscrepancyUnparseable"
          },
          {
            "$ref": "#/components/schemas/DiscrepancyProseContradiction"
          },
          {
            "$ref": "#/components/schemas/DiscrepancyCaptionVsList"
          },
          {
            "$ref": "#/components/schemas/DiscrepancyCaptionUnlisted"
          },
          {
            "$ref": "#/components/schemas/DiscrepancyImageReused"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "duplicate_seed": "#/components/schemas/DiscrepancyDuplicateSeed",
            "count_mismatch": "#/components/schemas/DiscrepancyCountMismatch",
            "unparseable": "#/components/schemas/DiscrepancyUnparseable",
            "prose_contradiction": "#/components/schemas/DiscrepancyProseContradiction",
            "caption_vs_list": "#/components/schemas/DiscrepancyCaptionVsList",
            "caption_unlisted": "#/components/schemas/DiscrepancyCaptionUnlisted",
            "image_reused": "#/components/schemas/DiscrepancyImageReused"
          }
        }
      },
      "UnassignedReview": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "reviewed_by",
          "reviewed_at",
          "count"
        ],
        "description": "Record that every unassigned number in this guide's snapshot was classified during transcription.",
        "properties": {
          "reviewed_by": {
            "type": "string",
            "minLength": 1
          },
          "reviewed_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "Guide": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "steam_id",
          "title",
          "authors",
          "url",
          "posted",
          "updated",
          "snapshot",
          "permission",
          "incomplete",
          "notes",
          "systems",
          "discrepancies"
        ],
        "description": "The whole guide, exactly as stored in `data/guides/<steam-id>.json`\nand returned unchanged by `GET /guides/{steam_id}`. Contradictions,\ntypos and mismatched counts are kept, never silently fixed — see\n`discrepancies`.\n",
        "properties": {
          "schema": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+$",
            "description": "CONVENTIONS.md facet-registry version this file was written against."
          },
          "steam_id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "title": {
            "type": "string"
          },
          "authors": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "collaborators": {
            "type": "integer",
            "minimum": 0,
            "description": "Count from a trailing \"and N collaborators\" byline",
            "stripped out of `authors`.": null
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "posted": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO date or date-time the guide was posted, or `null`."
          },
          "updated": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO date or date-time of the guide's last edit, or `null`."
          },
          "snapshot": {
            "$ref": "#/components/schemas/Snapshot"
          },
          "permission": {
            "$ref": "#/components/schemas/Permission"
          },
          "permission_quote": {
            "type": [
              "string",
              "null"
            ],
            "description": "The author's own reuse statement, verbatim, if any."
          },
          "incomplete": {
            "$ref": "#/components/schemas/CompletenessClaim"
          },
          "complete": {
            "$ref": "#/components/schemas/CompletenessClaim"
          },
          "related_guides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedGuide"
            }
          },
          "remarks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "$ref": "#/components/schemas/Remark"
                }
              ]
            }
          },
          "item_claims": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "$ref": "#/components/schemas/ItemClaim"
                }
              ]
            }
          },
          "notes": {
            "type": "string",
            "description": "Our notes; never guide text."
          },
          "systems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuideSystem"
            }
          },
          "callouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Callout"
            }
          },
          "discrepancies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Discrepancy"
            }
          },
          "unassigned_review": {
            "$ref": "#/components/schemas/UnassignedReview"
          }
        }
      },
      "GuideEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dataset_version",
          "data"
        ],
        "properties": {
          "dataset_version": {
            "$ref": "#/components/schemas/DatasetVersion"
          },
          "data": {
            "$ref": "#/components/schemas/Guide"
          }
        }
      }
    }
  }
}
