{
  "openapi": "3.1.0",
  "info": {
    "title": "Brume API",
    "summary": "Swiss-Hosted Zero-Persistence Anonymisation & Visual Redaction API",
    "description": "Sovereign privacy API hosted exclusively in Switzerland (FADP / GDPR Art. 45 adequate). Anonymise text, chat messages, PDFs, DOCX documents, and images with true glyph/pixel visual redaction and zero-persistence AES-256-GCM `vault_token` restoration.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.brumelabs.ai",
      "description": "Switzerland Production (Geneva / Zurich)"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Health",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/anonymise": {
      "post": {
        "tags": [
          "Anonymisation"
        ],
        "summary": "Anonymise text or chat messages",
        "description": "Anonymises plain text or structured multi-turn `messages` in Switzerland with zero persistence. Returns anonymised content and an opaque AES-256-GCM `vault_token` (or opt-in RAM `session_id`) for free restoration via `/v1/deanonymise`.",
        "operationId": "anonymise_json_v1_anonymise_post",
        "parameters": [
          {
            "name": "x-brume-vault-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional client-supplied BYOK secret mixed into AES-256-GCM vault encryption.",
              "title": "X-Brume-Vault-Key"
            },
            "description": "Optional client-supplied BYOK secret mixed into AES-256-GCM vault encryption."
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnonymiseJsonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnonymiseResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/anonymise/file": {
      "post": {
        "tags": [
          "Anonymisation"
        ],
        "summary": "Anonymise & visually redact PDF, DOCX, or Image files",
        "description": "Upload a PDF (digital or scanned), DOCX, or image (PNG/JPG/WebP) via `multipart/form-data`. Performs true glyph-level PDF content-stream redaction or pixel-level OCR image redaction and strips file metadata. Set `output_format=file` to receive the raw binary file directly (with `X-Brume-Vault-Token` in headers), `text` for extracted anonymised text only, or `both` (JSON).",
        "operationId": "anonymise_file_v1_anonymise_file_post",
        "parameters": [
          {
            "name": "x-brume-vault-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Brume-Vault-Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_anonymise_file_v1_anonymise_file_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnonymiseResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deanonymise": {
      "post": {
        "tags": [
          "De-anonymisation"
        ],
        "summary": "Restore placeholders using a vault_token or session_id (Free)",
        "description": "Decrypts your `vault_token` (or reads your ephemeral Swiss RAM `session_id`), restores all matching Brume placeholders in RAM, and discards all data immediately. De-anonymisation is free across all API plans.",
        "operationId": "deanonymise_v1_deanonymise_post",
        "parameters": [
          {
            "name": "x-brume-vault-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Brume-Vault-Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeanonymiseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeanonymiseResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deanonymise/stream": {
      "post": {
        "tags": [
          "De-anonymisation"
        ],
        "summary": "Stream-restore chunked text over Server-Sent Events (Free)",
        "description": "Accepts ordered text chunks (e.g. streamed LLM outputs) and emits SSE `data` events with boundary-safe placeholder restoration so split `[PERSON_1]` tags never leak.",
        "operationId": "deanonymise_stream_v1_deanonymise_stream_post",
        "parameters": [
          {
            "name": "x-brume-vault-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Brume-Vault-Key"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeanonymiseStreamRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/specializations": {
      "get": {
        "tags": [
          "Specializations"
        ],
        "summary": "List official & custom Example Studio specializations",
        "operationId": "list_specializations_v1_specializations_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpecializationsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{session_id}": {
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Immediately wipe an ephemeral RAM session",
        "operationId": "delete_session_v1_sessions__session_id__delete",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDeleteResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get current billing-period API usage",
        "operationId": "get_usage_v1_usage_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSummaryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AnonymisationStats": {
        "properties": {
          "entities_protected": {
            "type": "integer",
            "title": "Entities Protected",
            "description": "Total sensitive spans protected."
          },
          "unique_keys": {
            "type": "integer",
            "title": "Unique Keys",
            "description": "Unique replacement keys in the restoration vault."
          },
          "entity_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Entity Counts",
            "description": "Breakdown of protected entities by category."
          },
          "detected_language": {
            "type": "string",
            "title": "Detected Language",
            "description": "Auto-detected ISO 639-1 document language."
          },
          "chars_processed": {
            "type": "integer",
            "title": "Chars Processed",
            "description": "Total input characters processed."
          },
          "pages_processed": {
            "type": "integer",
            "title": "Pages Processed",
            "description": "Total document/image pages processed.",
            "default": 0
          },
          "latency_ms": {
            "type": "integer",
            "title": "Latency Ms",
            "description": "Processing latency inside Switzerland in milliseconds."
          },
          "region": {
            "type": "string",
            "title": "Region",
            "description": "Swiss processing region identifier."
          }
        },
        "type": "object",
        "required": [
          "entities_protected",
          "unique_keys",
          "detected_language",
          "chars_processed",
          "latency_ms",
          "region"
        ],
        "title": "AnonymisationStats"
      },
      "AnonymiseJsonRequest": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text",
            "description": "Plain text document or prompt to anonymise. Mutually exclusive with `messages`.",
            "examples": [
              "Patient Hans Keller (AVS 756.1234.5678.97) visited Dr. Sophie Meyer on 14.03.2025."
            ]
          },
          "messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ChatMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messages",
            "description": "Structured chat messages array to anonymise with consistent coreference tags across turns."
          },
          "level": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "title": "Level",
            "description": "Anonymisation aggressiveness: `low` (direct identifiers), `medium` (balanced default), or `high` (strict + indirect quasi-identifiers).",
            "default": "medium"
          },
          "style": {
            "type": "string",
            "enum": [
              "coreference_tags",
              "strict_redaction",
              "generalization"
            ],
            "title": "Style",
            "description": "Replacement style: `coreference_tags` (default, e.g. `[PERSON_1]`), `strict_redaction` (`[REDACTED]`), or `generalization`.",
            "default": "coreference_tags"
          },
          "specialization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Specialization Id",
            "description": "Optional ID or slug of an official compliance profile or your custom Example Studio specialization."
          },
          "vault_mode": {
            "type": "string",
            "enum": [
              "token",
              "session"
            ],
            "title": "Vault Mode",
            "description": "`token` (default, zero-persistence encrypted `vault_token`) or `session` (ephemeral RAM-only Swiss session ID).",
            "default": "token"
          },
          "vault_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vault Token",
            "description": "Pass an existing `vault_token` (or `session_id`) to preserve consistent `[PERSON_1]` tags across multi-turn conversations."
          },
          "ttl_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2592000.0,
                "minimum": 60.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Ttl Seconds",
            "description": "Optional lifetime in seconds for the returned `vault_token` (default 86400s) or RAM `session_id` (default 1800s)."
          },
          "return_mapping": {
            "type": "boolean",
            "title": "Return Mapping",
            "description": "Opt-in: set to `true` only if you want to store the raw entity mapping inside your own database instead of using `/v1/deanonymise`.",
            "default": false
          }
        },
        "type": "object",
        "title": "AnonymiseJsonRequest"
      },
      "AnonymiseResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "Unique request identifier."
          },
          "anonymised_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anonymised Text",
            "description": "Anonymised text output (returned for text requests or file requests with `output_format` = `text` or `both`)."
          },
          "anonymised_messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ChatMessage"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anonymised Messages",
            "description": "Anonymised messages array (returned when `messages` was supplied)."
          },
          "redacted_file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AnonymisedFilePayload"
              },
              {
                "type": "null"
              }
            ],
            "description": "Visually redacted file payload (returned for file requests with `output_format` = `both`)."
          },
          "vault_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vault Token",
            "description": "Opaque AES-256-GCM encrypted restoration token (zero server persistence). Pass to `/v1/deanonymise` to restore."
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id",
            "description": "Ephemeral Swiss RAM-only session handle (returned when `vault_mode` = `session`)."
          },
          "expires_at": {
            "type": "string",
            "title": "Expires At",
            "description": "ISO-8601 UTC expiration timestamp for restoration."
          },
          "mapping": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mapping",
            "description": "Plaintext placeholder-to-original map (only populated when `return_mapping: true`)."
          },
          "stats": {
            "$ref": "#/components/schemas/AnonymisationStats"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "expires_at",
          "stats"
        ],
        "title": "AnonymiseResponse"
      },
      "AnonymisedFilePayload": {
        "properties": {
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Sanitized output filename."
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "description": "MIME type of the visually redacted file."
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes",
            "description": "Byte size of the redacted output file."
          },
          "content_base64": {
            "type": "string",
            "title": "Content Base64",
            "description": "Base64-encoded visually redacted PDF, DOCX, or image."
          }
        },
        "type": "object",
        "required": [
          "filename",
          "content_type",
          "size_bytes",
          "content_base64"
        ],
        "title": "AnonymisedFilePayload"
      },
      "Body_anonymise_file_v1_anonymise_file_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "description": "PDF, DOCX, PNG, JPG, or WebP document to anonymise."
          },
          "level": {
            "type": "string",
            "title": "Level",
            "description": "`low`, `medium` (default), or `high`.",
            "default": "medium"
          },
          "style": {
            "type": "string",
            "title": "Style",
            "description": "`coreference_tags`, `strict_redaction`, or `generalization`.",
            "default": "coreference_tags"
          },
          "output_format": {
            "type": "string",
            "title": "Output Format",
            "description": "`text`, `file` (raw binary), or `both` (JSON with base64 file).",
            "default": "both"
          },
          "redaction_style": {
            "type": "string",
            "title": "Redaction Style",
            "description": "Visual bar style: `solid` (default) or `tagged`.",
            "default": "solid"
          },
          "redaction_color": {
            "type": "string",
            "title": "Redaction Color",
            "description": "Visual bar fill color: `obsidian` (#18181B, default) or `lila` (#4C2F72).",
            "default": "obsidian"
          },
          "specialization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Specialization Id"
          },
          "vault_mode": {
            "type": "string",
            "title": "Vault Mode",
            "default": "token"
          },
          "vault_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vault Token"
          },
          "ttl_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ttl Seconds"
          },
          "return_mapping": {
            "type": "boolean",
            "title": "Return Mapping",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_anonymise_file_v1_anonymise_file_post"
      },
      "ChatMessage": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "system",
              "user",
              "assistant"
            ],
            "title": "Role",
            "description": "Message role in a multi-turn conversation."
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Message text content to anonymise."
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "ChatMessage"
      },
      "DeanonymiseRequest": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text",
            "description": "Text containing Brume placeholders (e.g. an LLM response referencing `[PERSON_1]`).",
            "examples": [
              "Summary: [PERSON_1] consulted [DOCTOR_1] on [DATE_1]."
            ]
          },
          "vault_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vault Token",
            "description": "Opaque `vault_token` returned by `/v1/anonymise`."
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id",
            "description": "Ephemeral `session_id` returned by `/v1/anonymise` when `vault_mode` = `session`."
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "DeanonymiseRequest"
      },
      "DeanonymiseResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "restored_text": {
            "type": "string",
            "title": "Restored Text",
            "description": "Text with all matched placeholders restored."
          },
          "restored_count": {
            "type": "integer",
            "title": "Restored Count",
            "description": "Number of placeholder occurrences restored."
          },
          "unmatched_placeholders": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Unmatched Placeholders",
            "description": "Any Brume-formatted placeholders present in `text` that had no vault entry."
          },
          "latency_ms": {
            "type": "integer",
            "title": "Latency Ms"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "restored_text",
          "restored_count",
          "latency_ms"
        ],
        "title": "DeanonymiseResponse"
      },
      "DeanonymiseStreamRequest": {
        "properties": {
          "chunks": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Chunks",
            "description": "Ordered text chunks (e.g. streamed LLM tokens) to restore incrementally over SSE."
          },
          "vault_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vault Token"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          }
        },
        "type": "object",
        "required": [
          "chunks"
        ],
        "title": "DeanonymiseStreamRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "ok",
            "title": "Status"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "region": {
            "type": "string",
            "title": "Region"
          },
          "jurisdiction": {
            "type": "string",
            "title": "Jurisdiction",
            "default": "Switzerland (FADP / GDPR Adequate)"
          },
          "zero_persistence": {
            "type": "boolean",
            "title": "Zero Persistence",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "status",
          "version",
          "region"
        ],
        "title": "HealthResponse"
      },
      "SessionDeleteResponse": {
        "properties": {
          "deleted": {
            "type": "boolean",
            "title": "Deleted"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          }
        },
        "type": "object",
        "required": [
          "deleted",
          "session_id"
        ],
        "title": "SessionDeleteResponse"
      },
      "SpecializationSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "norm_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Norm Reference"
          },
          "is_official": {
            "type": "boolean",
            "title": "Is Official"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "default_level": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "title": "Default Level",
            "default": "medium"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "is_official",
          "version"
        ],
        "title": "SpecializationSummary"
      },
      "SpecializationsResponse": {
        "properties": {
          "specializations": {
            "items": {
              "$ref": "#/components/schemas/SpecializationSummary"
            },
            "type": "array",
            "title": "Specializations"
          }
        },
        "type": "object",
        "required": [
          "specializations"
        ],
        "title": "SpecializationsResponse"
      },
      "UsageSummaryResponse": {
        "properties": {
          "api_plan_tier": {
            "type": "string",
            "title": "Api Plan Tier"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "billing_currency": {
            "type": "string",
            "title": "Billing Currency"
          },
          "included_app_tier": {
            "type": "string",
            "title": "Included App Tier"
          },
          "period_start": {
            "type": "string",
            "title": "Period Start"
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End"
          },
          "chars_used": {
            "type": "integer",
            "title": "Chars Used"
          },
          "included_chars_limit": {
            "type": "integer",
            "title": "Included Chars Limit"
          },
          "pages_used": {
            "type": "integer",
            "title": "Pages Used"
          },
          "included_pages_limit": {
            "type": "integer",
            "title": "Included Pages Limit"
          },
          "requests_count": {
            "type": "integer",
            "title": "Requests Count"
          },
          "rate_limit_rpm": {
            "type": "integer",
            "title": "Rate Limit Rpm"
          },
          "monthly_spend_cap_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Spend Cap Cents"
          },
          "estimated_overage_cents": {
            "type": "integer",
            "title": "Estimated Overage Cents"
          }
        },
        "type": "object",
        "required": [
          "api_plan_tier",
          "status",
          "billing_currency",
          "included_app_tier",
          "period_start",
          "chars_used",
          "included_chars_limit",
          "pages_used",
          "included_pages_limit",
          "requests_count",
          "rate_limit_rpm",
          "estimated_overage_cents"
        ],
        "title": "UsageSummaryResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Brume API Key (brm_live_... or brm_test_...)",
        "description": "Pass your Brume API key as `Authorization: Bearer brm_live_...`."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
