{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatapi/json-schema/beatapi-api-key-list-response-schema.json",
  "title": "ApiKeyListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatapi-account-api-openapi.yml#/components/schemas/ApiKeyListResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "object",
        "data",
        "has_more"
      ],
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "list"
          ]
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApiKey"
          }
        },
        "has_more": {
          "type": "boolean"
        },
        "next_cursor": {
          "type": "string",
          "description": "Pass as `cursor` to read the next page; absent on the last page."
        }
      }
    }
  },
  "$defs": {
    "ApiKey": {
      "type": "object",
      "required": [
        "object",
        "id",
        "title",
        "key_prefix",
        "status",
        "created_at",
        "last_used_at",
        "expires_at",
        "remaining_credits",
        "credits_used",
        "models",
        "allowed_ips"
      ],
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "api_key"
          ]
        },
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "key_prefix": {
          "type": "string",
          "description": "The first characters of the key. The full key is never returned here."
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "disabled",
            "expired",
            "exhausted"
          ]
        },
        "created_at": {
          "type": "integer",
          "description": "Unix seconds."
        },
        "last_used_at": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix seconds; `null` while unused."
        },
        "expires_at": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix seconds; `null` for a key that never expires."
        },
        "remaining_credits": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Spending left in USD; `null` for unlimited."
        },
        "credits_used": {
          "type": "number",
          "format": "double",
          "description": "USD spent through this key."
        },
        "models": {
          "type": "array",
          "description": "Public model IDs the key may call; empty means every model.",
          "items": {
            "type": "string"
          }
        },
        "allowed_ips": {
          "type": "array",
          "description": "IP addresses allowed to use the key; empty means any.",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}