# Fingerprints

## Generate a new fingerprint (host OS)

`GET /fingerprint/new`

```json
{
  "tags": [
    "Fingerprints"
  ],
  "summary": "Generate a new fingerprint (host OS)",
  "description": "Returns a fully uniquified fingerprint for the **host** operating system, without persisting it. Equivalent to `/fingerprint/new/{platform}` with the launcher host's platform.",
  "responses": {
    "200": {
      "description": "A uniquified, unsaved fingerprint.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FingerprintEnvelope"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "description": "The fingerprint library is empty.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

## Generate a new fingerprint for a platform

`GET /fingerprint/new/{platform}`

```json
{
  "tags": [
    "Fingerprints"
  ],
  "summary": "Generate a new fingerprint for a platform",
  "description": "Picks a random library fingerprint matching `platform`, then uniquifies it: a fresh Sec-CH-UA `platform_version`, host-aware `hardware_concurrency`/`device_memory` (never claims more than the real machine), and a screen clamped to the real display. Returned unsaved; feed it to a create endpoint as `fingerprint`.",
  "parameters": [
    {
      "name": "platform",
      "in": "path",
      "required": true,
      "description": "Case-insensitive; `win`/`osx`/`darwin` aliases accepted.",
      "schema": {
        "type": "string",
        "enum": [
          "Windows",
          "macOS",
          "Linux"
        ]
      }
    }
  ],
  "responses": {
    "200": {
      "description": "A uniquified, unsaved fingerprint.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FingerprintEnvelope"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "description": "No matching fingerprint and the library is empty.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

## List library fingerprints

`GET /fingerprints`

```json
{
  "tags": [
    "Fingerprints"
  ],
  "summary": "List library fingerprints",
  "description": "The on-disk fingerprint library (GPU presets) the launcher ships/imports.",
  "responses": {
    "200": {
      "description": "Library entries.",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibraryEntry"
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  }
}
```
