{
  "openapi": "3.1.0",
  "info": {
    "title": "BrowserCat API",
    "version": "1.0.0",
    "termsOfService": "http://localhost:4000/terms-of-service",
    "description": "Providing purr-fect headless browser access via utility endpoints and direct websocket connections.",
    "contact": {
      "name": "BrowserCat Support",
      "email": "support@browsercat.com",
      "url": "http://localhost:4000/contact"
    }
  },
  "servers": [
    {
      "url": "http://localhost:3010"
    }
  ],
  "externalDocs": {
    "url": "http://localhost:4000/docs",
    "description": "BrowserCat Docs"
  },
  "security": [
    {
      "JWT cookie": []
    },
    {
      "API key header": []
    }
  ],
  "tags": [
    {
      "name": "Browsers",
      "description": "Direct browser access"
    },
    {
      "name": "API Keys",
      "description": "API key management"
    },
    {
      "name": "Usage",
      "description": "Account usage & metrics"
    },
    {
      "name": "Billing",
      "description": "Account billing & payments"
    },
    {
      "name": "OpenAPI",
      "description": "OpenAPI utilities"
    },
    {
      "name": "Server",
      "description": "Server status"
    }
  ],
  "components": {
    "securitySchemes": {
      "API key header": {
        "type": "apiKey",
        "in": "header",
        "name": "Api-Key",
        "description": "API key auth. Set header \"Api-Key\": \"{key}\"."
      },
      "API key query param": {
        "type": "apiKey",
        "in": "query",
        "name": "apiKey",
        "description": "API key auth. Set query param \"apiKey\": \"{key}\"."
      },
      "JWT cookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__SESSION",
        "description": "JWT in cookies. Set cookie \"__SESSION\": \"{jwt}\"."
      },
      "JWT header": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT in header. Set header \"Authorization\": \"Bearer {jwt}\"."
      }
    },
    "schemas": {
      "BadRequestError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              400
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Bad Request"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          },
          "invalid": {
            "type": "string",
            "enum": [
              "body",
              "path",
              "query"
            ],
            "description": "Where the validation error occurred"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "expected": {
                  "type": "string"
                },
                "received": {
                  "type": "string"
                },
                "validation": {
                  "type": "string"
                },
                "path": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "path"
              ]
            },
            "description": "Validation errors, when available"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "NotFoundError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              404
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Not Found"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "UnauthorizedError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              401
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "ForbiddenError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              403
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Forbidden"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "PaymentRequiredError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              402
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Payment Required"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "TooManyRequestsError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              429
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Too Many Requests"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "InternalServerErrorError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              500
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Internal Server Error"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "ServiceUnavailableError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              503
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Service Unavailable"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "ProxyAuthenticationRequiredError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              407
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Proxy Authentication Required"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "BadGatewayError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              502
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Bad Gateway"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "GatewayTimeoutError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "enum": [
              504
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "Gateway Timeout"
            ]
          },
          "message": {
            "type": "string",
            "description": "Suggestions for debugging the issue"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "KeyId": {
        "type": "string",
        "description": "Key ID"
      },
      "KeyPublic": {
        "type": "object",
        "properties": {
          "keyId": {
            "$ref": "#/components/schemas/KeyId"
          },
          "name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 128
          },
          "role": {
            "type": "string",
            "enum": [
              "member",
              "admin"
            ]
          },
          "lastFour": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "keyId",
          "name",
          "role",
          "lastFour",
          "expiredAt"
        ]
      },
      "KeyPublicList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/KeyPublic"
        }
      },
      "KeySecret": {
        "type": "object",
        "properties": {
          "keyId": {
            "$ref": "#/components/schemas/KeyId"
          },
          "name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 128
          },
          "role": {
            "type": "string",
            "enum": [
              "member",
              "admin"
            ]
          },
          "lastFour": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "keyId",
          "name",
          "role",
          "lastFour",
          "expiredAt",
          "secret"
        ]
      },
      "KeyPost": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 128
          },
          "role": {
            "type": "string",
            "enum": [
              "member",
              "admin"
            ]
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name"
        ]
      },
      "KeyPut": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 128
          },
          "role": {
            "type": "string",
            "enum": [
              "member",
              "admin"
            ]
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "role",
          "expiredAt"
        ]
      },
      "KeyPatch": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 0,
            "maxLength": 128
          },
          "role": {
            "type": "string",
            "enum": [
              "member",
              "admin"
            ]
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UsageBucket": {
        "type": "object",
        "properties": {
          "usageBucketId": {
            "type": "string",
            "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
          },
          "keyId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
          },
          "clerkOrgId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 0,
            "maxLength": 128
          },
          "clerkUserId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 0,
            "maxLength": 128
          },
          "bucket": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string",
            "enum": [
              "api",
              "ws"
            ]
          },
          "endpoint": {
            "type": "string"
          },
          "credits": {
            "type": "integer"
          },
          "countSuccess": {
            "type": "integer"
          },
          "countFailure": {
            "type": "integer"
          },
          "durationSuccess": {
            "type": "integer"
          },
          "durationFailure": {
            "type": "integer"
          },
          "durationMin": {
            "type": "integer"
          },
          "durationMax": {
            "type": "integer"
          },
          "durationMean": {
            "type": "integer"
          },
          "durationStd": {
            "type": "integer"
          }
        },
        "required": [
          "usageBucketId",
          "keyId",
          "clerkOrgId",
          "clerkUserId",
          "bucket",
          "method",
          "endpoint",
          "credits",
          "countSuccess",
          "countFailure",
          "durationSuccess",
          "durationFailure",
          "durationMin",
          "durationMax",
          "durationMean",
          "durationStd"
        ]
      },
      "UsageBucketList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/UsageBucket"
        }
      },
      "UsageSessionId": {
        "type": "string",
        "description": "UsageSession ID"
      },
      "UsageSessionPublic": {
        "type": "object",
        "properties": {
          "usageSessionId": {
            "type": "string",
            "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
          },
          "clerkOrgId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 0,
            "maxLength": 128
          },
          "clerkUserId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 0,
            "maxLength": 128
          },
          "keyId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
          },
          "method": {
            "type": "string",
            "enum": [
              "api",
              "ws"
            ]
          },
          "endpoint": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failure"
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "cloudflare",
              "steel"
            ]
          },
          "proxyCostUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "proxyUsageRaw": {},
          "machineId": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "machineRegion": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "browserType": {
            "type": "string",
            "enum": [
              "chromium",
              "firefox",
              "webkit",
              "chrome",
              "chrome-beta",
              "msedge",
              "msedge-beta",
              "msedge-dev"
            ]
          },
          "browserVersion": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "agentType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "playwright",
              "puppeteer"
            ]
          },
          "agentVersion": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sessionId": {
            "$ref": "#/components/schemas/UsageSessionId"
          }
        },
        "required": [
          "usageSessionId",
          "clerkOrgId",
          "clerkUserId",
          "keyId",
          "method",
          "endpoint",
          "status",
          "machineId",
          "machineRegion",
          "browserType",
          "browserVersion",
          "agentType",
          "agentVersion",
          "startedAt",
          "endedAt",
          "sessionId"
        ]
      },
      "UsageSessionPublicList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/UsageSessionPublic"
        }
      },
      "UsageEventId": {
        "type": "string",
        "description": "UsageEvent ID"
      },
      "UsageEvent": {
        "type": "object",
        "properties": {
          "usageEventId": {
            "type": "string",
            "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
          },
          "usageSessionId": {
            "type": "string",
            "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
          },
          "type": {
            "type": "string",
            "maxLength": 64
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failure"
            ]
          },
          "data": {},
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "sessionId": {
            "$ref": "#/components/schemas/UsageSessionId"
          },
          "eventId": {
            "$ref": "#/components/schemas/UsageEventId"
          }
        },
        "required": [
          "usageEventId",
          "usageSessionId",
          "type",
          "status",
          "sentAt",
          "createdAt",
          "sessionId",
          "eventId"
        ]
      },
      "UsageEventList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/UsageEvent"
        }
      },
      "SubId": {
        "type": "string",
        "description": "Subscription ID"
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "subId": {
            "$ref": "#/components/schemas/SubId"
          },
          "tier": {
            "type": "string",
            "enum": [
              "hobby",
              "business",
              "enterprise"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "incomplete",
              "incomplete_expired",
              "active",
              "trialing",
              "past_due",
              "unpaid",
              "canceled",
              "paused"
            ]
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "periodUnit": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "periodCount": {
            "type": "integer",
            "minimum": 1
          },
          "periodStartsAt": {
            "type": "string",
            "format": "date-time"
          },
          "periodEndsAt": {
            "type": "string",
            "format": "date-time"
          },
          "anchoredAt": {
            "type": "string",
            "format": "date-time"
          },
          "canceledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resumedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pausedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "stripeSubId": {
            "type": "string"
          }
        },
        "required": [
          "subId",
          "tier",
          "status",
          "currency",
          "periodUnit",
          "periodCount",
          "periodStartsAt",
          "periodEndsAt",
          "anchoredAt",
          "canceledAt",
          "resumedAt",
          "pausedAt",
          "stripeSubId"
        ]
      },
      "SubscriptionList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Subscription"
        }
      },
      "InvId": {
        "type": "string",
        "description": "Invoice ID"
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "invId": {
            "$ref": "#/components/schemas/InvId"
          },
          "subId": {
            "$ref": "#/components/schemas/SubId"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "open",
              "void",
              "paid",
              "uncollectible"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "amountDue": {
            "type": "integer",
            "minimum": 0
          },
          "amountPaid": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer"
          },
          "totalDiscount": {
            "type": "integer",
            "minimum": 0
          },
          "totalTax": {
            "type": "integer",
            "minimum": 0
          },
          "billedAt": {
            "type": "string",
            "format": "date-time"
          },
          "stripeInvId": {
            "type": "string"
          }
        },
        "required": [
          "invId",
          "subId",
          "status",
          "error",
          "currency",
          "amountDue",
          "amountPaid",
          "total",
          "totalDiscount",
          "totalTax",
          "billedAt",
          "stripeInvId"
        ]
      },
      "InvoiceList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Invoice"
        }
      }
    },
    "parameters": {}
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "getServiceHealth",
        "summary": "Show server health",
        "description": "Lightweight endpoint to check server health.",
        "tags": [
          "Server"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Server Status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "healthy",
                        "degraded",
                        "unhealthy"
                      ]
                    },
                    "uptime": {
                      "type": "number",
                      "description": "Server uptime in seconds"
                    }
                  },
                  "required": [
                    "status",
                    "uptime"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/metrics": {
      "get": {
        "operationId": "getServiceMetrics",
        "summary": "Show server metrics",
        "description": "Returns server metrics in Prometheus format. Use this endpoint to monitor server health.",
        "tags": [
          "Server"
        ],
        "security": [],
        "responses": {
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/openapi": {
      "get": {
        "operationId": "openOpenApiDocs",
        "summary": "Open OpenAPI docs",
        "description": "Open OpenAPI docs explorer. Easily explore functionality, request formats, and response types.",
        "tags": [
          "OpenAPI"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "OpenAPI HTML"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiJson",
        "summary": "Retrieve API spec as JSON",
        "description": "Retrieve API spec in JSON format. Use this format to generate types, clients, and mocks in your language of choice.",
        "tags": [
          "OpenAPI"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "openapi": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openapi"
                  ],
                  "description": "OpenAPI JSON",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/openapi.yaml": {
      "get": {
        "operationId": "getOpenApiYaml",
        "summary": "Retrieve API spec as YAML",
        "description": "Retrieve API spec in YAML format. Use this format to generate types, clients, and mocks in your language of choice.",
        "tags": [
          "OpenAPI"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI YAML",
            "content": {
              "application/x-yaml": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "openapi": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openapi"
                  ],
                  "description": "OpenAPI YAML",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect": {
      "get": {
        "operationId": "connectBrowser",
        "summary": "Connect to a browser",
        "description": "Create a websocket connection to a headless browser. Currently only supports Playwright.",
        "tags": [
          "Browsers"
        ],
        "security": [
          {
            "API key header": []
          },
          {
            "API key query param": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "cdg",
                "iad",
                "sin"
              ],
              "description": "Preferred region for browser connection. Defaults to nearest. If preferred region overloaded, request will redirect to best match.\n\nAvailable regions:\n\n- **cdg**: Paris, France\n- **iad**: Ashburn, Virginia (US)\n- **sin**: Singapore, Singapore"
            },
            "required": false,
            "name": "region",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "chromium",
                "firefox",
                "webkit",
                "chrome",
                "chrome-beta",
                "msedge",
                "msedge-beta",
                "msedge-dev"
              ],
              "description": "By default, the correct browser will be inferred from your client library's headers. However, you may need to use this parameter for certain CDP clients or to select a custom browser from our fleet.\n\nNote: Your client must be configured to match whatever browser you intend to launch. For example, if you want to use Playwright to connect to `chrome`, you must use `pw.chromium.connect(bcatUrl, {channel: 'chrome'})`."
            },
            "required": false,
            "name": "browser",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "old",
                "true",
                "false"
              ],
              "description": "This setting is Deprecated as \"old\" headless mode is no longer supported by chrome.\nOnly [\"new\" headless mode](https://developer.chrome.com/docs/chromium/new-headless) is supported.",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ],
                  "description": "Use `false` for headed mode. Use `true` for client default headless mode (Playwright: \"new\", others: \"new\")."
                },
                {
                  "type": "string",
                  "enum": [
                    "new",
                    "old"
                  ],
                  "description": "Use `new` for \"new\" headless mode, `old` for \"old\" headless mode."
                }
              ]
            },
            "required": false,
            "name": "headless",
            "in": "query"
          },
          {
            "schema": {
              "type": "object",
              "properties": {
                "region": {
                  "type": "string",
                  "enum": [
                    "cdg",
                    "iad",
                    "sin"
                  ],
                  "description": "Preferred region for browser connection. Defaults to nearest. If preferred region overloaded, request will redirect to best match.\n\nAvailable regions:\n\n- **cdg**: Paris, France\n- **iad**: Ashburn, Virginia (US)\n- **sin**: Singapore, Singapore"
                },
                "browser": {
                  "type": "string",
                  "enum": [
                    "chromium",
                    "firefox",
                    "webkit",
                    "chrome",
                    "chrome-beta",
                    "msedge",
                    "msedge-beta",
                    "msedge-dev"
                  ],
                  "description": "By default, the correct browser will be inferred from your client library's headers. However, you may need to use this parameter for certain CDP clients or to select a custom browser from our fleet.\n\nNote: Your client must be configured to match whatever browser you intend to launch. For example, if you want to use Playwright to connect to `chrome`, you must use `pw.chromium.connect(bcatUrl, {channel: 'chrome'})`."
                },
                "headless": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Use `false` for headed mode. Use `true` for client default headless mode (Playwright: \"new\", others: \"new\")."
                    },
                    {
                      "type": "string",
                      "enum": [
                        "new",
                        "old"
                      ],
                      "description": "Use `new` for \"new\" headless mode, `old` for \"old\" headless mode."
                    }
                  ],
                  "description": "This setting is Deprecated as \"old\" headless mode is no longer supported by chrome.\nOnly [\"new\" headless mode](https://developer.chrome.com/docs/chromium/new-headless) is supported."
                },
                "enableArgs": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Pass additional CLI arguments to the browser on launch. See list of [chromium-based browser flags](https://peter.sh/experiments/chromium-command-line-switches/) or [firefox flags](https://wiki.mozilla.org/Firefox/CommandLineOptions)."
                },
                "disableArgs": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ],
                  "description": "Ignore default browser CLI arguments. Pass an array of strings for fine-grain control or ignore all using `true`."
                },
                "userPrefs": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  },
                  "description": "Set browser user preferences (e.g. `about://flags`/`about:config`). See list of prefs for [chromium-based browsers](https://niek.github.io/chrome-features/) and [firefox](https://searchfox.org/mozilla-release/source/modules/libpref/init/StaticPrefList.yaml)."
                },
                "proxy": {
                  "type": "object",
                  "properties": {
                    "server": {
                      "type": "string",
                      "description": "Proxy server URL. For example `https://proxycat.com`."
                    },
                    "username": {
                      "type": "string",
                      "description": "Proxy server username."
                    },
                    "password": {
                      "type": "string",
                      "description": "Proxy server password."
                    },
                    "bypass": {
                      "type": "string",
                      "description": "Comma-separated list of domain patterns to bypass proxy for. Matches on _ends-with_. For example, `api.google.com, example.org, .net`. Use this setting to save bandwidth."
                    }
                  },
                  "required": [
                    "server"
                  ],
                  "description": "Proxy server configuration."
                },
                "managedProxy": {
                  "type": "boolean",
                  "description": "Use BrowserCat's managed proxy network for this session. Billed as cost-plus bandwidth on top of session time. Mutually exclusive with `proxy` (bring-your-own); if both are set, your own `proxy` takes precedence."
                }
              },
              "description": "Advanced browser connection options. Includes options unavailable via query params. When both are set, takes priority over query params.\n\nMust be a valid JSON object."
            },
            "required": false,
            "name": "browsercat-opts",
            "in": "header"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {}
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/auth/keys": {
      "get": {
        "operationId": "listKeys",
        "summary": "List API keys",
        "description": "List all API keys.",
        "tags": [
          "API Keys"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPublicList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createKey",
        "summary": "Create an API key",
        "description": "Create a new API key.",
        "tags": [
          "API Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyPost"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeySecret"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/auth/keys/{keyId}": {
      "get": {
        "operationId": "getKey",
        "summary": "Retrieve an API key",
        "description": "Retrieve an API key.",
        "tags": [
          "API Keys"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/KeyId"
            },
            "required": true,
            "name": "keyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPublic"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putKey",
        "summary": "Update an API key",
        "description": "Update an API key.",
        "tags": [
          "API Keys"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/KeyId"
            },
            "required": true,
            "name": "keyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyPut"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPublic"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchKey",
        "summary": "Patch an API key",
        "description": "Patch an API key.",
        "tags": [
          "API Keys"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/KeyId"
            },
            "required": true,
            "name": "keyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPublic"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "revokeKey",
        "summary": "Revoke an API key",
        "description": "Revoke an API key.",
        "tags": [
          "API Keys"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/KeyId"
            },
            "required": true,
            "name": "keyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPublic"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/usage/buckets": {
      "get": {
        "operationId": "listUsageBuckets",
        "summary": "List aggregate account usage",
        "description": "List account usage within a time range.",
        "tags": [
          "Usage"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100,
              "description": "Limit the number of results"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "default": 0,
              "description": "Offset the returned results by this many"
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results after this date (inclusive)"
            },
            "required": false,
            "name": "afterDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results before this date (exclusive)"
            },
            "required": false,
            "name": "beforeDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "minute",
                "hour",
                "day",
                "week"
              ]
            },
            "required": false,
            "name": "unit",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 128
                },
                {
                  "type": "string",
                  "enum": [
                    "null"
                  ]
                }
              ]
            },
            "required": false,
            "name": "userId",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$"
                },
                {
                  "type": "string",
                  "enum": [
                    "null"
                  ]
                }
              ]
            },
            "required": false,
            "name": "keyId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "ws"
              ]
            },
            "required": false,
            "name": "method",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "endpoint",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageBucketList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/usage/sessions": {
      "get": {
        "operationId": "listUsageSessions",
        "summary": "List sessions within range",
        "description": "List all sessions within a time range.",
        "tags": [
          "Usage"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100,
              "description": "Limit the number of results"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "default": 0,
              "description": "Offset the returned results by this many"
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results after this date (inclusive)"
            },
            "required": false,
            "name": "afterDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results before this date (exclusive)"
            },
            "required": false,
            "name": "beforeDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSessionPublicList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/usage/sessions/{sessionId}": {
      "get": {
        "operationId": "getUsageSession",
        "summary": "Retrieve data for a request",
        "description": "Retrieve data for a particular request.",
        "tags": [
          "Usage"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/UsageSessionId"
            },
            "required": true,
            "name": "sessionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSessionPublic"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/usage/sessions/{sessionId}/events": {
      "get": {
        "operationId": "listUsageSessionUsageEvents",
        "summary": "List events for a request",
        "description": "List all events within a particular request.",
        "tags": [
          "Usage"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/UsageSessionId"
            },
            "required": true,
            "name": "sessionId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100,
              "description": "Limit the number of results"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "default": 0,
              "description": "Offset the returned results by this many"
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results after this date (inclusive)"
            },
            "required": false,
            "name": "afterDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results before this date (exclusive)"
            },
            "required": false,
            "name": "beforeDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageEventList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/usage/sessions/{sessionId}/events/{eventId}": {
      "get": {
        "operationId": "getUsageSessionUsageEvent",
        "summary": "Retrieve data for an event",
        "description": "Retrieve a particular event for a request.",
        "tags": [
          "Usage"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/UsageSessionId"
            },
            "required": true,
            "name": "sessionId",
            "in": "path"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/UsageEventId"
            },
            "required": true,
            "name": "eventId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscriptions": {
      "get": {
        "operationId": "listBillingSubscriptions",
        "summary": "List subscriptions within range",
        "description": "List all current and previous subscriptions within a given time range.",
        "tags": [
          "Billing"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100,
              "description": "Limit the number of results"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "default": 0,
              "description": "Offset the returned results by this many"
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results after this date (inclusive)"
            },
            "required": false,
            "name": "afterDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results before this date (exclusive)"
            },
            "required": false,
            "name": "beforeDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscriptions/current": {
      "get": {
        "operationId": "getBillingActiveSubscription",
        "summary": "Get active subscription",
        "description": "Get the primary, active subscription.",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscriptions/{subId}": {
      "get": {
        "operationId": "getBillingSubscription",
        "summary": "Get specific subscription",
        "description": "Get specific subscription details.",
        "tags": [
          "Billing"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/SubId"
            },
            "required": true,
            "name": "subId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/billing/invoices": {
      "get": {
        "operationId": "listBillingInvoices",
        "summary": "List invoices within range",
        "description": "List all invoices (including failed and refunds) within a given time range.",
        "tags": [
          "Billing"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100,
              "description": "Limit the number of results"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "default": 0,
              "description": "Offset the returned results by this many"
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results after this date (inclusive)"
            },
            "required": false,
            "name": "afterDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only return results before this date (exclusive)"
            },
            "required": false,
            "name": "beforeDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/billing/invoices/{invId}": {
      "get": {
        "operationId": "getBillingInvoice",
        "summary": "Get specific invoice",
        "description": "Get specific invoice info.",
        "tags": [
          "Billing"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/InvId"
            },
            "required": true,
            "name": "invId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/billing/invoices/{invId}.pdf": {
      "get": {
        "operationId": "getBillingInvoicePdf",
        "summary": "Get PDF receipt for specific invoice",
        "description": "Get specific invoice PDF.",
        "tags": [
          "Billing"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/InvId"
            },
            "required": true,
            "name": "invId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Invoice PDF"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    },
                    "invalid": {
                      "type": "string",
                      "enum": [
                        "body",
                        "path",
                        "query"
                      ],
                      "description": "Where the validation error occurred"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path"
                        ]
                      },
                      "description": "Validation errors, when available"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        401
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Unauthorized"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Suggestions for debugging the issue"
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}