{
  "openapi": "3.0.3",
  "info": {
    "description": "REST gateway for authentication, account, and billing operations.",
    "title": "Tokenfactory API Gateway",
    "contact": {},
    "version": "v1beta"
  },
  "servers": [
    {
      "url": "https://api.qdiv0.com"
    }
  ],
  "tags": [],
  "paths": {
    "/accounts": {
      "get": {
        "operationId": "getAccounts",
        "summary": "List user accounts",
        "description": "Returns the accounts and memberships visible to the authenticated user.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountListResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postAccounts",
        "summary": "Create an account",
        "description": "Creates a new account owned by the authenticated user.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountMembershipResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/accounts/current": {
      "get": {
        "operationId": "getAccountsCurrent",
        "summary": "Get the selected account",
        "description": "Returns the account resolved from the active account context.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteAccountsCurrent",
        "summary": "Delete the selected account",
        "description": "Deletes the active account context.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchAccountsCurrent",
        "summary": "Update the selected account",
        "description": "Updates editable metadata for the active account context.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/accounts/current/fiscal-profile": {
      "patch": {
        "operationId": "patchAccountsCurrentFiscalProfile",
        "summary": "Update the current account fiscal profile",
        "description": "Updates only the fiscal-profile fields of the active account context, preserving the existing account name and description.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFiscalProfileRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/accounts/current/invitations": {
      "post": {
        "operationId": "postAccountsCurrentInvitations",
        "summary": "Create an invitation for the selected account",
        "description": "Invites a user by email to join the active account context with a given role.",
        "tags": [
          "invitations"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/accounts/current/invitations/{invitationID}": {
      "delete": {
        "operationId": "deleteAccountsCurrentInvitationsByInvitationID",
        "summary": "Cancel an invitation for the selected account",
        "description": "Cancels a pending invitation issued by the active account context.",
        "tags": [
          "invitations"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invitationID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Invitation ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/accounts/current/members": {
      "get": {
        "operationId": "getAccountsCurrentMembers",
        "summary": "List selected account members",
        "description": "Returns the members and roles for the active account context.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountMemberListResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postAccountsCurrentMembers",
        "summary": "Add a member to the selected account",
        "description": "Adds a registered user to the active account context or updates their role if they already belong to it.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountMemberResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAccountMemberRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/accounts/current/members/{userID}": {
      "patch": {
        "operationId": "patchAccountsCurrentMembersByUserID",
        "summary": "Update a selected account member role",
        "description": "Updates the role of an existing user within the active account context.",
        "tags": [
          "accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountMemberResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "User ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountMemberRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/api-keys": {
      "get": {
        "operationId": "getApiKeys",
        "summary": "List API keys for the selected account",
        "description": "Returns the API keys issued for the active account context.",
        "tags": [
          "api-keys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postApiKeys",
        "summary": "Create an API key for the selected account",
        "description": "Issues a new API key for the active account context and returns the plaintext key once.",
        "tags": [
          "api-keys"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/api-keys/{keyID}/revoke": {
      "post": {
        "operationId": "postApiKeysKeyIDRevoke",
        "summary": "Revoke an API key",
        "description": "Revokes an API key issued for the active account context.",
        "tags": [
          "api-keys"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "keyID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/forgot-password": {
      "post": {
        "operationId": "postAuthForgotPassword",
        "summary": "Request a password reset email",
        "description": "Always returns 200 with a generic message to avoid user enumeration.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForgotPasswordResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "operationId": "postAuthLogin",
        "summary": "Authenticate a user",
        "description": "Exchanges email and password credentials for access and refresh tokens.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "operationId": "getAuthMe",
        "summary": "Return the current authenticated user",
        "description": "Resolves the user attached to the bearer token.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserInfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/passkeys": {
      "get": {
        "operationId": "getAuthPasskeys",
        "summary": "List passkeys",
        "description": "Returns the current user's passkey credentials.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postAuthPasskeys",
        "summary": "Register a passkey",
        "description": "Stores a passkey credential for the authenticated user.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterPasskeyRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/passkeys/begin-login": {
      "post": {
        "operationId": "postAuthPasskeysBeginLogin",
        "summary": "Begin passkey login",
        "description": "Creates a passkey login challenge for the provided email.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BeginPasskeyloginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeginPasskeyloginRequest"
              }
            }
          }
        }
      }
    },
    "/auth/passkeys/begin-registration": {
      "post": {
        "operationId": "postAuthPasskeysBeginRegistration",
        "summary": "Begin passkey registration",
        "description": "Creates a passkey registration challenge for the authenticated user.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BeginPasskeyRegistrationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/passkeys/finish-login": {
      "post": {
        "operationId": "postAuthPasskeysFinishLogin",
        "summary": "Finish passkey login",
        "description": "Consumes a passkey login challenge and returns a session.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinishPasskeyloginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishPasskeyloginRequest"
              }
            }
          }
        }
      }
    },
    "/auth/passkeys/finish-registration": {
      "post": {
        "operationId": "postAuthPasskeysFinishRegistration",
        "summary": "Finish passkey registration",
        "description": "Consumes a passkey registration challenge and stores the credential.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishPasskeyRegistrationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/passkeys/{credentialID}": {
      "delete": {
        "operationId": "deleteAuthPasskeys",
        "summary": "Remove a passkey",
        "description": "Deletes a passkey credential from the authenticated user.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "credentialID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/password": {
      "patch": {
        "operationId": "patchAuthPassword",
        "summary": "Change the current user's password",
        "description": "Requires the authenticated user to provide the current password and a new password.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/preferences": {
      "get": {
        "operationId": "getAuthPreferences",
        "summary": "Get the current user's security preferences",
        "description": "Returns the per-user security toggles for the authenticated user.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferencesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchAuthPreferences",
        "summary": "Update the current user's security preferences",
        "description": "Partial update of the per-user security toggles. Only fields present in the body are applied.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePreferencesRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/refresh": {
      "post": {
        "operationId": "postAuthRefresh",
        "summary": "Refresh an access token",
        "description": "Exchanges a refresh token for a new access token.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          }
        }
      }
    },
    "/auth/register": {
      "post": {
        "operationId": "postAuthRegister",
        "summary": "Register a new user",
        "description": "Creates a new account using email and password credentials.",
        "tags": [
          "auth"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          }
        }
      }
    },
    "/auth/reset-password": {
      "post": {
        "operationId": "postAuthResetPassword",
        "summary": "Reset a password using a one-time token",
        "description": "Consumes the reset token, updates the password, and returns a fresh session.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          }
        }
      }
    },
    "/auth/totp": {
      "delete": {
        "operationId": "deleteAuthTotp",
        "summary": "Disable TOTP",
        "description": "Removes the current user's TOTP credential.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/totp/begin": {
      "post": {
        "operationId": "postAuthTotpBegin",
        "summary": "Start TOTP enrollment",
        "description": "Returns a new TOTP secret and otpauth URI for the authenticated user.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BeginTotpEnrollmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/totp/confirm": {
      "post": {
        "operationId": "postAuthTotpConfirm",
        "summary": "Confirm TOTP enrollment",
        "description": "Stores a TOTP secret for the authenticated user after verifying the code.",
        "tags": [
          "auth"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmTotpEnrollmentRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/auth/verify-email": {
      "get": {
        "operationId": "getAuthVerifyEmail",
        "summary": "Verify an email activation link",
        "description": "Consumes the activation token and returns a session.",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyEmailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Activation token from the email"
          }
        ]
      }
    },
    "/billing/balance": {
      "get": {
        "operationId": "getBillingBalance",
        "summary": "Get the current account balance",
        "description": "Returns the billing balance of the authenticated account.",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountBalanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/billing/checkout": {
      "post": {
        "operationId": "postBillingCheckout",
        "summary": "Create a checkout session",
        "description": "Creates a billing checkout session for the authenticated account.",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Checkout idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCheckoutSessionRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/billing/debit": {
      "post": {
        "operationId": "postBillingDebit",
        "summary": "Debit the current account balance",
        "description": "Debits a positive amount from the authenticated account.",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebitBalanceResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedDebitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Debit idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DebitBalanceRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/billing/debit/operations/{operationID}": {
      "get": {
        "operationId": "getBillingDebitOperation",
        "summary": "Get a debit operation",
        "description": "",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebitOperationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "operationID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Debit operation ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/billing/ledger": {
      "get": {
        "operationId": "getBillingLedger",
        "summary": "List ledger entries",
        "description": "Returns ledger movements for the authenticated account.",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerHistoryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            },
            "description": "Maximum number of entries"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "Number of entries to skip"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/billing/payments": {
      "get": {
        "operationId": "getBillingPayments",
        "summary": "List payments for the authenticated account",
        "description": "Returns the payment history for the active account context.",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentsResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/billing/payments/{paymentID}/invoice.pdf": {
      "get": {
        "operationId": "getBillingPaymentsPaymentIDInvoicePDF",
        "summary": "Download a payment invoice PDF",
        "description": "Returns the invoice PDF for a given payment of the active account context.",
        "tags": [
          "billing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "paymentID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Payment ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/firewall-rules": {
      "get": {
        "operationId": "getFirewallRules",
        "summary": "List firewall rules",
        "description": "Returns all firewall rules for the authenticated account.",
        "tags": [
          "firewall-rules"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FirewallRuleResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postFirewallRule",
        "summary": "Create a firewall rule",
        "description": "Creates a new firewall rule for the authenticated account.",
        "tags": [
          "firewall-rules"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFirewallRuleRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/firewall-rules/{ruleSlug}": {
      "get": {
        "operationId": "getFirewallRule",
        "summary": "Get a firewall rule",
        "description": "Returns a single firewall rule by slug.",
        "tags": [
          "firewall-rules"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "ruleSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall rule slug"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteFirewallRule",
        "summary": "Delete a firewall rule",
        "description": "Removes a firewall rule by slug.",
        "tags": [
          "firewall-rules"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "ruleSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall rule slug"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchFirewallRule",
        "summary": "Update a firewall rule",
        "description": "Partially updates a firewall rule by slug.",
        "tags": [
          "firewall-rules"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "ruleSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall rule slug"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFirewallRuleRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/firewall-rules/{ruleSlug}:evaluate": {
      "post": {
        "operationId": "postFirewallRuleEvaluate",
        "summary": "Evaluate a firewall rule",
        "description": "Runs input against a single firewall rule and returns the evaluation result.",
        "tags": [
          "firewall-rules"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallEvaluationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "ruleSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall rule slug"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirewallRuleEvaluationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/firewalls": {
      "get": {
        "operationId": "getFirewalls",
        "summary": "List firewalls",
        "description": "Returns all firewalls for the authenticated account.",
        "tags": [
          "firewalls"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FirewallResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postFirewall",
        "summary": "Create a firewall",
        "description": "Creates a new firewall for the authenticated account.",
        "tags": [
          "firewalls"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFirewallRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/firewalls/{firewallSlug}": {
      "get": {
        "operationId": "getFirewall",
        "summary": "Get a firewall",
        "description": "Returns a single firewall by slug.",
        "tags": [
          "firewalls"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "firewallSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall slug"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteFirewall",
        "summary": "Delete a firewall",
        "description": "Removes a firewall by slug.",
        "tags": [
          "firewalls"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "firewallSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall slug"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchFirewall",
        "summary": "Update a firewall",
        "description": "Partially updates a firewall by slug.",
        "tags": [
          "firewalls"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "firewallSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall slug"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFirewallRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/firewalls/{firewallSlug}:evaluate": {
      "post": {
        "operationId": "postFirewallEvaluate",
        "summary": "Evaluate a firewall",
        "description": "Runs input against a firewall and returns the evaluation result.",
        "tags": [
          "firewalls"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallEvaluationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "firewallSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Firewall slug"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FirewallEvaluationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases": {
      "get": {
        "operationId": "getVectorDatabases",
        "summary": "List vector databases",
        "description": "Returns the vector databases owned by the authenticated account.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VectorDatabaseResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postVectorDatabases",
        "summary": "Create a vector database",
        "description": "Creates a new vector database for the authenticated account.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VectorDatabaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVectorDatabaseRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}": {
      "get": {
        "operationId": "getVectorDatabase",
        "summary": "Get a vector database",
        "description": "Returns a single vector database owned by the authenticated account.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VectorDatabaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteVectorDatabase",
        "summary": "Delete a vector database",
        "description": "Removes a vector database owned by the authenticated account.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchVectorDatabase",
        "summary": "Update a vector database",
        "description": "Updates the slug, name, or description of an existing vector database.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VectorDatabaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVectorDatabaseRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/documents": {
      "get": {
        "operationId": "getVectorDatabaseDocuments",
        "summary": "List documents in a vector database",
        "description": "Returns documents stored in a vector database with optional pagination.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDocumentsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of documents to return"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pagination cursor from a previous response"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/index-direct": {
      "post": {
        "operationId": "postVectorDatabaseIndexDirect",
        "summary": "Index documents directly",
        "description": "Indexes documents into a vector database synchronously.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "format": "int32"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexDocumentsRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/index-jobs": {
      "post": {
        "operationId": "postVectorDatabaseIndexJobs",
        "summary": "Enqueue an index job",
        "description": "Enqueues documents for asynchronous indexing into a vector database.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexDocumentsRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/index-jobs/{jobID}": {
      "get": {
        "operationId": "getVectorDatabaseIndexJob",
        "summary": "Get an index job",
        "description": "Returns the status of an asynchronous index job.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          },
          {
            "name": "jobID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Index job ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/recommend": {
      "post": {
        "operationId": "postVectorDatabaseRecommend",
        "summary": "Recommend documents",
        "description": "Returns recommended documents for a recommend token.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchHitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecommendRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/search": {
      "post": {
        "operationId": "postVectorDatabaseSearch",
        "summary": "Search a vector database",
        "description": "Searches a vector database by query text and/or image URL.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchHitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/flexible-vector-databases/{databaseID}/view-element": {
      "post": {
        "operationId": "postVectorDatabaseViewElement",
        "summary": "View an element",
        "description": "Records a view for a document and returns a recommend token.",
        "tags": [
          "vector-databases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "databaseID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Vector database ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ViewElementRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/health": {
      "get": {
        "operationId": "",
        "summary": "Health check",
        "description": "Returns service health",
        "tags": [
          "system"
        ],
        "responses": {
          "200": {
            "description": "ok",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/huggingface/embeddings": {
      "get": {
        "operationId": "getHuggingfaceEmbeddings",
        "summary": "Search embedding models",
        "description": "Searches Hugging Face for embedding models.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceModelsResponse"
                },
                "example": {
                  "models": [
                    {
                      "compatibility_reason": "",
                      "compatible": true,
                      "downloads": 800000,
                      "gguf_files": [],
                      "has_gguf": false,
                      "has_safetensors": true,
                      "likes": 900,
                      "pipeline_tag": "feature-extraction",
                      "repo_id": "intfloat/multilingual-e5-large",
                      "tags": [
                        "sentence-transformers"
                      ],
                      "warnings": [],
                      "workload_kind": "embeddings"
                    },
                    {
                      "compatibility_reason": "conflicting-specialized-tags",
                      "compatible": false,
                      "downloads": 600,
                      "gguf_files": [],
                      "has_gguf": false,
                      "has_safetensors": true,
                      "likes": 4,
                      "pipeline_tag": "sentence-similarity",
                      "repo_id": "org/conflicting-embedding",
                      "tags": [
                        "sentence-similarity",
                        "text-to-image"
                      ],
                      "warnings": [],
                      "workload_kind": ""
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Number of models (default 50, max 100)"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/huggingface/files": {
      "get": {
        "operationId": "getHuggingfaceFiles",
        "summary": "Get Hugging Face file sizes",
        "description": "Returns GGUF file sizes and quantization for a Hugging Face repository.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceGGUFFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hugging Face repository ID (e.g. owner/model)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/huggingface/models": {
      "get": {
        "operationId": "getHuggingfaceModels",
        "summary": "Search Hugging Face models",
        "description": "Searches Hugging Face for compatible models matching the query.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceModelsResponse"
                },
                "example": {
                  "models": [
                    {
                      "compatibility_reason": "",
                      "compatible": true,
                      "downloads": 500000,
                      "gguf_files": [
                        {
                          "filename": "Qwen3-32B-Q4_K_M.gguf",
                          "quantization": "Q4_K_M",
                          "size_bytes": 21474836480
                        }
                      ],
                      "has_gguf": true,
                      "has_safetensors": true,
                      "likes": 1200,
                      "pipeline_tag": "text-generation",
                      "repo_id": "Qwen/Qwen3-32B",
                      "tags": [
                        "transformers"
                      ],
                      "warnings": [],
                      "workload_kind": "chat"
                    },
                    {
                      "compatibility_reason": "unsupported-task",
                      "compatible": false,
                      "downloads": 1200,
                      "gguf_files": [],
                      "has_gguf": false,
                      "has_safetensors": true,
                      "likes": 8,
                      "pipeline_tag": "text-classification",
                      "repo_id": "org/text-classifier",
                      "tags": [
                        "text-classification"
                      ],
                      "warnings": [
                        "unsupported pipeline task"
                      ],
                      "workload_kind": ""
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/huggingface/orgs/{org}": {
      "get": {
        "operationId": "getHuggingfaceOrgs",
        "summary": "Get Hugging Face organization info",
        "description": "Returns profile information for a Hugging Face organization.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceOrgInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hugging Face organization name"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/huggingface/search-tag": {
      "get": {
        "operationId": "getHuggingfaceSearchTag",
        "summary": "Search Hugging Face models by tag",
        "description": "Searches Hugging Face for models matching a query and pipeline tag.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceModelsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query"
          },
          {
            "name": "pipeline_tag",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Pipeline tag (e.g. text-generation)"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Number of models (default 50, max 100)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/huggingface/trending": {
      "get": {
        "operationId": "getHuggingfaceTrending",
        "summary": "Trending Hugging Face models",
        "description": "Returns trending Hugging Face models.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceModelsResponse"
                },
                "example": {
                  "models": [
                    {
                      "compatibility_reason": "",
                      "compatible": true,
                      "downloads": 2000000,
                      "gguf_files": [],
                      "has_gguf": false,
                      "has_safetensors": true,
                      "likes": 3000,
                      "pipeline_tag": "text-generation",
                      "repo_id": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
                      "tags": [
                        "transformers"
                      ],
                      "warnings": [],
                      "workload_kind": "chat"
                    },
                    {
                      "compatibility_reason": "unsupported-task",
                      "compatible": false,
                      "downloads": 500,
                      "gguf_files": [],
                      "has_gguf": false,
                      "has_safetensors": true,
                      "likes": 2,
                      "pipeline_tag": "text-classification",
                      "repo_id": "org/unsupported-trending",
                      "tags": [
                        "text-classification"
                      ],
                      "warnings": [
                        "unsupported pipeline task"
                      ],
                      "workload_kind": ""
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Number of models (default 20, max 100)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instance-config/gpus": {
      "get": {
        "operationId": "getInstanceConfigGpus",
        "summary": "List available GPUs",
        "description": "Returns the GPU catalog with pricing, regions, and availability for the authenticated account.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GpuListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances": {
      "get": {
        "operationId": "getInstances",
        "summary": "List inference instances",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional state filter (non_bootstrap, pending, running, stopped, failed)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postInstances",
        "summary": "Create an inference instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional idempotency key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInstanceRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}": {
      "get": {
        "operationId": "getInstanceByID",
        "summary": "Get an inference instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteInstance",
        "summary": "Delete an inference instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchInstance",
        "summary": "Update an inference instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInstanceRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}/preview": {
      "post": {
        "operationId": "postInstancePreviewUpdate",
        "summary": "Preview smart selection for an existing instance update",
        "description": "Previews the compatibility and smart selection for an existing instance while applying smart-setting overrides from the request body. Lets the instance settings page fetch the same backend-filtered GPU list used at launch time instead of reimplementing compatibility filtering in the UI.",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewInstanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewInstanceUpdateRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}/schedule-rules": {
      "get": {
        "operationId": "getInstanceScheduleRules",
        "summary": "List schedule rules for an instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRuleListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postInstanceScheduleRule",
        "summary": "Create a schedule rule for an instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleRuleRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}/schedule-rules/{ruleID}": {
      "delete": {
        "operationId": "deleteInstanceScheduleRule",
        "summary": "Delete a schedule rule for an instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          },
          {
            "name": "ruleID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Schedule rule ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchInstanceScheduleRule",
        "summary": "Update a schedule rule for an instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          },
          {
            "name": "ruleID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Schedule rule ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleRuleRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}/start": {
      "post": {
        "operationId": "postInstanceStart",
        "summary": "Start an inference instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}/stop": {
      "post": {
        "operationId": "postInstanceStop",
        "summary": "Stop an inference instance",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/instances/{instanceID}/usage": {
      "get": {
        "operationId": "getInstanceUsage",
        "summary": "Get an inference instance usage and cost breakdown",
        "description": "",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceUsageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "instanceID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Instance ID"
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d"
              ]
            },
            "description": "Time range (24h, 7d, 30d)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/invitations": {
      "get": {
        "operationId": "getInvitations",
        "summary": "List pending invitations for the authenticated user",
        "description": "Returns invitations pending acceptance that were sent to the authenticated user's email.",
        "tags": [
          "invitations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/invitations/accept": {
      "post": {
        "operationId": "postInvitationsAccept",
        "summary": "Accept an invitation",
        "description": "Accepts a pending invitation by token or invitation ID and attaches the authenticated user to the account.",
        "tags": [
          "invitations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountMembershipResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/models/fixed": {
      "get": {
        "operationId": "getModelsFixed",
        "summary": "List fixed models",
        "description": "Returns the catalog of fixed (curated) models supported by the platform.",
        "tags": [
          "models"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HuggingFaceModelsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/notifications": {
      "get": {
        "operationId": "getNotifications",
        "summary": "List notifications",
        "description": "Returns notifications for the authenticated account, newest first.",
        "tags": [
          "notifications"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListNotificationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return notifications created after this RFC3339 timestamp"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of notifications to return (default 50, max 100)"
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by notification kind"
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by severity"
          },
          {
            "name": "include_read",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Include already-read notifications"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/notifications/dismiss": {
      "post": {
        "operationId": "postNotificationsDismiss",
        "summary": "Dismiss notifications",
        "description": "Dismisses the given notifications for the authenticated account.",
        "tags": [
          "notifications"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DismissResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/notifications/read-all": {
      "post": {
        "operationId": "postNotificationsMarkAllRead",
        "summary": "Mark all notifications as read",
        "description": "Marks all notifications matching the optional filters as read.",
        "tags": [
          "notifications"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkAllReadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkAllReadRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/notifications/unread-count": {
      "get": {
        "operationId": "getNotificationsUnreadCount",
        "summary": "Get unread notification count",
        "description": "Returns the number of unread notifications for the authenticated account.",
        "tags": [
          "notifications"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnreadCountResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/notifications/{notificationID}/read": {
      "post": {
        "operationId": "postNotificationsMarkRead",
        "summary": "Mark a notification as read",
        "description": "Marks a single notification as read for the authenticated account.",
        "tags": [
          "notifications"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "notificationID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Notification ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/replica-sets": {
      "get": {
        "operationId": "getReplicaSets",
        "summary": "List replica sets",
        "description": "",
        "tags": [
          "replica-sets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplicaSetListResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/replica-sets/{replicaSetID}": {
      "get": {
        "operationId": "getReplicaSet",
        "summary": "Get a replica set",
        "description": "",
        "tags": [
          "replica-sets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplicaSetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "replicaSetID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Replica set ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteReplicaSet",
        "summary": "Delete a replica set",
        "description": "",
        "tags": [
          "replica-sets"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "replicaSetID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Replica set ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchReplicaSet",
        "summary": "Update a replica set",
        "description": "",
        "tags": [
          "replica-sets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplicaSetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "replicaSetID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Replica set ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReplicaSetRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/replica-sets/{replicaSetID}/scale": {
      "post": {
        "operationId": "postReplicaSetScale",
        "summary": "Scale a replica set",
        "description": "",
        "tags": [
          "replica-sets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplicaSetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "replicaSetID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Replica set ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScaleReplicaSetRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/runtime/notify/crash": {
      "post": {
        "operationId": "postRuntimeNotifyCrash",
        "summary": "Report a runtime pod crash",
        "description": "Handles crash notifications from runtime pods. The request must include a valid runtime JWT in the Authorization header (not a user Bearer token).",
        "tags": [
          "system"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "security": [
          {
            "RuntimeJWTAuth": []
          }
        ]
      }
    },
    "/serving-endpoints": {
      "get": {
        "operationId": "getServingEndpoints",
        "summary": "List serving endpoints",
        "description": "",
        "tags": [
          "serving-endpoints"
        ],
        "responses": {
          "200": {
            "description": "endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ServingEndpointResponse"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postServingEndpoint",
        "summary": "Create a serving endpoint",
        "description": "",
        "tags": [
          "serving-endpoints"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServingEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "name conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServingEndpointRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/smart-balancers": {
      "get": {
        "operationId": "getSmartBalancers",
        "summary": "List smart balancers",
        "description": "",
        "tags": [
          "smart-balancers"
        ],
        "responses": {
          "200": {
            "description": "smart_balancers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SmartBalancerViewResponse"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postSmartBalancer",
        "summary": "Create a smart balancer",
        "description": "",
        "tags": [
          "smart-balancers"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartBalancerViewResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSmartBalancerRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/smart-balancers/{smartBalancerID}": {
      "delete": {
        "operationId": "deleteSmartBalancer",
        "summary": "Delete a smart balancer",
        "description": "",
        "tags": [
          "smart-balancers"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "smartBalancerID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Smart balancer ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchSmartBalancer",
        "summary": "Update a smart balancer",
        "description": "",
        "tags": [
          "smart-balancers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartBalancerViewResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "smartBalancerID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Smart balancer ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSmartBalancerRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/storage/volumes": {
      "get": {
        "operationId": "getStorageVolumes",
        "summary": "List storage volumes",
        "description": "Lists all persistent storage volumes owned by the authenticated account.",
        "tags": [
          "storage"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageVolumeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postStorageVolumes",
        "summary": "Create a storage volume",
        "description": "Creates a persistent storage volume for model checkpoints and caches.",
        "tags": [
          "storage"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageVolumeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStorageVolumeRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/storage/volumes/{volumeID}": {
      "get": {
        "operationId": "getStorageVolume",
        "summary": "Get a storage volume",
        "description": "Returns details for a specific persistent storage volume.",
        "tags": [
          "storage"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageVolumeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "volumeID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Volume ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteStorageVolume",
        "summary": "Delete a storage volume",
        "description": "Deletes a persistent storage volume and its contents.",
        "tags": [
          "storage"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "volumeID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Volume ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/target-groups": {
      "get": {
        "operationId": "getTargetGroups",
        "summary": "List target groups",
        "description": "",
        "tags": [
          "target-groups"
        ],
        "responses": {
          "200": {
            "description": "groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TargetGroupResponse"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postTargetGroup",
        "summary": "Create a target group",
        "description": "",
        "tags": [
          "target-groups"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TargetGroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTargetGroupRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/target-groups/{targetGroupID}": {
      "get": {
        "operationId": "getTargetGroup",
        "summary": "Get a target group",
        "description": "",
        "tags": [
          "target-groups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TargetGroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "targetGroupID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Target group ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteTargetGroup",
        "summary": "Delete a target group",
        "description": "",
        "tags": [
          "target-groups"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "targetGroupID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Target group ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "patchTargetGroup",
        "summary": "Update a target group",
        "description": "",
        "tags": [
          "target-groups"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TargetGroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "targetGroupID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Target group ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTargetGroupRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/tools": {
      "get": {
        "operationId": "getTools",
        "summary": "List tools",
        "description": "Lists all available platform tools for the authenticated account.",
        "tags": [
          "system"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/tools/{toolType}/try": {
      "post": {
        "operationId": "tryTool",
        "summary": "Try a tool",
        "description": "Runs a single platform tool with the given configuration and returns the raw tool output.",
        "tags": [
          "system"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "toolType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tool type"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/users/me/api-keys": {
      "get": {
        "operationId": "getUserAPIKeys",
        "summary": "List API keys for the authenticated user",
        "description": "Returns the API keys issued for the authenticated user identity.",
        "tags": [
          "api-keys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postUserAPIKeys",
        "summary": "Create an API key for the authenticated user",
        "description": "Issues a new API key for the authenticated user identity and returns the plaintext key once.",
        "tags": [
          "api-keys"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/users/me/api-keys/{keyID}/revoke": {
      "post": {
        "operationId": "postUserAPIKeysKeyIDRevoke",
        "summary": "Revoke a user API key",
        "description": "Revokes an API key issued for the authenticated user identity.",
        "tags": [
          "api-keys"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "missing credentials or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "keyID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/audio/speech": {
      "post": {
        "operationId": "postV1AudioSpeech",
        "summary": "OpenAI-compatible audio speech (TTS)",
        "description": "Generates audio from text. Accepts Bearer access tokens or API keys.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "Audio bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AudioSpeechRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/audio/transcriptions": {
      "post": {
        "operationId": "postV1AudioTranscriptions",
        "summary": "OpenAI-compatible audio transcription (STT)",
        "description": "Transcribes an uploaded audio file. Accepts Bearer access tokens or API keys. Handles POST /v1/audio/transcriptions (multipart/form-data).",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "Transcription text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "Model ID"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Audio file"
                  },
                  "language": {
                    "type": "string",
                    "description": "Source language"
                  },
                  "response_format": {
                    "type": "string",
                    "description": "Response format"
                  }
                },
                "required": [
                  "model",
                  "file"
                ]
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/audio/voices": {
      "get": {
        "operationId": "getV1AudioVoices",
        "summary": "List available audio voices for a model",
        "description": "Lists available TTS voices and supported languages for a model. Accepts Bearer access tokens or API keys.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "voices and languages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Model ID"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "postV1ChatCompletions",
        "summary": "OpenAI-compatible chat completions",
        "description": "Executes a chat completion using a managed instance or public model. Accepts Bearer access tokens or API keys. Supports streaming (SSE) when \"stream\": true.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OpenAI chat.completion response or SSE stream",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "firewall blocked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequestEnvelope"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/embeddings": {
      "post": {
        "operationId": "postV1Embeddings",
        "summary": "OpenAI-compatible embeddings",
        "description": "Generates embeddings for a text or multimodal input. Accepts Bearer access tokens or API keys.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OpenAI embeddings list response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingsRequestEnvelope"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/images/edits": {
      "post": {
        "operationId": "postV1ImageEdits",
        "summary": "OpenAI-compatible image edits",
        "description": "Edits an uploaded image using a prompt and optional mask. Accepts Bearer access tokens or API keys.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "Edited images with b64_json data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "Model ID"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Edit prompt"
                  },
                  "image": {
                    "type": "string",
                    "format": "binary",
                    "description": "Source image file"
                  },
                  "mask": {
                    "type": "string",
                    "format": "binary",
                    "description": "Mask image file"
                  },
                  "size": {
                    "type": "string",
                    "description": "Output size (WIDTHxHEIGHT)"
                  },
                  "num_inference_steps": {
                    "type": "integer",
                    "description": "Inference steps (1-200)"
                  },
                  "guidance_scale": {
                    "type": "number",
                    "description": "Guidance scale (0-20)"
                  },
                  "seed": {
                    "type": "integer",
                    "description": "Random seed"
                  },
                  "strength": {
                    "type": "number",
                    "description": "Denoising strength (0-1, lower preserves original)"
                  }
                },
                "required": [
                  "model",
                  "prompt",
                  "image"
                ]
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/images/generations": {
      "post": {
        "operationId": "postV1ImageGenerations",
        "summary": "OpenAI-compatible image generations",
        "description": "Generates images from a prompt. Accepts Bearer access tokens or API keys.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OpenAI image generation response with b64_json data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/public/model-prices": {
      "get": {
        "operationId": "getV1PublicModelPrices",
        "summary": "Public model prices",
        "description": "Returns provider model pricing for cost comparison. No authentication required.",
        "tags": [
          "pricing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPricesResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search query for model prices"
          }
        ]
      }
    },
    "/v1/public/pricing": {
      "get": {
        "operationId": "getV1PublicPricing",
        "summary": "Public pricing catalog",
        "description": "Returns the public GPU and services pricing catalog. No authentication required.",
        "tags": [
          "pricing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPricingResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/realtime": {
      "get": {
        "operationId": "getV1Realtime",
        "summary": "Duplex realtime WebSocket proxy",
        "description": "Proxies a duplex realtime session (/v1/realtime?duplex=1) to the instance serving the requested omni model. Accepts Bearer access tokens or API keys. Exchanges OpenAI-Realtime-style events (session.update, input_audio_buffer.append, response.create, response.audio.delta).",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "101": {
            "description": "WebSocket upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Model serving name"
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resume a duplex session id"
          },
          {
            "name": "autostart",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Auto-start the duplex session (1/true/on)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses": {
      "get": {
        "operationId": "getV1ResponsesWebSocket",
        "summary": "OpenAI-compatible Responses API over WebSocket",
        "description": "WebSocket transport for the Responses API. Accepts Bearer access tokens or API keys. Upgrades the HTTP request to a WebSocket session that exchanges Responses payloads.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "101": {
            "description": "WebSocket upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "operationId": "postV1Responses",
        "summary": "OpenAI-compatible Responses API",
        "description": "Executes a Responses API request using a managed instance or public model. Accepts Bearer access tokens or API keys. Supports streaming (SSE) when \"stream\": true.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OpenAI response object or SSE stream",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequestEnvelope"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses/compact": {
      "post": {
        "operationId": "postV1ResponsesCompact",
        "summary": "Compact a Responses conversation",
        "description": "Compresses a conversation history into a compact representation for context management. Accepts Bearer access tokens or API keys.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "Compaction response object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequestEnvelope"
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses/sessions": {
      "get": {
        "operationId": "getV1ResponsesSessionsList",
        "summary": "List saved Responses conversations",
        "description": "Lists the account's stored response snapshots (chat logs) with optional model, tag, limit and cursor filters.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by model"
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by metadata tag (key:value, repeatable)"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows (default 50, max 200)"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteV1ResponsesSessions",
        "summary": "Delete all saved Responses conversations",
        "description": "",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses/sessions/status": {
      "get": {
        "operationId": "getV1ResponsesSessionsStatus",
        "summary": "Read the account persistence switch",
        "description": "",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "operationId": "putV1ResponsesSessionsStatus",
        "summary": "Flip the account persistence switch",
        "description": "",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses/sessions/{response_id}": {
      "get": {
        "operationId": "getV1ResponsesSessionDetail",
        "summary": "Get a saved Responses conversation",
        "description": "",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "response_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Response id"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteV1ResponsesSession",
        "summary": "Delete a saved response or whole conversation",
        "description": "Deletes one snapshot, or the full conversation chain when \"conversation\": true.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "response_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Response id"
          },
          {
            "name": "conversation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Delete the full conversation chain"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "getV1Templates",
        "summary": "List template variants",
        "description": "Lists pre-configured deployment template variants visible to the authenticated user.",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListUserVariantsResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page size (default 50, max 100)"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page offset"
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Locale (default en)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Category filter"
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag filter"
          },
          {
            "name": "featured_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Only featured templates"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/templates/by-slug/{slug}": {
      "get": {
        "operationId": "getV1TemplateBySlug",
        "summary": "Get a template by slug",
        "description": "Returns a template variant by its URL slug for the authenticated user.",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTemplateBySlugResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template slug"
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Locale (default en)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/templates/{id}": {
      "get": {
        "operationId": "getV1Template",
        "summary": "Get a template variant",
        "description": "Returns a single template variant by ID for the authenticated user.",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserVariantResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template variant ID"
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Locale (default en)"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v1/videos": {
      "post": {
        "operationId": "postV1VideoGenerations",
        "summary": "Synchronous video generation",
        "description": "Generates a video from a prompt and optional image, video, and audio references. Accepts Bearer access tokens or API keys. MiniMax-H3 prompts are limited to 7,000 Unicode characters; image references are limited to 30 MiB, video references to 50 MiB, audio references to 15 MiB, and the aggregate input-reference plus audio bytes to 64 MiB. HTTP(S) audio_reference_url values are limited to 16 KiB; data URLs are limited by the 15 MiB decoded audio payload.",
        "tags": [
          "inference-v1"
        ],
        "responses": {
          "200": {
            "description": "Generated MP4 video bytes",
            "content": {
              "video/mp4": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "Model ID"
                  },
                  "prompt": {
                    "type": "string",
                    "maxLength": 7000,
                    "description": "Video prompt (maximum 7,000 Unicode characters)"
                  },
                  "task": {
                    "type": "string",
                    "default": "t2va",
                    "enum": [
                      "t2va",
                      "fl2va",
                      "ref2va"
                    ],
                    "description": "Generation task: t2va, fl2va, or ref2va"
                  },
                  "duration": {
                    "type": "number",
                    "default": 5,
                    "minimum": 4,
                    "maximum": 15,
                    "description": "Duration in seconds"
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 5760,
                    "description": "Output width; provide with height; may accompany a matching standard aspect_ratio"
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 5760,
                    "description": "Output height; provide with width; may accompany a matching standard aspect_ratio"
                  },
                  "aspect_ratio": {
                    "type": "string",
                    "enum": [
                      "21:9",
                      "16:9",
                      "4:3",
                      "1:1",
                      "3:4",
                      "9:16",
                      "adaptive"
                    ],
                    "description": "Output aspect ratio: a standard ratio may accompany matching dimensions; adaptive requires short_edge"
                  },
                  "short_edge": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 5760,
                    "description": "Output short edge; only valid with aspect_ratio=adaptive"
                  },
                  "fps": {
                    "type": "integer",
                    "default": 24,
                    "enum": [
                      24
                    ],
                    "description": "Frames per second; only 24 is supported"
                  },
                  "num_inference_steps": {
                    "type": "integer",
                    "default": 50,
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Inference steps"
                  },
                  "flow_shift": {
                    "type": "number",
                    "default": 12,
                    "minimum": 0,
                    "description": "Non-negative flow shift"
                  },
                  "audio_flow_shift": {
                    "type": "number",
                    "default": 3,
                    "minimum": 0,
                    "description": "Non-negative audio flow shift"
                  },
                  "seed": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0,
                    "description": "Random seed"
                  },
                  "input_reference": {
                    "type": "string",
                    "format": "binary",
                    "description": "Image reference up to 30 MiB or video reference up to 50 MiB; may be repeated; aggregate input references plus optional audio are limited to 64 MiB"
                  },
                  "input_references": {
                    "type": "string",
                    "format": "binary",
                    "description": "Image reference up to 30 MiB or video reference up to 50 MiB; may be repeated; aggregate input references plus optional audio are limited to 64 MiB"
                  },
                  "audio_reference": {
                    "type": "string",
                    "format": "binary",
                    "description": "Audio reference up to 15 MiB"
                  },
                  "audio_reference_url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 20972544,
                    "description": "Hosted audio reference URL; HTTP(S) URLs are limited to 16 KiB and data URLs to the bounded decoded-audio ceiling"
                  }
                },
                "required": [
                  "model",
                  "prompt"
                ]
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "x-go-name": "ErrorResponse"
      },
      "AcceptInvitationRequest": {
        "type": "object",
        "properties": {
          "invitation_id": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        },
        "x-go-name": "AcceptInvitationRequest"
      },
      "AccountBalanceResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "balance": {
            "type": "number"
          }
        },
        "x-go-name": "AccountBalanceResponse"
      },
      "AccountListResponse": {
        "type": "object",
        "properties": {
          "memberships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountMembershipResponse"
            }
          }
        },
        "x-go-name": "AccountListResponse"
      },
      "AccountMemberListResponse": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountMemberResponse"
            }
          }
        },
        "x-go-name": "AccountMemberListResponse"
      },
      "AccountMemberResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "created_at_unix": {
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "x-go-name": "AccountMemberResponse"
      },
      "AccountMembershipResponse": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/AccountResponse"
          },
          "account_id": {
            "type": "string"
          },
          "created_at_unix": {
            "type": "integer"
          },
          "role": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "x-go-name": "AccountMembershipResponse"
      },
      "AccountResponse": {
        "type": "object",
        "properties": {
          "created_at_unix": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "fiscal_customer_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "AccountResponse"
      },
      "AddAccountMemberRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "x-go-name": "AddAccountMemberRequest"
      },
      "ApiKeyListResponse": {
        "type": "object",
        "properties": {
          "api_keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyResponse"
            }
          }
        },
        "x-go-name": "ApiKeyListResponse"
      },
      "ApiKeyResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "plaintext_key": {
            "type": "string"
          },
          "revoked_at": {
            "type": "string"
          }
        },
        "x-go-name": "ApiKeyResponse"
      },
      "AudioSpeechRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "ref_audio": {
            "type": "string"
          },
          "ref_text": {
            "type": "string"
          },
          "response_format": {
            "type": "string"
          },
          "speed": {
            "type": "number"
          },
          "task_type": {
            "type": "string"
          },
          "voice": {
            "type": "string"
          },
          "x_vector_only_mode": {
            "type": "boolean"
          }
        },
        "x-go-name": "AudioSpeechRequest"
      },
      "BeginPasskeyRegistrationResponse": {
        "type": "object",
        "properties": {
          "challenge_id": {
            "type": "string"
          },
          "public_key": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "x-go-name": "BeginPasskeyRegistrationResponse"
      },
      "BeginPasskeyloginRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "cf_turnstile_response": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "x-go-name": "BeginPasskeyloginRequest"
      },
      "BeginPasskeyloginResponse": {
        "type": "object",
        "properties": {
          "challenge_id": {
            "type": "string"
          },
          "public_key": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "x-go-name": "BeginPasskeyloginResponse"
      },
      "BeginTotpEnrollmentResponse": {
        "type": "object",
        "properties": {
          "otpauth_uri": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        },
        "x-go-name": "BeginTotpEnrollmentResponse"
      },
      "CatalogGPUResponse": {
        "type": "object",
        "properties": {
          "availability_count": {
            "type": "integer"
          },
          "availability_total": {
            "type": "integer"
          },
          "capacity_tier": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "compute_tflops": {
            "type": "number"
          },
          "continent": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "cpu_cores": {
            "type": "integer"
          },
          "cpu_name": {
            "type": "string"
          },
          "cpu_ram_gb": {
            "type": "integer"
          },
          "cuda_max_good": {
            "type": "number"
          },
          "disk_bandwidth_mbps": {
            "type": "number"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "gpu_count": {
            "type": "integer"
          },
          "internet_down_mbps": {
            "type": "number"
          },
          "internet_up_mbps": {
            "type": "number"
          },
          "market_type": {
            "type": "string"
          },
          "price_per_hour_eur": {
            "type": "number"
          },
          "provider_codename": {
            "type": "string"
          },
          "public_gpu_id": {
            "type": "string"
          },
          "reliability": {
            "type": "number"
          },
          "stock_status": {
            "type": "string"
          },
          "vram_gb": {
            "type": "number"
          }
        },
        "x-go-name": "CatalogGPUResponse"
      },
      "ChangePasswordRequest": {
        "type": "object",
        "required": [
          "current_password",
          "new_password"
        ],
        "properties": {
          "current_password": {
            "type": "string"
          },
          "new_password": {
            "type": "string",
            "minLength": 8
          }
        },
        "x-go-name": "ChangePasswordRequest"
      },
      "ChatMessageEnvelope": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "role": {
            "type": "string"
          },
          "tool_call_id": {
            "type": "string"
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatToolCallEnvelope"
            }
          }
        },
        "x-go-name": "ChatMessageEnvelope"
      },
      "ChatRequestEnvelope": {
        "type": "object",
        "properties": {
          "firewall": {
            "type": "string"
          },
          "max_tokens": {
            "type": "integer"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessageEnvelope"
            }
          },
          "modalities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "model": {
            "type": "string"
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          }
        },
        "x-go-name": "ChatRequestEnvelope"
      },
      "ChatToolCallEnvelope": {
        "type": "object",
        "properties": {
          "function": {
            "$ref": "#/components/schemas/ChatToolCallFunctionEnvelope"
          },
          "id": {
            "type": "string"
          },
          "index": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "ChatToolCallEnvelope"
      },
      "ChatToolCallFunctionEnvelope": {
        "type": "object",
        "properties": {
          "arguments": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "ChatToolCallFunctionEnvelope"
      },
      "CheckoutSessionResponse": {
        "type": "object",
        "properties": {
          "checkout_url": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          }
        },
        "x-go-name": "CheckoutSessionResponse"
      },
      "ConfirmTotpEnrollmentRequest": {
        "type": "object",
        "required": [
          "code",
          "secret"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        },
        "x-go-name": "ConfirmTotpEnrollmentRequest"
      },
      "CreateAccountRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "CreateAccountRequest"
      },
      "CreateCheckoutSessionRequest": {
        "type": "object",
        "properties": {
          "amount_cents": {
            "type": "number"
          },
          "cancel_url": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "discount_code": {
            "type": "string"
          },
          "success_url": {
            "type": "string"
          }
        },
        "x-go-name": "CreateCheckoutSessionRequest"
      },
      "CreateFirewallRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "evaluator_serving_name": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rule_slugs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          }
        },
        "x-go-name": "CreateFirewallRequest"
      },
      "CreateFirewallRuleRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "default_severity": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "x-go-name": "CreateFirewallRuleRequest"
      },
      "CreateInstanceRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "download_size_bytes": {
            "type": "integer"
          },
          "gguf_model_path": {
            "type": "string"
          },
          "gpu_preferences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicGPUPreferenceJSON"
            }
          },
          "huggingface_repo_id": {
            "type": "string"
          },
          "idle_timeout_seconds": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "replica_count": {
            "type": "integer"
          },
          "runtime_config": {
            "$ref": "#/components/schemas/RuntimeConfigRequest"
          },
          "runtime_preset": {
            "type": "string"
          },
          "scheduling_mode": {
            "type": "string"
          },
          "serverless_enabled": {
            "type": "boolean"
          },
          "serving_name": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_max_price_per_hour_eur": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_region": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smart_selection_label": {
            "type": "string"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-go-name": "CreateInstanceRequest"
      },
      "CreateInvitationRequest": {
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "x-go-name": "CreateInvitationRequest"
      },
      "CreateServingEndpointRequest": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "target": {
            "$ref": "#/components/schemas/ServingTargetRequest"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "CreateServingEndpointRequest"
      },
      "CreateSmartBalancerRequest": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "router_model": {
            "$ref": "#/components/schemas/SmartBalancerRouterModelRequest"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartBalancerRouteRequest"
            }
          },
          "routing_mode": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "CreateSmartBalancerRequest"
      },
      "CreateStorageVolumeRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "CreateStorageVolumeRequest"
      },
      "CreateTargetGroupRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetGroupMemberRequest"
            }
          },
          "name": {
            "type": "string"
          },
          "selection_policy": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "CreateTargetGroupRequest"
      },
      "CreateVectorDatabaseRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "embedding_serving_name": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "x-go-name": "CreateVectorDatabaseRequest"
      },
      "DebitBalanceRequest": {
        "type": "object",
        "properties": {
          "amount_cents": {
            "type": "number"
          },
          "reference": {
            "type": "string"
          }
        },
        "x-go-name": "DebitBalanceRequest"
      },
      "DebitBalanceResponse": {
        "type": "object",
        "properties": {
          "new_balance": {
            "type": "number"
          },
          "success": {
            "type": "boolean"
          }
        },
        "x-go-name": "DebitBalanceResponse"
      },
      "DebitOperationResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "operation_id": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "DebitOperationResponse"
      },
      "DismissRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-go-name": "DismissRequest"
      },
      "DismissResponse": {
        "type": "object",
        "properties": {
          "dismissed": {
            "type": "integer"
          }
        },
        "x-go-name": "DismissResponse"
      },
      "EmbeddingsRequestEnvelope": {
        "type": "object",
        "properties": {
          "input": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "model": {
            "type": "string"
          }
        },
        "x-go-name": "EmbeddingsRequestEnvelope"
      },
      "FinishPasskeyRegistrationRequest": {
        "type": "object",
        "required": [
          "challenge_id",
          "credential"
        ],
        "properties": {
          "challenge_id": {
            "type": "string"
          },
          "credential": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "x-go-name": "FinishPasskeyRegistrationRequest"
      },
      "FinishPasskeyloginRequest": {
        "type": "object",
        "required": [
          "challenge_id",
          "credential",
          "email"
        ],
        "properties": {
          "cf_turnstile_response": {
            "type": "string"
          },
          "challenge_id": {
            "type": "string"
          },
          "credential": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "email": {
            "type": "string"
          }
        },
        "x-go-name": "FinishPasskeyloginRequest"
      },
      "FinishPasskeyloginResponse": {
        "type": "object",
        "x-go-name": "FinishPasskeyloginResponse"
      },
      "FirewallEvaluationRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          }
        },
        "x-go-name": "FirewallEvaluationRequest"
      },
      "FirewallEvaluationResponse": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "evaluator_serving_name": {
            "type": "string"
          },
          "firewall_slug": {
            "type": "string"
          },
          "matched_rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          }
        },
        "x-go-name": "FirewallEvaluationResponse"
      },
      "FirewallResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "evaluator_serving_name": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rule_slugs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "FirewallResponse"
      },
      "FirewallRuleEvaluationRequest": {
        "type": "object",
        "properties": {
          "evaluator_serving_name": {
            "type": "string"
          },
          "input": {
            "type": "string"
          }
        },
        "x-go-name": "FirewallRuleEvaluationRequest"
      },
      "FirewallRuleResponse": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "default_severity": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "recommended": {
            "type": "boolean"
          },
          "slug": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "FirewallRuleResponse"
      },
      "ForgotPasswordRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "cf_turnstile_response": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "x-go-name": "ForgotPasswordRequest"
      },
      "ForgotPasswordResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "x-go-name": "ForgotPasswordResponse"
      },
      "GpuListResponse": {
        "type": "object",
        "properties": {
          "gpus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogGPUResponse"
            }
          }
        },
        "x-go-name": "GpuListResponse"
      },
      "GpuPreferenceResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "provider_codename": {
            "type": "string"
          },
          "public_gpu_id": {
            "type": "string"
          }
        },
        "x-go-name": "GpuPreferenceResponse"
      },
      "HuggingFaceGGUFFileResponse": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string"
          },
          "quantization": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          }
        },
        "x-go-name": "HuggingFaceGGUFFileResponse"
      },
      "HuggingFaceModelResponse": {
        "type": "object",
        "properties": {
          "compatibility_reason": {
            "type": "string"
          },
          "compatible": {
            "type": "boolean"
          },
          "downloads": {
            "type": "integer"
          },
          "gguf_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HuggingFaceGGUFFileResponse"
            }
          },
          "has_gguf": {
            "type": "boolean"
          },
          "has_safetensors": {
            "type": "boolean"
          },
          "likes": {
            "type": "integer"
          },
          "pipeline_tag": {
            "type": "string"
          },
          "repo_id": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "HuggingFaceModelResponse"
      },
      "HuggingFaceModelsResponse": {
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HuggingFaceModelResponse"
            }
          }
        },
        "x-go-name": "HuggingFaceModelsResponse"
      },
      "HuggingFaceOrgInfoResponse": {
        "type": "object",
        "properties": {
          "avatar_url": {
            "type": "string"
          },
          "fullname": {
            "type": "string"
          }
        },
        "x-go-name": "HuggingFaceOrgInfoResponse"
      },
      "ImageGenerationRequest": {
        "type": "object",
        "properties": {
          "guidance_scale": {
            "type": "number"
          },
          "height": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "n": {
            "type": "integer"
          },
          "num_inference_steps": {
            "type": "integer"
          },
          "prompt": {
            "type": "string"
          },
          "quality": {
            "type": "string"
          },
          "response_format": {
            "type": "string"
          },
          "seed": {
            "type": "integer"
          },
          "size": {
            "type": "string"
          },
          "style": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          }
        },
        "x-go-name": "ImageGenerationRequest"
      },
      "IndexDocumentRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "content_image_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "source": {
            "$ref": "#/components/schemas/IndexDocumentSourceRequest"
          }
        },
        "x-go-name": "IndexDocumentRequest"
      },
      "IndexDocumentSourceRequest": {
        "type": "object",
        "properties": {
          "image_url": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "x-go-name": "IndexDocumentSourceRequest"
      },
      "IndexDocumentsRequest": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IndexDocumentRequest"
            }
          }
        },
        "x-go-name": "IndexDocumentsRequest"
      },
      "IndexJobResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "completed_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "database_id": {
            "type": "string"
          },
          "error_message": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "IndexJobResponse"
      },
      "InstanceListResponse": {
        "type": "object",
        "properties": {
          "instances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstanceResponse"
            }
          }
        },
        "x-go-name": "InstanceListResponse"
      },
      "InstanceResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "capacity_tier": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "estimated_required_vram_gb": {
            "type": "number"
          },
          "failure_reason": {
            "type": "string"
          },
          "gpu_count": {
            "type": "integer"
          },
          "gpu_preferences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GpuPreferenceResponse"
            }
          },
          "huggingface_repo_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "idle_timeout_seconds": {
            "type": "integer"
          },
          "last_request_at": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "public_gpu_id": {
            "type": "string"
          },
          "public_price_per_hour_eur": {
            "type": "number"
          },
          "replica_set_id": {
            "type": "string"
          },
          "runtime_config_snapshot": {
            "type": "string"
          },
          "runtime_preset": {
            "type": "string"
          },
          "scheduling_mode": {
            "type": "string"
          },
          "serverless_enabled": {
            "type": "boolean"
          },
          "serving_name": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_max_price_per_hour_eur": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_region": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smart_selection_label": {
            "type": "string"
          },
          "started_at": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "stopped_at": {
            "type": "string"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "InstanceResponse"
      },
      "InstanceUsageBucketResponse": {
        "type": "object",
        "properties": {
          "billable_seconds": {
            "type": "integer"
          },
          "cost_eur": {
            "type": "number"
          },
          "end_at": {
            "type": "string"
          },
          "start_at": {
            "type": "string"
          }
        },
        "x-go-name": "InstanceUsageBucketResponse"
      },
      "InstanceUsageResponse": {
        "type": "object",
        "properties": {
          "bucket_unit": {
            "type": "string"
          },
          "range": {
            "type": "string"
          },
          "resource_metrics": {
            "$ref": "#/components/schemas/ResourceMetricsResponse"
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstanceUsageBucketResponse"
            }
          },
          "summary": {
            "$ref": "#/components/schemas/InstanceUsageSummaryResponse"
          }
        },
        "x-go-name": "InstanceUsageResponse"
      },
      "InstanceUsageSummaryResponse": {
        "type": "object",
        "properties": {
          "month_billable_seconds": {
            "type": "integer"
          },
          "month_daily_average_cost_eur": {
            "type": "number"
          },
          "month_total_cost_eur": {
            "type": "number"
          }
        },
        "x-go-name": "InstanceUsageSummaryResponse"
      },
      "InvitationListResponse": {
        "type": "object",
        "properties": {
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationResponse"
            }
          }
        },
        "x-go-name": "InvitationListResponse"
      },
      "InvitationResponse": {
        "type": "object",
        "properties": {
          "accepted_at_unix": {
            "type": "integer"
          },
          "accepted_by": {
            "type": "string"
          },
          "account_description": {
            "type": "string"
          },
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "created_at_unix": {
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "expires_at_unix": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "invited_by": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        },
        "x-go-name": "InvitationResponse"
      },
      "LedgerEntryResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "balance": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          }
        },
        "x-go-name": "LedgerEntryResponse"
      },
      "LedgerHistoryResponse": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerEntryResponse"
            }
          },
          "total": {
            "type": "integer"
          }
        },
        "x-go-name": "LedgerHistoryResponse"
      },
      "ListDocumentsResponse": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListedDocumentResponse"
            }
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "x-go-name": "ListDocumentsResponse"
      },
      "ListNotificationsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationResponse"
            }
          },
          "next_since": {
            "type": "string"
          }
        },
        "x-go-name": "ListNotificationsResponse"
      },
      "ListedDocumentResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "source": {
            "$ref": "#/components/schemas/SearchHitSourceResponse"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "ListedDocumentResponse"
      },
      "LoginRequest": {
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "cf_turnstile_response": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "totp_code": {
            "type": "string"
          }
        },
        "x-go-name": "LoginRequest"
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "next_step": {
            "type": "string"
          }
        },
        "x-go-name": "LoginResponse"
      },
      "MarkAllReadRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          }
        },
        "x-go-name": "MarkAllReadRequest"
      },
      "MarkAllReadResponse": {
        "type": "object",
        "properties": {
          "marked": {
            "type": "integer"
          }
        },
        "x-go-name": "MarkAllReadResponse"
      },
      "NotificationLinkResponse": {
        "type": "object",
        "properties": {
          "kind_route": {
            "type": "string"
          },
          "label_key": {
            "type": "string"
          },
          "route_args": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "x-go-name": "NotificationLinkResponse"
      },
      "NotificationResponse": {
        "type": "object",
        "properties": {
          "body_args": {
            "type": "object",
            "additionalProperties": {}
          },
          "body_key": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "dedupe_key": {
            "type": "string"
          },
          "dismissed": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationLinkResponse"
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "read": {
            "type": "boolean"
          },
          "severity": {
            "type": "string"
          },
          "source_topic": {
            "type": "string"
          },
          "title_args": {
            "type": "object",
            "additionalProperties": {}
          },
          "title_key": {
            "type": "string"
          }
        },
        "x-go-name": "NotificationResponse"
      },
      "PasskeyListResponse": {
        "type": "object",
        "properties": {
          "passkeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PasskeyResponse"
            }
          }
        },
        "x-go-name": "PasskeyListResponse"
      },
      "PasskeyResponse": {
        "type": "object",
        "properties": {
          "credential_id": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "sign_count": {
            "type": "integer"
          }
        },
        "x-go-name": "PasskeyResponse"
      },
      "PaymentResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount_credit_base_minor": {
            "type": "integer"
          },
          "amount_discount_minor": {
            "type": "integer"
          },
          "amount_subtotal_minor": {
            "type": "integer"
          },
          "amount_tax_minor": {
            "type": "integer"
          },
          "amount_total_minor": {
            "type": "integer"
          },
          "created_at": {
            "type": "string"
          },
          "credited_at": {
            "type": "string"
          },
          "credited_eur_cents": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "discount_code_snapshot": {
            "type": "string"
          },
          "discount_ticket_id": {
            "type": "string"
          },
          "document_status": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ledger_entry_id": {
            "type": "string"
          },
          "paid_at": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "stripe_customer_id": {
            "type": "string"
          },
          "stripe_event_id": {
            "type": "string"
          },
          "stripe_invoice_id": {
            "type": "string"
          },
          "stripe_payment_intent_id": {
            "type": "string"
          },
          "stripe_session_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "PaymentResponse"
      },
      "PaymentsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentResponse"
            }
          }
        },
        "x-go-name": "PaymentsResponse"
      },
      "PreviewInstanceResponse": {
        "type": "object",
        "properties": {
          "capacity_tier": {
            "type": "string"
          },
          "compatible_gpus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogGPUResponse"
            }
          },
          "estimate": {
            "$ref": "#/components/schemas/RuntimeMemoryEstimateResponse"
          },
          "huggingface_repo_id": {
            "type": "string"
          },
          "max_context_size": {
            "type": "integer"
          },
          "recommended_gpu": {
            "$ref": "#/components/schemas/CatalogGPUResponse"
          },
          "runtime_config": {
            "$ref": "#/components/schemas/RuntimeConfigResponse"
          },
          "runtime_preset": {
            "type": "string"
          },
          "scheduling_mode": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_current_gpu": {
            "$ref": "#/components/schemas/CatalogGPUResponse"
          },
          "smart_current_price_per_hour_eur": {
            "type": "number"
          },
          "smart_max_price_per_hour_eur": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_recommended_max_price_per_hour_eur": {
            "type": "number"
          },
          "smart_region": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smart_selection_label": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "PreviewInstanceResponse"
      },
      "PreviewInstanceUpdateRequest": {
        "type": "object",
        "properties": {
          "scheduling_mode": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_max_price_per_hour_eur": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_region": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smart_selection_label": {
            "type": "string"
          }
        },
        "x-go-name": "PreviewInstanceUpdateRequest"
      },
      "PublicGPUPreferenceJSON": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "public_gpu_id": {
            "type": "string"
          }
        },
        "x-go-name": "PublicGPUPreferenceJSON"
      },
      "PublicPricingAvailability": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "type": "integer"
          }
        },
        "x-go-name": "PublicPricingAvailability"
      },
      "PublicPricingGPU": {
        "type": "object",
        "properties": {
          "availability": {
            "$ref": "#/components/schemas/PublicPricingAvailability"
          },
          "capacity_tier": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "gpu_count": {
            "type": "integer"
          },
          "market_type": {
            "type": "string"
          },
          "price_eur_per_hour": {
            "type": "number"
          },
          "provider_codename": {
            "type": "string"
          },
          "public_gpu_id": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "vram_gb": {
            "type": "number"
          }
        },
        "x-go-name": "PublicPricingGPU"
      },
      "PublicPricingResponse": {
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPricingService"
            }
          },
          "updated_at": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "x-go-name": "PublicPricingResponse"
      },
      "PublicPricingService": {
        "type": "object",
        "properties": {
          "billing_model": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "gpus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPricingGPU"
            }
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price_eur_per_gb_hour": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "status": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          }
        },
        "x-go-name": "PublicPricingService"
      },
      "QueuedDebitResponse": {
        "type": "object",
        "properties": {
          "operation_id": {
            "type": "string"
          },
          "queued": {
            "type": "boolean"
          }
        },
        "x-go-name": "QueuedDebitResponse"
      },
      "RecommendRequest": {
        "type": "object",
        "properties": {
          "recommend_token": {
            "type": "string"
          },
          "top_k": {
            "type": "integer"
          }
        },
        "x-go-name": "RecommendRequest"
      },
      "RefreshRequest": {
        "type": "object",
        "x-go-name": "RefreshRequest"
      },
      "RefreshResponse": {
        "type": "object",
        "x-go-name": "RefreshResponse"
      },
      "RegisterPasskeyRequest": {
        "type": "object",
        "required": [
          "credential_id",
          "public_key"
        ],
        "properties": {
          "credential_id": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "sign_count": {
            "type": "integer"
          }
        },
        "x-go-name": "RegisterPasskeyRequest"
      },
      "RegisterRequest": {
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "cf_turnstile_response": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string",
            "minLength": 8
          },
          "resend": {
            "type": "boolean"
          }
        },
        "x-go-name": "RegisterRequest"
      },
      "RegisterResponse": {
        "type": "object",
        "properties": {
          "requires_verification": {
            "type": "boolean"
          },
          "user_id": {
            "type": "string"
          }
        },
        "x-go-name": "RegisterResponse"
      },
      "ReplicaSetListResponse": {
        "type": "object",
        "properties": {
          "replica_sets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReplicaSetResponse"
            }
          }
        },
        "x-go-name": "ReplicaSetListResponse"
      },
      "ReplicaSetResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "desired_replicas": {
            "type": "integer"
          },
          "gguf_model_path": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "min_replicas": {
            "type": "integer"
          },
          "model_ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scheduling_mode": {
            "type": "string"
          },
          "serving_endpoint_id": {
            "type": "string"
          },
          "serving_name": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_max_price_per_hour_usd": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_region": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smart_selection_label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "target_group_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "ReplicaSetResponse"
      },
      "ResetPasswordRequest": {
        "type": "object",
        "required": [
          "new_password",
          "token"
        ],
        "properties": {
          "cf_turnstile_response": {
            "type": "string"
          },
          "new_password": {
            "type": "string",
            "minLength": 8
          },
          "token": {
            "type": "string"
          }
        },
        "x-go-name": "ResetPasswordRequest"
      },
      "ResetPasswordResponse": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "x-go-name": "ResetPasswordResponse"
      },
      "ResourceMetricSnapshot": {
        "type": "object",
        "properties": {
          "e2e_request_latency_p95_seconds": {
            "type": "number"
          },
          "generation_tokens_total": {
            "type": "number"
          },
          "kv_cache_usage_percent": {
            "type": "number"
          },
          "prompt_tokens_total": {
            "type": "number"
          },
          "requests_running": {
            "type": "number"
          },
          "requests_waiting": {
            "type": "number"
          },
          "runtime_cpu_seconds_per_second": {
            "type": "number"
          },
          "runtime_memory_bytes": {
            "type": "number"
          },
          "sampled_at": {
            "type": "string"
          },
          "time_to_first_token_p95_seconds": {
            "type": "number"
          }
        },
        "x-go-name": "ResourceMetricSnapshot"
      },
      "ResourceMetricsResponse": {
        "type": "object",
        "properties": {
          "latest": {
            "$ref": "#/components/schemas/ResourceMetricSnapshot"
          },
          "retention_seconds": {
            "type": "integer"
          },
          "sample_interval_seconds": {
            "type": "integer"
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceMetricSnapshot"
            }
          }
        },
        "x-go-name": "ResourceMetricsResponse"
      },
      "ResponsesRequestEnvelope": {
        "type": "object",
        "properties": {
          "context_management": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Protocol.ContextManagement"
            }
          },
          "input": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "instructions": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "model": {
            "type": "string"
          },
          "previous_response_id": {
            "type": "string"
          },
          "reasoning": {
            "type": "object",
            "properties": {
              "effort": {
                "type": "string"
              }
            }
          },
          "reasoning_effort": {
            "type": "string"
          },
          "store": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "thinking_token_budget": {
            "type": "integer"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "ResponsesRequestEnvelope"
      },
      "RuntimeConfigRequest": {
        "type": "object",
        "properties": {
          "context_size": {
            "type": "integer"
          },
          "dtype": {
            "type": "string"
          },
          "duplex": {
            "type": "boolean"
          },
          "gpu_memory_utilization": {
            "type": "number"
          },
          "kv_cache_dtype": {
            "type": "string"
          },
          "max_num_batched_tokens": {
            "type": "integer"
          },
          "profile": {
            "type": "string"
          },
          "quantization": {
            "type": "string"
          },
          "storage_mounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mount_path": {
                  "type": "string"
                },
                "set_hf_home": {
                  "type": "boolean"
                },
                "subpath": {
                  "type": "string"
                },
                "volume_id": {
                  "type": "string"
                }
              }
            }
          },
          "tensor_parallel_size": {
            "type": "integer"
          }
        },
        "x-go-name": "RuntimeConfigRequest"
      },
      "RuntimeConfigResponse": {
        "type": "object",
        "properties": {
          "context_size": {
            "type": "integer"
          },
          "dtype": {
            "type": "string"
          },
          "duplex": {
            "type": "boolean"
          },
          "gpu_memory_utilization": {
            "type": "number"
          },
          "kv_cache_dtype": {
            "type": "string"
          },
          "max_num_batched_tokens": {
            "type": "integer"
          },
          "profile": {
            "type": "string"
          },
          "quantization": {
            "type": "string"
          },
          "storage_mounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mount_path": {
                  "type": "string"
                },
                "set_hf_home": {
                  "type": "boolean"
                },
                "subpath": {
                  "type": "string"
                },
                "volume_id": {
                  "type": "string"
                }
              }
            }
          },
          "tensor_parallel_size": {
            "type": "integer"
          }
        },
        "x-go-name": "RuntimeConfigResponse"
      },
      "RuntimeMemoryEstimateResponse": {
        "type": "object",
        "properties": {
          "active_parameter_count": {
            "type": "integer"
          },
          "download_size_bytes": {
            "type": "integer"
          },
          "gpu_memory_utilization": {
            "type": "number"
          },
          "kv_cache_vram_gb": {
            "type": "number"
          },
          "model_vram_gb": {
            "type": "number"
          },
          "parameter_count": {
            "type": "integer"
          },
          "per_gpu_required_vram_gb": {
            "type": "number"
          },
          "required_vram_gb": {
            "type": "number"
          },
          "tensor_parallel_size": {
            "type": "integer"
          }
        },
        "x-go-name": "RuntimeMemoryEstimateResponse"
      },
      "ScaleReplicaSetRequest": {
        "type": "object",
        "properties": {
          "desired_replicas": {
            "type": "integer"
          }
        },
        "x-go-name": "ScaleReplicaSetRequest"
      },
      "ScheduleRuleListResponse": {
        "type": "object",
        "properties": {
          "schedule_rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleRuleResponse"
            }
          }
        },
        "x-go-name": "ScheduleRuleListResponse"
      },
      "ScheduleRuleRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "desired_replicas": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "replica_set_id": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "x-go-name": "ScheduleRuleRequest"
      },
      "ScheduleRuleResponse": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "desired_replicas": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          },
          "last_error": {
            "type": "string"
          },
          "last_run_at": {
            "type": "string"
          },
          "next_run_at": {
            "type": "string"
          },
          "replica_set_id": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "ScheduleRuleResponse"
      },
      "SearchHitResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "score": {
            "type": "number"
          },
          "source": {
            "$ref": "#/components/schemas/SearchHitSourceResponse"
          }
        },
        "x-go-name": "SearchHitResponse"
      },
      "SearchHitSourceResponse": {
        "type": "object",
        "properties": {
          "image_url": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "truncate": {
            "type": "boolean"
          }
        },
        "x-go-name": "SearchHitSourceResponse"
      },
      "SearchRecommendRequest": {
        "type": "object",
        "properties": {
          "bias": {
            "type": "number"
          },
          "token": {
            "type": "string"
          }
        },
        "x-go-name": "SearchRecommendRequest"
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "image_url": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "recommend": {
            "$ref": "#/components/schemas/SearchRecommendRequest"
          },
          "top_k": {
            "type": "integer"
          }
        },
        "x-go-name": "SearchRequest"
      },
      "ServingEndpointResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "endpoint_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServingProviderResponse"
            }
          },
          "public_input_per_million_eur": {
            "type": "number"
          },
          "public_output_per_million_eur": {
            "type": "number"
          },
          "state": {
            "type": "string"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supports_duplex": {
            "type": "boolean"
          },
          "supports_thinking": {
            "type": "boolean"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServingTargetResponse"
            }
          },
          "updated_at": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "ServingEndpointResponse"
      },
      "ServingProviderResponse": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supports_tools": {
            "type": "boolean"
          }
        },
        "x-go-name": "ServingProviderResponse"
      },
      "ServingTargetRequest": {
        "type": "object",
        "properties": {
          "instance_id": {
            "type": "string"
          },
          "target_ref_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "ServingTargetRequest"
      },
      "ServingTargetResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "target_ref_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "weight": {
            "type": "integer"
          }
        },
        "x-go-name": "ServingTargetResponse"
      },
      "SmartBalancerRouteDestinationRequest": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "SmartBalancerRouteDestinationRequest"
      },
      "SmartBalancerRouteDestinationResponse": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "SmartBalancerRouteDestinationResponse"
      },
      "SmartBalancerRouteRequest": {
        "type": "object",
        "properties": {
          "destination": {
            "$ref": "#/components/schemas/SmartBalancerRouteDestinationRequest"
          },
          "enabled": {
            "type": "boolean"
          },
          "intent": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          }
        },
        "x-go-name": "SmartBalancerRouteRequest"
      },
      "SmartBalancerRouteResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "destination": {
            "$ref": "#/components/schemas/SmartBalancerRouteDestinationResponse"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "intent": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "SmartBalancerRouteResponse"
      },
      "SmartBalancerRouterModelRequest": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "SmartBalancerRouterModelRequest"
      },
      "SmartBalancerRouterModelResponse": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "SmartBalancerRouterModelResponse"
      },
      "SmartBalancerViewResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "default_route_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "router_model": {
            "$ref": "#/components/schemas/SmartBalancerRouterModelResponse"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartBalancerRouteResponse"
            }
          },
          "routing_mode": {
            "type": "string"
          },
          "serving_endpoint_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "SmartBalancerViewResponse"
      },
      "StorageVolumeResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "error_message": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "StorageVolumeResponse"
      },
      "TargetGroupMemberRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "instance_id": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "weight": {
            "type": "integer"
          }
        },
        "x-go-name": "TargetGroupMemberRequest"
      },
      "TargetGroupMemberResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "updated_at": {
            "type": "string"
          },
          "weight": {
            "type": "integer"
          }
        },
        "x-go-name": "TargetGroupMemberResponse"
      },
      "TargetGroupResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetGroupMemberResponse"
            }
          },
          "name": {
            "type": "string"
          },
          "selection_policy": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "TargetGroupResponse"
      },
      "UnreadCountResponse": {
        "type": "object",
        "properties": {
          "by_severity": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "x-go-name": "UnreadCountResponse"
      },
      "UpdateAccountMemberRequest": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateAccountMemberRequest"
      },
      "UpdateAccountRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "fiscal_customer_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateAccountRequest"
      },
      "UpdateFirewallRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "evaluator_serving_name": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rule_slugs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateFirewallRequest"
      },
      "UpdateFirewallRuleRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "default_severity": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateFirewallRuleRequest"
      },
      "UpdateFiscalProfileRequest": {
        "type": "object",
        "properties": {
          "fiscal_customer_type": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateFiscalProfileRequest"
      },
      "UpdateInstanceRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "gpu_preferences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicGPUPreferenceJSON"
            }
          },
          "idle_timeout_seconds": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "runtime_config": {
            "$ref": "#/components/schemas/RuntimeConfigRequest"
          },
          "runtime_preset": {
            "type": "string"
          },
          "scheduling_mode": {
            "type": "string"
          },
          "serverless_enabled": {
            "type": "boolean"
          },
          "serving_name": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_max_price_per_hour_eur": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_region": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "smart_selection_label": {
            "type": "string"
          },
          "supported_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-go-name": "UpdateInstanceRequest"
      },
      "UpdatePreferencesRequest": {
        "type": "object",
        "properties": {
          "email_2fa_enabled": {
            "type": "boolean"
          }
        },
        "x-go-name": "UpdatePreferencesRequest"
      },
      "UpdateReplicaSetRequest": {
        "type": "object",
        "properties": {
          "desired_replicas": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "scheduling_mode": {
            "type": "string"
          },
          "serving_name": {
            "type": "string"
          },
          "smart_allow_community": {
            "type": "boolean"
          },
          "smart_allow_spot": {
            "type": "boolean"
          },
          "smart_max_price_per_hour_usd": {
            "type": "number"
          },
          "smart_min_gpu_class": {
            "type": "string"
          },
          "smart_min_total_tflops": {
            "type": "number"
          },
          "smart_provider_filter_mode": {
            "type": "string"
          },
          "smart_provider_preference": {
            "type": "string"
          },
          "smart_regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-go-name": "UpdateReplicaSetRequest"
      },
      "UpdateSmartBalancerRequest": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "router_model": {
            "$ref": "#/components/schemas/SmartBalancerRouterModelRequest"
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartBalancerRouteRequest"
            }
          },
          "routing_mode": {
            "type": "string"
          },
          "workload_kind": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateSmartBalancerRequest"
      },
      "UpdateTargetGroupRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetGroupMemberRequest"
            }
          },
          "selection_policy": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateTargetGroupRequest"
      },
      "UpdateVectorDatabaseRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "x-go-name": "UpdateVectorDatabaseRequest"
      },
      "UserInfoResponse": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "x-go-name": "UserInfoResponse"
      },
      "UserPreferencesResponse": {
        "type": "object",
        "properties": {
          "email_2fa_enabled": {
            "type": "boolean"
          },
          "totp_enabled": {
            "type": "boolean"
          }
        },
        "x-go-name": "UserPreferencesResponse"
      },
      "VectorDatabaseResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "embedding_model_ref": {
            "type": "string"
          },
          "embedding_serving_name": {
            "type": "string"
          },
          "error_message": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "opensearch_index_name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "x-go-name": "VectorDatabaseResponse"
      },
      "VerifyEmailResponse": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "x-go-name": "VerifyEmailResponse"
      },
      "ViewElementRequest": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string"
          },
          "recommend_token": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          }
        },
        "x-go-name": "ViewElementRequest"
      },
      "Model": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string"
          },
          "downloads": {
            "type": "integer"
          },
          "likes": {
            "type": "integer"
          },
          "organization": {
            "type": "string"
          },
          "organization_logo_url": {
            "type": "string"
          },
          "pipeline_tag": {
            "type": "string"
          },
          "price_eur_per_hour": {
            "type": "number"
          },
          "pricing_status": {
            "$ref": "#/components/schemas/PricingStatus"
          },
          "recommended_gpu": {
            "$ref": "#/components/schemas/RecommendedGPU"
          },
          "repo_id": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-go-name": "Model"
      },
      "ModelPricesResponse": {
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Model"
            }
          },
          "query": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PricingService"
            }
          },
          "source": {
            "type": "string"
          },
          "source_status": {
            "type": "string"
          },
          "stale": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "x-go-name": "ModelPricesResponse"
      },
      "PricingService": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "price_eur_per_gb_hour": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "status": {
            "type": "string"
          }
        },
        "x-go-name": "PricingService"
      },
      "PricingStatus": {
        "type": "string",
        "enum": [
          "estimated",
          "unavailable"
        ],
        "x-enum-varnames": [
          "PricingEstimated",
          "PricingUnavailable"
        ],
        "x-go-name": "PricingStatus"
      },
      "RecommendedGPU": {
        "type": "object",
        "properties": {
          "availability": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "gpu_count": {
            "type": "integer"
          },
          "market_type": {
            "type": "string"
          },
          "vram_gb": {
            "type": "number"
          }
        },
        "x-go-name": "RecommendedGPU"
      },
      "Protocol.ContextManagement": {
        "type": "object",
        "properties": {
          "compact_threshold": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "x-go-name": "Protocol.ContextManagement"
      },
      "GetTemplateBySlugResponse": {
        "type": "object",
        "properties": {
          "template": {
            "$ref": "#/components/schemas/TemplateWithVariants"
          }
        },
        "x-go-name": "GetTemplateBySlugResponse"
      },
      "GetUserVariantResponse": {
        "type": "object",
        "properties": {
          "variant": {
            "$ref": "#/components/schemas/VariantWithRelations"
          }
        },
        "x-go-name": "GetUserVariantResponse"
      },
      "ListUserVariantsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariantWithRelations"
            }
          },
          "total": {
            "type": "integer"
          }
        },
        "x-go-name": "ListUserVariantsResponse"
      },
      "Template": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "created_by": {
            "type": "string"
          },
          "health_checked_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "health_error": {
            "type": "string"
          },
          "health_status": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_featured": {
            "type": "boolean"
          },
          "ordering": {
            "type": "integer"
          },
          "slug": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Translation"
            }
          },
          "updated_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "updated_by": {
            "type": "string"
          }
        },
        "x-go-name": "Template"
      },
      "TemplateWithVariants": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "template": {
            "$ref": "#/components/schemas/Template"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariantWithRelations"
            }
          }
        },
        "x-go-name": "TemplateWithVariants"
      },
      "Translation": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "Translation"
      },
      "Variant": {
        "type": "object",
        "properties": {
          "artifact_type": {
            "type": "string"
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "gguf_files": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "health_checked_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "health_error": {
            "type": "string"
          },
          "health_status": {
            "type": "string"
          },
          "icon_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "max_context_tokens": {
            "type": "integer"
          },
          "model_id": {
            "type": "string"
          },
          "ordering": {
            "type": "integer"
          },
          "quantization": {
            "type": "string"
          },
          "recommended_preset": {
            "type": "string"
          },
          "revision": {
            "type": "string"
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "system_prompt": {
            "type": "string"
          },
          "temperature": {
            "type": "number"
          },
          "template_id": {
            "type": "string"
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariantTranslation"
            }
          },
          "updated_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "x-go-name": "Variant"
      },
      "VariantTranslation": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-go-name": "VariantTranslation"
      },
      "VariantWithRelations": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "template_category": {
            "type": "string"
          },
          "template_is_active": {
            "type": "boolean"
          },
          "template_slug": {
            "type": "string"
          },
          "template_tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "variant": {
            "$ref": "#/components/schemas/Variant"
          }
        },
        "x-go-name": "VariantWithRelations"
      },
      "Timestamp": {
        "type": "object",
        "properties": {
          "nanos": {
            "description": "Non-negative fractions of a second at nanosecond resolution. This field is\nthe nanosecond portion of the duration, not an alternative to seconds.\nNegative second values with fractions must still have non-negative nanos\nvalues that count forward in time. Must be between 0 and 999,999,999\ninclusive.",
            "type": "integer"
          },
          "seconds": {
            "description": "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must\nbe between -315576000000 and 315576000000 inclusive (which corresponds to\n0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).",
            "type": "integer"
          }
        },
        "x-go-name": "Timestamp"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "TokenFactory API key in the Authorization header."
      },
      "BearerAuth": {
        "description": "Bearer access token with the `Bearer ` prefix.",
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      },
      "RuntimeJWTAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Runtime JWT in the Authorization header."
      }
    }
  }
}
