{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craterview-ai/json-schema/craterview-ai-key-info-schema.json",
  "title": "KeyInfo",
  "description": "One key on the account. Never the key itself — see `NewKey` for the one response\nthat carries a usable value.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craterview-ai-openapi.json#/components/schemas/KeyInfo",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Identifies this key, for revoking it. Not the key itself."
    },
    "prefix": {
      "type": "string",
      "title": "Prefix",
      "description": "The first few characters, which identify a key without authorizing anything. It is what a listing can show and what to match against your own records."
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "The label given when it was created."
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At",
      "description": "When the key was issued. ISO-8601, UTC."
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Revoked At",
      "description": "When this key stopped working; absent while it still works. A revoked key is kept so a listing can explain a client that started failing."
    },
    "rate_limit_per_minute": {
      "type": "integer",
      "title": "Rate Limit Per Minute",
      "description": "Requests a minute this key may make before it is throttled."
    },
    "current": {
      "type": "boolean",
      "title": "Current",
      "description": "Whether this is the key that authenticated this request. It cannot be revoked by id while it is the one you are calling with; `DELETE /v1/keys/current` ends it on request, unless it is the account's only way back in."
    }
  },
  "type": "object",
  "required": [
    "id",
    "prefix",
    "name",
    "rate_limit_per_minute",
    "current"
  ]
}