{
  "openapi": "3.1.0",
  "info": {
    "title": "Phala Cloud API",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://cloud-api.phala.com"
    }
  ],
  "paths": {
    "/api/v1/cvms/provision/eliza": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Provision Eliza app",
        "description": "Validates Eliza configuration and caches it for 14 days. Returns compose_hash and KMS info for on-chain registration.",
        "operationId": "handle_provision_cvm_for_eliza_api_v1_cvms_provision_eliza_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionElizaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provision data with compose_hash for creation",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid configuration"
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/provision": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Provision DStack app",
        "description": "Validates Docker Compose configuration and caches it for 14 days. Returns compose_hash and KMS info for on-chain registration before creation.",
        "operationId": "handle_provision_cvm_api_v1_cvms_provision_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionDstackAppRequestV2"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provision data with compose_hash for creation",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid Docker Compose configuration"
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/cvms/workload": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Create GPU workload CVM",
        "description": "Creates a CVM for GPU workloads. Node is auto-selected from available GPU nodes.",
        "operationId": "handle_create_cvm_for_workload_api_v1_cvms_workload_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkloadTappRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Created CVM record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "400": {
            "description": "Creation failed"
          },
          "401": {
            "description": "Authentication required"
          },
          "409": {
            "description": "CVM name already exists in workspace"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/cvms": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Create CVM from provision",
        "description": "Creates a CVM using cached provision data from /cvms/provision. Requires compose_hash from the provision response.",
        "operationId": "handle_create_cvm_from_povision_api_v1_cvms_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTappRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created CVM record with teepod info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload or provision data expired"
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Provision data not found"
          }
        }
      },
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "List CVMs",
        "description": "Returns CVMs in current workspace. Admins can filter by user_id or teepod_id.",
        "operationId": "handle_list_cvms_api_v1_cvms_get",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "const": "0",
                  "type": "string"
                },
                {
                  "type": "string",
                  "format": "hashid",
                  "description": "A hashed identifier that maps to an internal database ID",
                  "pattern": "^usr_.+",
                  "title": "HashedId[users]",
                  "examples": [
                    "usr_0123abcd"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by owner (admin only). Use '0' for unassigned.",
              "title": "User Id"
            },
            "description": "Filter by owner (admin only). Use '0' for unassigned."
          },
          {
            "name": "teepod_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by node ID (admin only)",
              "title": "Teepod Id"
            },
            "description": "Filter by node ID (admin only)"
          }
        ],
        "responses": {
          "200": {
            "description": "List of CVM summaries",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HostedCvm"
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/teehouse__api__routes__cvms__v20260121__schemas__CVMInfo"
                      }
                    }
                  ],
                  "title": "Response Handle List Cvms Api V1 Cvms Get"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/eliza": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Create Eliza from provision",
        "description": "Creates an Eliza CVM using cached provision data from /cvms/provision/eliza. Requires compose_hash from the provision response.",
        "operationId": "handle_create_eliza_from_provision_api_v1_cvms_eliza_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTappRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Created Eliza CVM record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload"
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Provision data not found or expired"
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/compose_file": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get raw compose file",
        "description": "Returns the complete compose file as JSON or raw text based on query param.",
        "operationId": "get_cvm_compose_file_api_v1_cvms__cvm_id__compose_file_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "raw",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Raw"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compose file content",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "500": {
            "description": "Failed to retrieve compose file"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Trigger compose file update",
        "description": "Applies a provisioned compose file update. Requires compose_hash from provision endpoint. Restarts the CVM with new configuration.",
        "operationId": "trigger_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_trigger_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_patch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Update initiated",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Provision not found or invalid CVM"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "503": {
            "description": "Node under maintenance"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Submit compose file update",
        "description": "Submit complete compose file with hash verification. Use when you have pre-computed compose_hash and want to skip provision step.",
        "operationId": "submit_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeFileUpdateRequest",
                "description": "Complete compose file with hash"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Update initiated",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid CVM or hash mismatch"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Invalid Docker Compose syntax"
          },
          "503": {
            "description": "Node under maintenance"
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/compose_file/provision": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Provision compose file update",
        "description": "Validates new compose file and returns compose_hash for on-chain registration. Cache expires after 14 days.",
        "operationId": "provision_for_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_provision_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionComposeFileUpdateRequest",
                "description": "Updated compose configuration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Provision response with compose_hash and KMS info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComposeFileProvisionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Empty Docker Compose file or invalid CVM"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Invalid Docker Compose syntax"
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/replicas": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Replicate CVM",
        "description": "Create a replica of the CVM on a target node. If request body is omitted, it replicates to the source node and reuses existing env.",
        "operationId": "handle_replicate_cvm_api_v1_cvms__cvm_id__replicas_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "X-Prepare-Only",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Prepare-Only"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ReplicateRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replica CVM created",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid target node, image mismatch, or invalid encrypted_env"
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM or target node not found"
          },
          "465": {
            "description": "KMS allowlist rejection (contract-owned KMS)"
          },
          "500": {
            "description": "Replication failed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/operations": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "List CVM operations",
        "description": "Returns operation records grouped by correlation_id. Only includes events with correlation_id (new format since 2024-01). Error messages are sanitized for non-admin users.",
        "operationId": "get_cvm_operations_api_v1_cvms__cvm_id__operations_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from previous response",
              "title": "Cursor"
            },
            "description": "Opaque cursor from previous response"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Page size",
              "default": 50,
              "title": "Limit"
            },
            "description": "Page size"
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Include operations started after this UTC time",
              "title": "Start Time"
            },
            "description": "Include operations started after this UTC time"
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Include operations started before this UTC time",
              "title": "End Time"
            },
            "description": "Include operations started before this UTC time"
          },
          {
            "name": "operation_types",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by operation types (e.g. compose_update, power_on)",
              "title": "Operation Types"
            },
            "description": "Filter by operation types (e.g. compose_update, power_on)"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated operation records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCvmOperationsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/operations/cancel": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Cancel in-progress CVM operation",
        "description": "Cancel the current in-progress operation for a CVM. Revokes the Celery task and clears the operation lock.",
        "operationId": "cancel_cvm_operation_api_v1_cvms__cvm_id__operations_cancel_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operation cancelled or no operation to cancel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelOperationRequest"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Cannot cancel this operation type"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/docker-compose.yml": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get Docker Compose file",
        "description": "Returns the raw Docker Compose YAML content from the CVM configuration.",
        "operationId": "handle_get_cvm_docker_compose_api_v1_cvms__cvm_id__docker_compose_yml_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Docker Compose YAML content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "title": "Response Handle Get Cvm Docker Compose Api V1 Cvms  Cvm Id  Docker Compose Yml Get"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/pre-launch-script": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get pre-launch script",
        "description": "Returns the shell script that runs before containers start.",
        "operationId": "handle_get_cvm_prelaunch_script_api_v1_cvms__cvm_id__pre_launch_script_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pre-launch shell script content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "title": "Response Handle Get Cvm Prelaunch Script Api V1 Cvms  Cvm Id  Pre Launch Script Get"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Update pre-launch script",
        "description": "Replaces the pre-launch script and restarts the CVM. For contract-owned KMS, requires two-phase flow with on-chain hash registration.",
        "operationId": "update_cvm_pre_launch_script_api_v1_cvms__cvm_id__pre_launch_script_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "X-Compose-Hash",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Compose hash from Phase 1 response",
              "title": "X-Compose-Hash"
            },
            "description": "Compose hash from Phase 1 response"
          },
          {
            "name": "X-Transaction-Hash",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Transaction hash proving on-chain registration",
              "title": "X-Transaction-Hash"
            },
            "description": "Transaction hash proving on-chain registration"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_cvm_pre_launch_script_api_v1_cvms__cvm_id__pre_launch_script_patch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Update initiated, track via correlation_id",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid content type or empty body"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "465": {
            "description": "Compose hash registration required (Phase 1)"
          },
          "466": {
            "description": "Compose hash invalid or expired"
          },
          "467": {
            "description": "Transaction verification failed"
          },
          "468": {
            "description": "Compose hash not allowed on-chain"
          },
          "500": {
            "description": "KMS configuration or RPC error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/available-os-images": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "List available OS images",
        "description": "Returns OS images this CVM can upgrade to, filtered by node availability, KMS allowlist, dev/prod upgrade rules, and GPU compatibility.",
        "operationId": "get_available_os_images_api_v1_cvms__cvm_id__available_os_images_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OS images grouped by version (newest first)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/teehouse__api__routes__cvms__patch_compose_file__AvailableOSImage"
                  },
                  "title": "Response Get Available Os Images Api V1 Cvms  Cvm Id  Available Os Images Get"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/os-image": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Update OS image",
        "description": "Upgrades the CVM to a different OS image. Shuts down, updates, and restarts. Takes several minutes. Track progress via correlation_id.",
        "operationId": "update_cvm_os_image_api_v1_cvms__cvm_id__os_image_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_cvm_os_image_api_v1_cvms__cvm_id__os_image_patch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Upgrade initiated, returns correlation_id",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "OS image not available for this CVM"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/envs": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Update environment variables",
        "description": "Updates encrypted environment variables. If env_keys changes for contract-owned KMS, requires two-phase flow with on-chain hash registration.",
        "operationId": "update_cvm_envs_api_v1_cvms__cvm_id__envs_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_cvm_envs_api_v1_cvms__cvm_id__envs_patch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Update initiated, returns correlation_id and allowed_envs_changed flag",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "465": {
            "description": "Compose hash registration required (env_keys changed, Phase 1)"
          },
          "466": {
            "description": "Compose hash invalid or expired"
          },
          "467": {
            "description": "Transaction verification failed"
          },
          "468": {
            "description": "Compose hash not allowed on-chain"
          },
          "500": {
            "description": "KMS configuration or RPC error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/docker-compose": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Update Docker Compose file",
        "description": "Replaces the docker-compose.yml and restarts the CVM. For contract-owned KMS, requires two-phase flow with on-chain hash registration.",
        "operationId": "update_cvm_docker_compose_api_v1_cvms__cvm_id__docker_compose_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "X-Compose-Hash",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Compose hash from Phase 1 response",
              "title": "X-Compose-Hash"
            },
            "description": "Compose hash from Phase 1 response"
          },
          {
            "name": "X-Transaction-Hash",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Transaction hash proving on-chain registration",
              "title": "X-Transaction-Hash"
            },
            "description": "Transaction hash proving on-chain registration"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_update_cvm_docker_compose_api_v1_cvms__cvm_id__docker_compose_patch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Update initiated, track via correlation_id",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid content type or empty body"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "465": {
            "description": "Compose hash registration required (Phase 1)"
          },
          "466": {
            "description": "Compose hash invalid or expired"
          },
          "467": {
            "description": "Transaction verification failed"
          },
          "468": {
            "description": "Compose hash not allowed on-chain"
          },
          "500": {
            "description": "KMS configuration or RPC error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/revisions/{revision_id}/redeploy": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Redeploy CVM from a specific revision",
        "description": "Switch/rollback a CVM to a specified app revision (compose_hash).",
        "operationId": "redeploy_cvm_revision_api_v1_cvms__cvm_id__revisions__revision_id__redeploy_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "revision_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Revision Id"
            }
          },
          {
            "name": "transaction_hash",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional transaction hash proving on-chain compose hash registration",
              "title": "Transaction Hash"
            },
            "description": "Optional transaction hash proving on-chain compose hash registration"
          }
        ],
        "responses": {
          "202": {
            "description": "Activation initiated",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "CVM or revision not found"
          },
          "409": {
            "description": "Another operation is in progress"
          },
          "465": {
            "description": "Compose hash registration required (contract-owned KMS)"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/instance-ids": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Batch refresh CVM instance IDs",
        "description": "Resolves and persists missing instance_id values. Admin can pass cross-workspace CVM IDs.",
        "operationId": "handle_batch_refresh_cvm_instance_ids_api_v1_cvms_instance_ids_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchInstanceIdRefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchInstanceIdRefreshResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/paginated": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "List CVMs (paginated)",
        "description": "Returns paginated CVMs in current workspace with total count.",
        "operationId": "handle_list_cvms_paginated_api_v1_cvms_paginated_get",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "const": "0",
                  "type": "string"
                },
                {
                  "type": "string",
                  "format": "hashid",
                  "description": "A hashed identifier that maps to an internal database ID",
                  "pattern": "^usr_.+",
                  "title": "HashedId[users]",
                  "examples": [
                    "usr_0123abcd"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by owner (admin only). Use '0' for unassigned.",
              "title": "User Id"
            },
            "description": "Filter by owner (admin only). Use '0' for unassigned."
          },
          {
            "name": "teepod_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by node ID (admin only)",
              "title": "Teepod Id"
            },
            "description": "Filter by node ID (admin only)"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-indexed)",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number (1-indexed)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page (max 100)",
              "default": 30,
              "title": "Page Size"
            },
            "description": "Items per page (max 100)"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated CVM list with total count",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedHostedCvms"
                    },
                    {
                      "$ref": "#/components/schemas/PaginatedCvmInfos"
                    }
                  ],
                  "title": "Response Handle List Cvms Paginated Api V1 Cvms Paginated Get"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/instance-id": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Refresh CVM instance ID",
        "description": "Resolve and persist instance_id for a CVM. Default behavior only backfills missing values.",
        "operationId": "handle_refresh_cvm_instance_id_api_v1_cvms__cvm_id__instance_id_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceIdRefreshRequest",
                "default": {
                  "overwrite": false,
                  "dry_run": false
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceIdRefreshResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get CVM details",
        "description": "Returns full CVM details including status, network info, and KMS configuration.",
        "operationId": "handle_get_cvm_api_v1_cvms__cvm_id__get",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CVM details",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/teehouse__api__routes__cvms__management__CvmBasicInfo"
                    },
                    {
                      "$ref": "#/components/schemas/CVMInfoDetail"
                    }
                  ],
                  "title": "Response Handle Get Cvm Api V1 Cvms  Cvm Id  Get"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CVMs"
        ],
        "summary": "Delete CVM",
        "description": "Stops and permanently deletes CVM. Data is not recoverable.",
        "operationId": "handle_remove_cvm_api_v1_cvms__cvm_id__delete",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deletion initiated"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Update CVM",
        "description": "Unified PATCH endpoint for CVM updates. Only fields present in the request body are applied. Handles resource resize, compose configuration, visibility, environment, and OS image updates. For contract-owned KMS, compose-hash-affecting changes require two-phase flow with on-chain hash registration.",
        "operationId": "update_cvm_endpoint_api_v1_cvms__cvm_id__patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "X-Compose-Hash",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Compose hash from Phase 1 response (Phase 2 only)",
              "title": "X-Compose-Hash"
            },
            "description": "Compose hash from Phase 1 response (Phase 2 only)"
          },
          {
            "name": "X-Transaction-Hash",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Transaction hash proving on-chain registration (Phase 2 only)",
              "title": "X-Transaction-Hash"
            },
            "description": "Transaction hash proving on-chain registration (Phase 2 only)"
          },
          {
            "name": "X-Prepare-Only",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "When 'true', generate a commit token for multisig workflows instead of expecting immediate on-chain registration",
              "title": "X-Prepare-Only"
            },
            "description": "When 'true', generate a commit token for multisig workflows instead of expecting immediate on-chain registration"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCvmRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Update initiated, track via correlation_id",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid request or terms violation"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace or GPU rental managed"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "465": {
            "description": "Compose hash registration required (Phase 1)"
          },
          "466": {
            "description": "Compose hash invalid or expired"
          },
          "467": {
            "description": "Transaction verification failed"
          },
          "468": {
            "description": "Compose hash not allowed on-chain"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/stats": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get CVM system stats",
        "description": "Returns live system metrics (CPU, memory, disk) from the running CVM.",
        "operationId": "handle_get_cvm_stats_api_v1_cvms__cvm_id__stats_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "System stats (may be partial if CVM offline)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvmSystemInfo"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/attestation": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get CVM attestation",
        "description": "Returns TEE attestation data including TCB info and app certificates.",
        "operationId": "handle_get_cvm_attestation_api_v1_cvms__cvm_id__attestation_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attestation report (may have error if CVM offline)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvmAttestation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/network": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get CVM network info",
        "description": "Returns network status including internal IP, handshake time, and public URLs.",
        "operationId": "handle_get_cvm_network_info_api_v1_cvms__cvm_id__network_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Network info (may have error if offline)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvmNetwork"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Access denied"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/start": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Start CVM",
        "description": "Powers on a stopped CVM. GPU allocation happens during start.",
        "operationId": "handle_start_cvm_api_v1_cvms__cvm_id__start_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CVM record with starting status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "400": {
            "description": "Insufficient balance"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "500": {
            "description": "GPU allocation failed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/shutdown": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Shutdown CVM",
        "description": "Gracefully shuts down CVM (SIGTERM then SIGKILL after timeout). Triggers billing.",
        "operationId": "handle_shutdown_cvm_api_v1_cvms__cvm_id__shutdown_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CVM record with shutting_down status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM managed by on-demand GPU rental"
          },
          "404": {
            "description": "CVM not found"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/stop": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Force stop CVM",
        "description": "Immediately stops CVM (like pulling power). Cancels any in-progress operation. Triggers billing.",
        "operationId": "handle_stop_cvm_api_v1_cvms__cvm_id__stop_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CVM record with stopping status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM managed by on-demand GPU rental"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/restart": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Restart CVM",
        "description": "Stops and starts CVM. Use force=true to skip graceful shutdown.",
        "operationId": "handle_restart_cvm_api_v1_cvms__cvm_id__restart_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_handle_restart_cvm_api_v1_cvms__cvm_id__restart_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CVM record with restarting status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "400": {
            "description": "Insufficient balance"
          },
          "409": {
            "description": "Another operation in progress"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/operation-status": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get operation status",
        "description": "Returns current in-progress operation details including Celery task status.",
        "operationId": "get_operation_status_api_v1_cvms__cvm_id__operation_status_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operation status (idle if none in progress)",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "CVM not in workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/name": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Handle Update Cvm Name",
        "description": "Update CVM name with RFC 1123 validation and availability check",
        "operationId": "handle_update_cvm_name_api_v1_cvms__cvm_id__name_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_handle_update_cvm_name_api_v1_cvms__cvm_id__name_patch"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/listed": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Handle Update Cvm Listed",
        "operationId": "handle_update_cvm_listed_api_v1_cvms__cvm_id__listed_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_handle_update_cvm_listed_api_v1_cvms__cvm_id__listed_patch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/scheduled-delete": {
      "patch": {
        "tags": [
          "CVMs"
        ],
        "summary": "Handle Update Cvm Scheduled Delete",
        "description": "Update CVM scheduled delete time",
        "operationId": "handle_update_cvm_scheduled_delete_api_v1_cvms__cvm_id__scheduled_delete_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_handle_update_cvm_scheduled_delete_api_v1_cvms__cvm_id__scheduled_delete_patch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/batch-stop": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Batch stop CVMs",
        "description": "Force stop multiple CVMs at once. Non-admin users can only stop CVMs in their current workspace. Admin users can stop any CVM. Max 50 per request.",
        "operationId": "handle_batch_stop_cvms_api_v1_cvms_batch_stop_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchStopRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Batch stop summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchStopResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "400": {
            "description": "Invalid request (e.g. too many CVMs)"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/status/batch": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Handle Batch Cvm Status",
        "description": "Batch query CVM real-time status.\n\nGroups by teepod and queries in parallel, returns status updates with\ncomplete async operation information.",
        "operationId": "handle_batch_cvm_status_api_v1_status_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "$ref": "#/components/schemas/CvmStatus"
                  },
                  "type": "object",
                  "title": "Response Handle Batch Cvm Status Api V1 Status Batch Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/cvms/{cvm_id}/state": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Handle Get Cvm State",
        "description": "Get CVM state. Supports two modes:\n\n1. Immediate mode (no target): Returns current state immediately\n2. SSE mode (with target): Streams state updates until status matches target or timeout\n\nExample:\n    GET /cvms/{cvm_id}/state - Returns current state\n    GET /cvms/{cvm_id}/state?target=running - Streams until status becomes 'running'\n\nSSE connection limit: 5 concurrent connections per user",
        "operationId": "handle_get_cvm_state_api_v1_cvms__cvm_id__state_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Target status to wait for. If specified, returns SSE stream.",
              "title": "Target"
            },
            "description": "Target status to wait for. If specified, returns SSE stream."
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 30,
              "minimum": 5,
              "description": "Polling interval in seconds (5-30)",
              "default": 5,
              "title": "Interval"
            },
            "description": "Polling interval in seconds (5-30)"
          },
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 600,
              "minimum": 10,
              "description": "Maximum wait time in seconds (10-600)",
              "default": 300,
              "title": "Timeout"
            },
            "description": "Maximum wait time in seconds (10-600)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/network-config": {
      "get": {
        "tags": [
          "CVMs",
          "cvms-network-config"
        ],
        "summary": "Get network configuration",
        "description": "Returns real-time KMS URLs, Gateway URLs, and port mappings from VMM.",
        "operationId": "handle_get_network_config_api_v1_cvms__cvm_id__network_config_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Network configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkConfigResponse"
                }
              }
            }
          },
          "404": {
            "description": "CVM not found"
          },
          "500": {
            "description": "Failed to query VMM"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CVMs",
          "cvms-network-config"
        ],
        "summary": "Update KMS/Gateway URLs",
        "description": "Update KMS and/or Gateway URLs for this CVM. Requires VMM >= 0.5.7.",
        "operationId": "handle_update_network_config_api_v1_cvms__cvm_id__network_config_patch",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNetworkConfigRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated network configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkConfigResponse"
                }
              }
            }
          },
          "400": {
            "description": "VMM too old or invalid request"
          },
          "403": {
            "description": "Feature not enabled for this workspace"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/ports": {
      "get": {
        "tags": [
          "CVMs",
          "cvms-network-config"
        ],
        "summary": "Get port mappings",
        "description": "Returns persisted port mappings for this CVM.",
        "operationId": "handle_get_port_mappings_api_v1_cvms__cvm_id__ports_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Port mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PortMappingResponse"
                  },
                  "title": "Response Handle Get Port Mappings Api V1 Cvms  Cvm Id  Ports Get"
                }
              }
            }
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "CVMs",
          "cvms-network-config"
        ],
        "summary": "Set port mappings",
        "description": "Bulk-replace all port mappings for this CVM. Writes to DB and applies to VMM.",
        "operationId": "handle_set_port_mappings_api_v1_cvms__cvm_id__ports_put",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePortMappingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated port mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PortMappingResponse"
                  },
                  "title": "Response Handle Set Port Mappings Api V1 Cvms  Cvm Id  Ports Put"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Feature not enabled for this workspace"
          },
          "409": {
            "description": "Port conflict during concurrent updates"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/firewall-status": {
      "get": {
        "tags": [
          "CVMs",
          "cvms-network-config"
        ],
        "summary": "Get firewall availability for this CVM's node",
        "description": "Checks teescope capabilities.firewall on the node hosting this CVM.",
        "operationId": "handle_get_firewall_status_api_v1_cvms__cvm_id__firewall_status_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirewallStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/commit-update": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get commit token info (no auth required)",
        "description": "Read-only lookup of commit token metadata for the confirm-update page.",
        "operationId": "get_commit_update_info_api_v1_cvms__cvm_id__commit_update_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Commit CVM update (token-based, no auth required)",
        "description": "Completes a two-phase CVM update using a one-time commit token. The token was generated during a prepare-only PATCH request. No workspace authentication is required — the commit token is the credential.",
        "operationId": "commit_cvm_update_api_v1_cvms__cvm_id__commit_update_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Commit token (alternative to body.token)",
              "title": "Token"
            },
            "description": "Commit token (alternative to body.token)"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommitUpdateRequest",
                "default": {
                  "token": "",
                  "compose_hash": "",
                  "transaction_hash": ""
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/commit-replica": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Commit CVM replica (token-based, no auth required)",
        "description": "Completes a two-phase CVM replication using a one-time commit token. The token was generated during a prepare-only or hash-required replica request.",
        "operationId": "commit_cvm_replica_api_v1_cvms__cvm_id__commit_replica_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Commit token (alternative to body.token)",
              "title": "Token"
            },
            "description": "Commit token (alternative to body.token)"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommitUpdateRequest",
                "default": {
                  "token": "",
                  "compose_hash": "",
                  "transaction_hash": ""
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/customize-domain-diagnose": {
      "post": {
        "tags": [
          "CVMs"
        ],
        "summary": "Diagnose custom domain DNS",
        "description": "Verify DNS records for custom domain configuration. Checks CNAME pointing to CVM, TXT records for app verification, and CAA records.",
        "operationId": "diagnose_custom_domains_api_v1_cvms__cvm_id__customize_domain_diagnose_post",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiagnoseDomainsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiagnosisResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or multiple CVMs with same name"
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No access to this CVM"
          },
          "404": {
            "description": "CVM not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cvms/{cvm_id}/user_config": {
      "get": {
        "tags": [
          "CVMs"
        ],
        "summary": "Get CVM user config",
        "description": "Returns the user_config stored in Teepod for this CVM, including injected SSH keys.",
        "operationId": "get_cvm_user_config_api_v1_cvms__cvm_id__user_config_get",
        "parameters": [
          {
            "name": "cvm_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cvm Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User config retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CvmUserConfig"
                }
              }
            }
          },
          "400": {
            "description": "Invalid CVM identifier format, or multiple CVMs share the same name"
          },
          "401": {
            "description": "Not authenticated"
          },
          "404": {
            "description": "CVM not found or not accessible in this workspace"
          },
          "502": {
            "description": "Teepod returned an error or invalid user_config JSON"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kms": {
      "get": {
        "tags": [
          "KMS"
        ],
        "summary": "List KMS instances",
        "description": "Query available KMS instances with pagination. Filter by onchain status to find instances with blockchain integration.",
        "operationId": "list_kms_api_v1_kms_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-indexed)",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number (1-indexed)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page (1-100)",
              "default": 20,
              "title": "Page Size"
            },
            "description": "Items per page (1-100)"
          },
          {
            "name": "is_onchain",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter: true=onchain only, false=offchain only, omit=all",
              "title": "Is Onchain"
            },
            "description": "Filter: true=onchain only, false=offchain only, omit=all"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KmsListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kms/{kms_id}": {
      "get": {
        "tags": [
          "KMS"
        ],
        "summary": "Get KMS details",
        "description": "Retrieve KMS instance details by hashed ID or slug.",
        "operationId": "get_kms_info_api_v1_kms__kms_id__get",
        "parameters": [
          {
            "name": "kms_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "KMS ID (hashed) or slug",
              "title": "Kms Id"
            },
            "description": "KMS ID (hashed) or slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KMSInfo"
                }
              }
            }
          },
          "404": {
            "description": "KMS not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kms/{kms_id}/pubkey/{app_id}": {
      "get": {
        "tags": [
          "KMS"
        ],
        "summary": "Get app encryption pubkey",
        "description": "Retrieve the public key for encrypting environment variables before deployment.",
        "operationId": "get_app_env_encrypt_pubkey_api_v1_kms__kms_id__pubkey__app_id__get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "40-character hex string, with or without 0x prefix",
              "title": "App Id"
            },
            "description": "40-character hex string, with or without 0x prefix"
          },
          {
            "name": "kms_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "KMS ID (hashed) or slug",
              "title": "Kms Id"
            },
            "description": "KMS ID (hashed) or slug"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid app ID format"
          },
          "404": {
            "description": "KMS not found"
          },
          "500": {
            "description": "KMS connection or internal error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kms/phala/next_app_id": {
      "get": {
        "tags": [
          "KMS"
        ],
        "summary": "Predict next app IDs",
        "description": "Predict the next N app IDs that will be assigned to the team's wallet. Maximum 20 predictions allowed.",
        "operationId": "get_next_app_id_api_v1_kms_phala_next_app_id_get",
        "parameters": [
          {
            "name": "counts",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 20,
              "minimum": 1,
              "description": "Number of app IDs to predict (1-20)",
              "default": 1,
              "title": "Counts"
            },
            "description": "Number of app IDs to predict (1-20)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "Workspace not found"
          },
          "500": {
            "description": "Team has no wallet or prediction failed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kms/{kms_id}/info": {
      "get": {
        "tags": [
          "KMS"
        ],
        "summary": "Inspect KMS instance",
        "description": "Real-time inspection of a KMS instance. Queries KMS RPC, guest agent, associated Teepod VMMs, and on-chain contract data with cross-validation.",
        "operationId": "inspect_kms_api_v1_kms__kms_id__info_get",
        "parameters": [
          {
            "name": "kms_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Kms Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KmsInspectResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kms/on-chain/{chain}": {
      "get": {
        "tags": [
          "KMS"
        ],
        "summary": "Get on-chain KMS details by chain",
        "description": "Returns KMS contracts on the specified chain with device and OS image whitelist status.",
        "operationId": "get_kms_onchain_detail_api_v1_kms_on_chain__chain__get",
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Chain"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnChainKmsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported chain name"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "List apps",
        "description": "Returns paginated app list with filtering. Response schema varies by API version.",
        "operationId": "list_dstack_apps_api_v1_apps_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-indexed)",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number (1-indexed)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page",
              "default": 20,
              "title": "Page Size"
            },
            "description": "Items per page"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Search name, app_id, vm_uuid, instance_id",
              "title": "Search"
            },
            "description": "Search name, app_id, vm_uuid, instance_id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "CVM status filter",
              "title": "Status"
            },
            "description": "CVM status filter"
          },
          {
            "name": "listed",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Listed status filter",
              "title": "Listed"
            },
            "description": "Listed status filter"
          },
          {
            "name": "base_image",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "OS image name filter",
              "title": "Base Image"
            },
            "description": "OS image name filter"
          },
          {
            "name": "instance_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Instance type filter",
              "title": "Instance Type"
            },
            "description": "Instance type filter"
          },
          {
            "name": "kms_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "KMS slug filter",
              "title": "Kms Slug"
            },
            "description": "KMS slug filter"
          },
          {
            "name": "kms_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "KMS type filter",
              "title": "Kms Type"
            },
            "description": "KMS type filter"
          },
          {
            "name": "node",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Node name filter (matches teepod or node name)",
              "title": "Node"
            },
            "description": "Node name filter (matches teepod or node name)"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Region identifier filter",
              "title": "Region"
            },
            "description": "Region identifier filter"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated app list",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/teehouse__api__routes__apps__v20251028__schemas__DstackAppListResponse"
                    },
                    {
                      "$ref": "#/components/schemas/teehouse__api__routes__apps__v20260121__schemas__DstackAppListResponse"
                    }
                  ],
                  "title": "Response List Dstack Apps Api V1 Apps Get"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/filter-options": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Get app filter options",
        "description": "Returns distinct values for each filterable field based on user's apps.",
        "operationId": "get_filter_options_api_v1_apps_filter_options_get",
        "responses": {
          "200": {
            "description": "Available filter values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilterOptionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          }
        }
      }
    },
    "/api/v1/apps/{app_id}": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Get app details",
        "description": "Returns app metadata and current CVM configuration. Response schema varies by API version.",
        "operationId": "get_dstack_app_api_v1_apps__app_id__get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "App details with CVM info",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/teehouse__api__routes__apps__v20251028__schemas__DstackAppFullResponse"
                    },
                    {
                      "$ref": "#/components/schemas/DstackAppMinimalResponse"
                    },
                    {
                      "$ref": "#/components/schemas/teehouse__api__routes__apps__v20260121__schemas__DstackAppFullResponse"
                    },
                    {
                      "$ref": "#/components/schemas/DstackAppMinimalResponse"
                    }
                  ],
                  "title": "Response Get Dstack App Api V1 Apps  App Id  Get"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/cvms": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "List app CVMs",
        "description": "Returns CVM instances for an app. Admins see all instances; users see only their own.",
        "operationId": "handle_get_app_cvms_api_v1_apps__app_id__cvms_get",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "List of CVM instances",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HostedCvm"
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/teehouse__api__routes__cvms__v20260121__schemas__CVMInfo"
                      }
                    }
                  ],
                  "title": "Response Handle Get App Cvms Api V1 Apps  App Id  Cvms Get"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/cvms/{vm_uuid}/replicas": {
      "post": {
        "tags": [
          "Apps"
        ],
        "summary": "Create CVM replica",
        "description": "Clones a CVM to a target node. Uses source node if target not specified.",
        "operationId": "handle_replicate_cvm_api_v1_apps__app_id__cvms__vm_uuid__replicas_post",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          },
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Source CVM UUID",
              "title": "Vm Uuid"
            },
            "description": "Source CVM UUID"
          },
          {
            "name": "X-Prepare-Only",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Prepare-Only"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ReplicateRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replica CVM created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "400": {
            "description": "App ID mismatch, no OS image, or invalid target node"
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "CVM or target node not found"
          },
          "500": {
            "description": "Replication failed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/instances": {
      "post": {
        "tags": [
          "Apps"
        ],
        "summary": "Create a new instance under an existing app",
        "description": "Deploy a new CVM instance under an existing app, optionally with a new Docker Compose file. For on-chain KMS apps, this uses a two-phase flow: the first request returns HTTP 465 with a commit token; after registering the compose hash on-chain, the second request commits with the token and transaction hash.",
        "operationId": "handle_create_app_instance_api_v1_apps__app_id__instances_post",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAppInstanceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Instance created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VM"
                }
              }
            }
          },
          "400": {
            "description": "Invalid compose, no template instance, or app mismatch"
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App or target node not found"
          },
          "465": {
            "description": "On-chain compose hash registration required (two-phase flow)"
          },
          "500": {
            "description": "Instance creation failed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/device-allowlist": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Get device allowlist status",
        "description": "Returns the device_id allowlist status for an app's CVMs. For on-chain KMS apps, queries the blockchain in real-time to check which devices are registered in the app contract.",
        "operationId": "get_device_allowlist_api_v1_apps__app_id__device_allowlist_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Device allowlist status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceAllowlistResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "404": {
            "description": "App not found or not on-chain KMS"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/attestations": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Get app attestation data",
        "description": "Returns TEE attestation quotes, event logs, and KMS configuration for running CVMs.",
        "operationId": "handle_get_app_attestation_api_v1_apps__app_id__attestations_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Attestation data with KMS info and instance quotes",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/attestations/tcb-evaluation": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Run app TCB evaluation",
        "description": "Runs a live Intel PCS early collateral evaluation for each running CVM without using Redis collateral cache.",
        "operationId": "handle_get_app_tcb_evaluation_api_v1_apps__app_id__attestations_tcb_evaluation_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "TCB evaluation results for running instances",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TcbEvaluationResponse"
                }
              }
            }
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/revisions": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "List app revisions",
        "description": "Returns deployment history with compose hashes, operation types, and user refs.",
        "operationId": "get_app_revisions_api_v1_apps__app_id__revisions_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number (1-indexed)",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number (1-indexed)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "description": "Items per page",
              "default": 50,
              "title": "Page Size"
            },
            "description": "Items per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated revision list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppRevisionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/revisions/{revision_id}": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Get revision detail",
        "description": "Returns full revision data including compose file, encrypted env, and user config.",
        "operationId": "get_app_revision_detail_api_v1_apps__app_id__revisions__revision_id__get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          },
          {
            "name": "revision_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Revision Id"
            }
          },
          {
            "name": "raw_compose_file",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Return compose_file as string instead of dict",
              "default": false,
              "title": "Raw Compose File"
            },
            "description": "Return compose_file as string instead of dict"
          }
        ],
        "responses": {
          "200": {
            "description": "Revision detail with compose file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppRevisionDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App or revision not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/revisions/{revision_id}/redeploy": {
      "post": {
        "tags": [
          "Apps"
        ],
        "summary": "Redeploy app from a specific revision",
        "description": "Redeploy a CVM to a specific revision. If the app has exactly one CVM, it will be redeployed by default. If the app has multiple CVMs, you must specify target vm_uuids in request body. This schedules async CVM update task(s).",
        "operationId": "redeploy_app_revision_api_v1_apps__app_id__revisions__revision_id__redeploy_post",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          },
          {
            "name": "revision_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Revision Id"
            }
          },
          {
            "name": "transaction_hash",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional transaction hash proving on-chain compose hash registration",
              "title": "Transaction Hash"
            },
            "description": "Optional transaction hash proving on-chain compose hash registration"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RedeployRevisionRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Optional target CVM selection. If the app has multiple CVMs, you must specify vm_uuids.",
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Activation initiated",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App or revision not found"
          },
          "409": {
            "description": "Another operation is in progress"
          },
          "465": {
            "description": "Compose hash registration required (contract-owned KMS)"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/usage": {
      "get": {
        "tags": [
          "Apps"
        ],
        "summary": "Get app metered usage",
        "description": "Returns billing usage records from ClickHouse. Defaults to 7-day window if dates not specified.",
        "operationId": "get_app_usage_api_v1_apps__app_id__usage_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2024-01-01T00:00:00Z"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date (ISO 8601)",
              "title": "Start Date"
            },
            "description": "Start date (ISO 8601)"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "examples": [
                    "2024-01-01T00:00:00Z"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date (ISO 8601)",
              "title": "End Date"
            },
            "description": "End date (ISO 8601)"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 5000,
              "minimum": 1,
              "description": "Max records to return",
              "default": 500,
              "title": "Limit"
            },
            "description": "Max records to return"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip"
          }
        ],
        "responses": {
          "200": {
            "description": "Usage records with cost breakdown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppUsageResponse"
                }
              }
            }
          },
          "400": {
            "description": "end_date before start_date"
          },
          "401": {
            "description": "Not authenticated"
          },
          "403": {
            "description": "No workspace access"
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/is-allowed": {
      "post": {
        "tags": [
          "Apps"
        ],
        "summary": "Check if app deployment is allowed on-chain",
        "operationId": "handle_app_is_allowed_api_v1_apps__app_id__is_allowed_post",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "App Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppIsAllowedRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppIsAllowedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/cvms/is-allowed": {
      "post": {
        "tags": [
          "Apps"
        ],
        "summary": "Batch check on-chain deployment allowance for all CVMs under an app",
        "operationId": "handle_app_cvms_is_allowed_api_v1_apps__app_id__cvms_is_allowed_post",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "App Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppCvmsBatchIsAllowedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/kms-info": {
      "get": {
        "tags": [
          "Apps",
          "apps-kms-info"
        ],
        "summary": "Get app on-chain KMS info",
        "description": "Returns on-chain KMS metadata for an app: chain, KMS contract, app contract, deployer address, and deployer type detection (EOA, Safe multisig, legacy multisig, ERC-4337, or generic contract).",
        "operationId": "get_app_kms_info_api_v1_apps__app_id__kms_info_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "KMS info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppKmsInfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/pending-updates": {
      "get": {
        "tags": [
          "Apps",
          "apps-pending-updates"
        ],
        "summary": "Get pending compose updates",
        "description": "Returns provisioned compose file updates that have been signed on-chain but not yet applied to CVMs.",
        "operationId": "get_pending_updates_api_v1_apps__app_id__pending_updates_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Pending updates list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingUpdatesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "404": {
            "description": "App not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{app_id}/pending-updates/{vm_uuid}/{compose_hash}/preview": {
      "get": {
        "tags": [
          "Apps",
          "apps-pending-updates"
        ],
        "summary": "Preview a pending compose update",
        "description": "Returns current and pending docker compose file and pre-launch script for diffing before applying an update.",
        "operationId": "get_pending_update_preview_api_v1_apps__app_id__pending_updates__vm_uuid___compose_hash__preview_get",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Hex app identifier",
              "title": "App Id"
            },
            "description": "Hex app identifier"
          },
          {
            "name": "vm_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "VM UUID",
              "title": "Vm Uuid"
            },
            "description": "VM UUID"
          },
          {
            "name": "compose_hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Compose hash of the pending update",
              "title": "Compose Hash"
            },
            "description": "Compose hash of the pending update"
          }
        ],
        "responses": {
          "200": {
            "description": "Preview data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingUpdatePreview"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          },
          "404": {
            "description": "App or pending update not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/instance-types": {
      "get": {
        "tags": [
          "Instance Types"
        ],
        "summary": "List instance type families",
        "description": "Public endpoint. Returns all families with their public instance types grouped.",
        "operationId": "list_all_families_api_v1_instance_types_get",
        "responses": {
          "200": {
            "description": "Families with instance types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllFamiliesResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database error"
          }
        }
      }
    },
    "/api/v1/instance-types/{family}": {
      "get": {
        "tags": [
          "Instance Types"
        ],
        "summary": "List family instance types",
        "description": "Public endpoint. Returns all public instance types for a specific family.",
        "operationId": "list_family_instance_types_api_v1_instance_types__family__get",
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Family name (cpu, gpu)",
              "title": "Family"
            },
            "description": "Family name (cpu, gpu)"
          }
        ],
        "responses": {
          "200": {
            "description": "Instance types for family",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FamilyInstanceTypesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Family not found or empty"
          },
          "500": {
            "description": "Database error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/verify": {
      "post": {
        "tags": [
          "Attestations"
        ],
        "summary": "Verify TEE quote",
        "description": "Accepts quote as file upload, form hex, or JSON hex. 0x prefix handled automatically.",
        "operationId": "handle_upload_and_verify_api_v1_attestations_verify_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_handle_upload_and_verify_api_v1_attestations_verify_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quote verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid quote format or verification failed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/recent": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "List recent quotes",
        "description": "Public endpoint. Returns recently uploaded quotes ordered by timestamp.",
        "operationId": "handle_list_recent_api_v1_attestations_recent_get",
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Offset for pagination",
              "default": 0,
              "title": "Skip"
            },
            "description": "Offset for pagination"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Max results",
              "default": 20,
              "title": "Limit"
            },
            "description": "Max results"
          }
        ],
        "responses": {
          "200": {
            "description": "List of recent quotes",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/view/{checksum}": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "View quote details",
        "description": "Public endpoint. Returns parsed quote data with verification status.",
        "operationId": "handle_view_api_v1_attestations_view__checksum__get",
        "parameters": [
          {
            "name": "checksum",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Quote SHA256 checksum",
              "title": "Checksum"
            },
            "description": "Quote SHA256 checksum"
          }
        ],
        "responses": {
          "200": {
            "description": "Quote details",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Quote not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/collateral/{checksum}": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "Get quote collateral",
        "description": "Returns TCB collateral data for quote verification. Cached for 24 hours.",
        "operationId": "get_collateral_api_v1_attestations_collateral__checksum__get",
        "parameters": [
          {
            "name": "checksum",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Quote SHA256 checksum",
              "title": "Checksum"
            },
            "description": "Quote SHA256 checksum"
          }
        ],
        "responses": {
          "200": {
            "description": "Collateral data",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad quote data"
          },
          "404": {
            "description": "Quote not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/raw/{checksum}": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "Download raw quote",
        "description": "Returns raw quote bytes as binary file attachment.",
        "operationId": "handle_get_raw_api_v1_attestations_raw__checksum__get",
        "parameters": [
          {
            "name": "checksum",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Quote SHA256 checksum",
              "title": "Checksum"
            },
            "description": "Quote SHA256 checksum"
          }
        ],
        "responses": {
          "200": {
            "description": "Binary quote file",
            "content": {
              "application/json": {
                "schema": {}
              },
              "application/octet-stream": {}
            }
          },
          "404": {
            "description": "Quote not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": [
          "Attestations"
        ],
        "summary": "Check raw quote exists",
        "description": "Returns headers without body. Use to check existence and get Content-Length.",
        "operationId": "handle_check_raw_file_api_v1_attestations_raw__checksum__head",
        "parameters": [
          {
            "name": "checksum",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Quote SHA256 checksum",
              "title": "Checksum"
            },
            "description": "Quote SHA256 checksum"
          }
        ],
        "responses": {
          "200": {
            "description": "Quote exists",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Quote not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/ppids": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "List node PPIDs",
        "description": "Public endpoint. Returns PPID list from nodes table (excluding deleted).",
        "operationId": "handle_list_ppids_api_v1_attestations_ppids_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/device_ids": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "List node device IDs",
        "description": "Public endpoint. Returns device_id list from nodes table (excluding deleted).",
        "operationId": "handle_list_device_ids_api_v1_attestations_device_ids_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v1/attestations/nodes": {
      "get": {
        "tags": [
          "Attestations"
        ],
        "summary": "List nodes",
        "description": "Public endpoint. Returns NodeRef list derived from nodes table (excluding deleted).",
        "operationId": "handle_list_nodes_api_v1_attestations_nodes_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NodeRef"
                  },
                  "type": "array",
                  "title": "Response Handle List Nodes Api V1 Attestations Nodes Get"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List workspace webhooks",
        "operationId": "list_webhooks_api_v1_workspace_webhooks_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookResponse"
                  },
                  "type": "array",
                  "title": "Response List Webhooks Api V1 Workspace Webhooks Get"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create workspace webhook",
        "operationId": "create_webhook_api_v1_workspace_webhooks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get webhook details",
        "operationId": "get_webhook_api_v1_workspace_webhooks__webhook_id__get",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update webhook",
        "operationId": "update_webhook_api_v1_workspace_webhooks__webhook_id__put",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete webhook",
        "operationId": "delete_webhook_api_v1_workspace_webhooks__webhook_id__delete",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}/reveal-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Reveal webhook secret (requires 2FA)",
        "operationId": "reveal_webhook_secret_api_v1_workspace_webhooks__webhook_id__reveal_secret_post",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotate webhook secret (requires 2FA)",
        "operationId": "rotate_webhook_secret_api_v1_workspace_webhooks__webhook_id__rotate_secret_post",
        "security": [
          {
            "OAuth2AuthorizationCodeBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Send test webhook event",
        "operationId": "test_webhook_api_v1_workspace_webhooks__webhook_id__test_post",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook deliveries",
        "operationId": "list_deliveries_api_v1_workspace_webhooks__webhook_id__deliveries_get",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDeliveryResponse"
                  },
                  "title": "Response List Deliveries Api V1 Workspace Webhooks  Webhook Id  Deliveries Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}/deliveries/{event_id}/resend": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Resend a webhook delivery",
        "operationId": "resend_delivery_api_v1_workspace_webhooks__webhook_id__deliveries__event_id__resend_post",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspace/webhooks/{webhook_id}/stats": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get webhook delivery stats",
        "operationId": "webhook_stats_api_v1_workspace_webhooks__webhook_id__stats_get",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookStatsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/user/ssh-keys": {
      "get": {
        "tags": [
          "SSH Keys"
        ],
        "summary": "List user SSH keys",
        "description": "Returns all SSH keys belonging to the authenticated user.",
        "operationId": "get_user_ssh_keys_api_v1_user_ssh_keys_get",
        "responses": {
          "200": {
            "description": "List of SSH keys",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SshKeyResponse"
                  },
                  "type": "array",
                  "title": "Response Get User Ssh Keys Api V1 User Ssh Keys Get"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated"
          }
        }
      },
      "post": {
        "tags": [
          "SSH Keys"
        ],
        "summary": "Add SSH key",
        "description": "Validates and stores an SSH public key. Minimum RSA 2048-bit, Ed25519 recommended.",
        "operationId": "create_user_ssh_key_api_v1_user_ssh_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SshKeyCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SshKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid key format or key too weak"
          },
          "401": {
            "description": "Not authenticated"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/user/ssh-keys/{key_id}": {
      "delete": {
        "tags": [
          "SSH Keys"
        ],
        "summary": "Delete SSH key",
        "description": "Soft-deletes an SSH key. Key must belong to the authenticated user.",
        "operationId": "delete_user_ssh_key_api_v1_user_ssh_keys__key_id__delete",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "SSH key hashid",
              "title": "Key Id"
            },
            "description": "SSH key hashid"
          }
        ],
        "responses": {
          "204": {
            "description": "Key deleted"
          },
          "400": {
            "description": "Invalid key ID format"
          },
          "401": {
            "description": "Not authenticated"
          },
          "404": {
            "description": "Key not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/user/ssh-keys/github-profile": {
      "post": {
        "tags": [
          "SSH Keys"
        ],
        "summary": "Import keys from GitHub profile",
        "description": "Fetches public SSH keys from any GitHub user's profile via the unauthenticated GitHub API. Deduplicates against the user's existing keys by fingerprint.",
        "operationId": "import_github_profile_ssh_keys_api_v1_user_ssh_keys_github_profile_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubProfileImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import completed; check keys_added and errors for per-key results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubProfileImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "GitHub user not found, API request timed out, or network error"
          },
          "401": {
            "description": "Not authenticated"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/user/ssh-keys/github-sync": {
      "post": {
        "tags": [
          "SSH Keys"
        ],
        "summary": "Sync keys from GitHub",
        "description": "Imports SSH keys from linked GitHub account. Adds new keys, updates existing, removes deleted.",
        "operationId": "sync_github_ssh_keys_api_v1_user_ssh_keys_github_sync_post",
        "responses": {
          "200": {
            "description": "Sync completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubSyncResponse"
                }
              }
            }
          },
          "400": {
            "description": "GitHub not linked or authorization revoked"
          },
          "401": {
            "description": "Not authenticated"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Account": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Account ID"
          },
          "provider": {
            "type": "string",
            "title": "Provider",
            "description": "OAuth provider: github, google, near"
          },
          "provider_account_id": {
            "type": "string",
            "title": "Provider Account Id",
            "description": "User ID from the OAuth provider"
          },
          "provider_account_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Account Email",
            "description": "Email from OAuth provider"
          },
          "provider_account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Account Name",
            "description": "Display name from OAuth provider"
          },
          "provider_account_avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Account Avatar",
            "description": "Avatar URL from OAuth provider"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Account link timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "provider",
          "provider_account_id",
          "created_at"
        ],
        "title": "Account",
        "description": "OAuth account linked to a user."
      },
      "AccountsResponse": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "type": "array",
            "title": "Accounts",
            "description": "All linked OAuth accounts"
          },
          "can_disconnect": {
            "type": "boolean",
            "title": "Can Disconnect",
            "description": "True if user can disconnect an account (has password or 2+ accounts)"
          },
          "has_password": {
            "type": "boolean",
            "title": "Has Password",
            "description": "True if user has a password set"
          }
        },
        "type": "object",
        "required": [
          "accounts",
          "can_disconnect",
          "has_password"
        ],
        "title": "AccountsResponse",
        "description": "Response for getting user's connected accounts."
      },
      "AcmeFetchResult": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "ACME endpoint URL queried"
          },
          "http_ok": {
            "type": "boolean",
            "title": "Http Ok",
            "description": "True if HTTP 200 response received"
          },
          "uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uri",
            "description": "Account URI from response body"
          },
          "status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Code",
            "description": "HTTP status code returned"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if request failed"
          }
        },
        "type": "object",
        "required": [
          "url",
          "http_ok"
        ],
        "title": "AcmeFetchResult",
        "description": "Result of an ACME account fetch attempt."
      },
      "ActiveGpuRentalOverviewResponse": {
        "properties": {
          "total_instances": {
            "type": "integer",
            "title": "Total Instances"
          },
          "total_gpu_units": {
            "type": "integer",
            "title": "Total Gpu Units"
          },
          "regions_served": {
            "type": "integer",
            "title": "Regions Served"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ActiveGpuRentalResponse"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "total_instances",
          "total_gpu_units",
          "regions_served",
          "items"
        ],
        "title": "ActiveGpuRentalOverviewResponse",
        "description": "Overview payload combining active rental metrics and featured items."
      },
      "ActiveGpuRentalResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "deployment_name": {
            "type": "string",
            "title": "Deployment Name"
          },
          "gpu_model": {
            "type": "string",
            "title": "Gpu Model"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count"
          },
          "region": {
            "type": "string",
            "title": "Region"
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity"
          },
          "hourly_rate": {
            "type": "string",
            "title": "Hourly Rate"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuSkuPricingPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "deployment_name",
          "gpu_model",
          "gpu_count",
          "region",
          "quantity",
          "hourly_rate"
        ],
        "title": "ActiveGpuRentalResponse",
        "description": "Summary of an active GPU rental instance."
      },
      "ActivityIpEntry": {
        "properties": {
          "ip_address": {
            "type": "string",
            "title": "Ip Address",
            "description": "IP address"
          },
          "request_count": {
            "type": "integer",
            "title": "Request Count",
            "description": "Total requests from this IP"
          },
          "first_seen": {
            "type": "string",
            "format": "date-time",
            "title": "First Seen",
            "description": "First request timestamp"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen",
            "description": "Most recent request timestamp"
          }
        },
        "type": "object",
        "required": [
          "ip_address",
          "request_count",
          "first_seen",
          "last_seen"
        ],
        "title": "ActivityIpEntry",
        "description": "IP address activity record from ClickHouse."
      },
      "AddGpusRequest": {
        "properties": {
          "gpu_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Gpu Ids",
            "description": "List of GPU IDs"
          }
        },
        "type": "object",
        "required": [
          "gpu_ids"
        ],
        "title": "AddGpusRequest",
        "description": "Request to add GPUs to a workspace."
      },
      "AddMembersRequest": {
        "properties": {
          "user_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "User Ids",
            "description": "List of user hash IDs (usr_xxx)"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Role: member or admin",
            "default": "member"
          }
        },
        "type": "object",
        "required": [
          "user_ids"
        ],
        "title": "AddMembersRequest",
        "description": "Request to add members to a team."
      },
      "AddTeepodsRequest": {
        "properties": {
          "teepod_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Teepod Ids",
            "description": "List of teepod IDs"
          }
        },
        "type": "object",
        "required": [
          "teepod_ids"
        ],
        "title": "AddTeepodsRequest",
        "description": "Request to add teepods to a workspace."
      },
      "AdminEmailPreviewRequest": {
        "properties": {
          "subject": {
            "type": "string",
            "title": "Subject",
            "description": "Email subject for the template header"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Email body as raw HTML"
          }
        },
        "type": "object",
        "required": [
          "subject",
          "content"
        ],
        "title": "AdminEmailPreviewRequest"
      },
      "AdminEmailRequest": {
        "properties": {
          "subject": {
            "type": "string",
            "title": "Subject",
            "description": "Email subject (prefixed with '[Phala Cloud]' automatically)"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Email body as raw HTML"
          },
          "recipients": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Recipients",
            "description": "Recipient email addresses"
          },
          "reply_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To",
            "description": "Reply-to address; defaults to the configured Resend reply_to"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AttachmentRequest"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments",
            "description": "Optional file attachments. Each item has filename, base64-encoded content, and content_type."
          }
        },
        "type": "object",
        "required": [
          "subject",
          "content",
          "recipients"
        ],
        "title": "AdminEmailRequest"
      },
      "AdminEmailResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total recipients processed"
          },
          "sent": {
            "type": "integer",
            "title": "Sent",
            "description": "Successfully sent count"
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "description": "Failed count"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/AdminEmailResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "total",
          "sent",
          "failed",
          "results"
        ],
        "title": "AdminEmailResponse"
      },
      "AdminEmailResult": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "resend_email_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resend Email Id",
            "description": "Resend email ID on success"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message on failure"
          }
        },
        "type": "object",
        "required": [
          "email",
          "success"
        ],
        "title": "AdminEmailResult"
      },
      "AdminInstanceEventResponse": {
        "properties": {
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Event type (instance.create, instance.shutdown, etc.)"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Event status (pending or completed)"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State",
            "description": "Instance state after event"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type"
          },
          "old_instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Old Instance Type",
            "description": "Previous instance type on resize"
          },
          "new_instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Instance Type",
            "description": "New instance type on resize"
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration",
            "description": "Event duration in milliseconds"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Event timestamp"
          },
          "instance_id": {
            "type": "string",
            "title": "Instance Id",
            "description": "VM UUID (instance_id)"
          },
          "triggered_by": {
            "type": "integer",
            "title": "Triggered By",
            "description": "User ID who triggered the event (0 = system)"
          },
          "triggered_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By Username",
            "description": "Username of the triggering user"
          },
          "triggered_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By Email",
            "description": "Email of the triggering user"
          },
          "cvm": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm",
            "description": "CVM details"
          },
          "user": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "User",
            "description": "Owner user details"
          },
          "team": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team",
            "description": "Team details"
          }
        },
        "type": "object",
        "required": [
          "event_type",
          "status",
          "timestamp",
          "instance_id",
          "triggered_by"
        ],
        "title": "AdminInstanceEventResponse",
        "description": "Instance lifecycle event with CVM, user, and team context."
      },
      "AdminTeepodDetail": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Teepod database ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Teepod display name"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Teepod RPC endpoint URL"
          },
          "kms_url": {
            "type": "string",
            "title": "Kms Url",
            "description": "KMS service URL"
          },
          "tproxy_url": {
            "type": "string",
            "title": "Tproxy Url",
            "description": "TProxy service URL"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether teepod accepts new CVMs"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current status (online, offline, maintenance)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Teepod creation timestamp"
          },
          "last_ping_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Ping At",
            "description": "Last successful ping"
          },
          "capacity": {
            "$ref": "#/components/schemas/teehouse__api__routes__admin__nodes__schemas__TeepodCapacity",
            "description": "Resource capacity limits"
          },
          "resource_usage": {
            "$ref": "#/components/schemas/TeepodResourceUsage",
            "description": "Current resource usage"
          },
          "node_resource_limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeResourceLimits"
              },
              {
                "type": "null"
              }
            ],
            "description": "Node hardware limits"
          },
          "node_resource_usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__api__routes__admin__nodes__schemas__NodeResourceUsage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Node utilization stats"
          },
          "teepod_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Version",
            "description": "Teepod software version"
          },
          "kms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Version",
            "description": "KMS protocol version"
          },
          "tproxy_base_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Base Domain",
            "description": "TProxy base domain"
          },
          "tproxy_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Port",
            "description": "TProxy HTTP port"
          },
          "tproxy_tappd_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Tappd Port",
            "description": "TProxy TAPPD port"
          },
          "kms_upgrade_callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Upgrade Callback Url",
            "description": "KMS upgrade webhook URL"
          },
          "kms_allow_upgrade": {
            "type": "boolean",
            "title": "Kms Allow Upgrade",
            "description": "Whether KMS upgrades are allowed",
            "default": false
          },
          "syslog_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Syslog Endpoint",
            "description": "Syslog forwarding endpoint"
          },
          "fmspc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fmspc",
            "description": "FMSPC attestation identifier"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Hardware device identifier"
          },
          "ppid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppid",
            "description": "Platform Provisioning ID"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Geographic region code"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "endpoint",
          "kms_url",
          "tproxy_url",
          "enabled",
          "status",
          "created_at",
          "capacity",
          "resource_usage"
        ],
        "title": "AdminTeepodDetail",
        "description": "Teepod with admin-specific metadata."
      },
      "AdminUserDetail": {
        "properties": {
          "username": {
            "type": "string",
            "title": "Username"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "credit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__models__schemas__users__Credit"
              },
              {
                "type": "null"
              }
            ]
          },
          "hash_id": {
            "type": "string",
            "title": "Hash Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "account_verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Verified At"
          },
          "email_verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Verified At"
          },
          "cvm_count": {
            "type": "integer",
            "title": "Cvm Count",
            "default": 0
          },
          "teams": {
            "items": {
              "$ref": "#/components/schemas/TeamBase"
            },
            "type": "array",
            "title": "Teams",
            "default": []
          },
          "registered_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registered Ip",
            "description": "IP address at registration"
          },
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "type": "array",
            "title": "Accounts",
            "description": "OAuth accounts"
          },
          "teams_count": {
            "type": "integer",
            "title": "Teams Count",
            "description": "Number of teams",
            "default": 0
          },
          "totp_enabled": {
            "type": "boolean",
            "title": "Totp Enabled",
            "description": "2FA enabled",
            "default": false
          },
          "last_activity_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Activity At",
            "description": "Last API activity timestamp"
          },
          "last_auth_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Auth Method",
            "description": "Last authentication method"
          },
          "credits": {
            "type": "number",
            "title": "Credits",
            "readOnly": true
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "readOnly": true
          },
          "cvm_credits": {
            "type": "number",
            "title": "Cvm Credits",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "username",
          "id",
          "role",
          "created_at",
          "hash_id",
          "disabled",
          "credits",
          "balance",
          "cvm_credits"
        ],
        "title": "AdminUserDetail",
        "description": "Extended user information for admin interface."
      },
      "AffectedApp": {
        "properties": {
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "project_name": {
            "type": "string",
            "title": "Project Name"
          },
          "contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Address"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id"
          },
          "allow_any_device": {
            "type": "boolean",
            "title": "Allow Any Device",
            "default": false
          },
          "cvms": {
            "items": {
              "$ref": "#/components/schemas/AffectedCvm"
            },
            "type": "array",
            "title": "Cvms",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "app_id",
          "project_name"
        ],
        "title": "AffectedApp"
      },
      "AffectedCvm": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id"
          },
          "device_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Allowed"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "status"
        ],
        "title": "AffectedCvm"
      },
      "AffectedTeam": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Email"
          },
          "apps": {
            "items": {
              "$ref": "#/components/schemas/AffectedApp"
            },
            "type": "array",
            "title": "Apps",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name"
        ],
        "title": "AffectedTeam"
      },
      "AllFamiliesResponse": {
        "properties": {
          "result": {
            "items": {
              "$ref": "#/components/schemas/FamilyGroup"
            },
            "type": "array",
            "title": "Result",
            "description": "List of family groups"
          }
        },
        "type": "object",
        "required": [
          "result"
        ],
        "title": "AllFamiliesResponse",
        "description": "All instance type families with their types."
      },
      "AllocationDetail": {
        "properties": {
          "cvm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Id"
          },
          "cvm_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm App Id"
          },
          "cvm_vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Vm Uuid"
          },
          "cvm_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Status"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "teepod_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Name"
          },
          "gpus": {
            "items": {
              "$ref": "#/components/schemas/AllocationGpuDetail"
            },
            "type": "array",
            "title": "Gpus"
          },
          "allocated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allocated At"
          }
        },
        "type": "object",
        "title": "AllocationDetail",
        "description": "CVM allocation detail for an order."
      },
      "AllocationGpuDetail": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "slot": {
            "type": "string",
            "title": "Slot"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "product_id",
          "slot"
        ],
        "title": "AllocationGpuDetail",
        "description": "GPU details for an allocation."
      },
      "AllocationHistoryItem": {
        "properties": {
          "cvm_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Id",
            "description": "Hashed CVM ID (null if deleted)"
          },
          "cvm_vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Vm Uuid",
            "description": "CVM UUID"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id",
            "description": "Hashed team ID (null if deleted)"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name",
            "description": "Team name"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Hashed project ID"
          },
          "allocated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Allocated At",
            "description": "Allocation timestamp"
          },
          "released_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Released At",
            "description": "Release timestamp"
          }
        },
        "type": "object",
        "required": [
          "allocated_at"
        ],
        "title": "AllocationHistoryItem",
        "description": "GPU allocation history record."
      },
      "AllocationHistoryResponse": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id",
            "description": "GPU ID"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total history records"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AllocationHistoryItem"
            },
            "type": "array",
            "title": "Items",
            "description": "History records"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "total",
          "items"
        ],
        "title": "AllocationHistoryResponse",
        "description": "GPU allocation history response."
      },
      "AllowedNodeOut": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id"
          },
          "on_chain_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Chain Allowed",
            "description": "null if non-onchain KMS or no device_id"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "teepod_name"
        ],
        "title": "AllowedNodeOut"
      },
      "AllowedNodesResponse": {
        "properties": {
          "kms_id": {
            "type": "string",
            "title": "Kms Id"
          },
          "is_onchain": {
            "type": "boolean",
            "title": "Is Onchain"
          },
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/AllowedNodeOut"
            },
            "type": "array",
            "title": "Nodes"
          }
        },
        "type": "object",
        "required": [
          "kms_id",
          "is_onchain",
          "nodes"
        ],
        "title": "AllowedNodesResponse"
      },
      "AllowedOsImageOut": {
        "properties": {
          "os_image_id": {
            "type": "integer",
            "title": "Os Image Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash"
          },
          "db_enabled": {
            "type": "boolean",
            "title": "Db Enabled"
          },
          "on_chain_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Chain Allowed",
            "description": "null if non-onchain KMS or no hash"
          }
        },
        "type": "object",
        "required": [
          "os_image_id",
          "name",
          "version",
          "db_enabled"
        ],
        "title": "AllowedOsImageOut"
      },
      "AllowedOsImagesResponse": {
        "properties": {
          "kms_id": {
            "type": "string",
            "title": "Kms Id"
          },
          "is_onchain": {
            "type": "boolean",
            "title": "Is Onchain"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/AllowedOsImageOut"
            },
            "type": "array",
            "title": "Images"
          }
        },
        "type": "object",
        "required": [
          "kms_id",
          "is_onchain",
          "images"
        ],
        "title": "AllowedOsImagesResponse"
      },
      "ApiToken": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token"
          },
          "token_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token Prefix"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "default_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Version"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "is_active",
          "created_at",
          "last_used_at",
          "expires_at"
        ],
        "title": "ApiToken"
      },
      "ApiTokenCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          },
          "expires_in_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 365.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In Days",
            "description": "Token expiry in days (1-365)"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ApiTokenCreate"
      },
      "ApiTokenRefresh": {
        "properties": {
          "expires_in_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 365.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In Days",
            "description": "New token expiry in days (1-365)"
          },
          "upgrade_version": {
            "type": "boolean",
            "title": "Upgrade Version",
            "description": "Upgrade to latest API version",
            "default": true
          }
        },
        "type": "object",
        "title": "ApiTokenRefresh"
      },
      "AppComposeV2": {
        "properties": {
          "allowed_envs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Envs"
          },
          "bash_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bash Script"
          },
          "default_gateway_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Gateway Domain"
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "init_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Init Script"
          },
          "kms_enabled": {
            "type": "boolean",
            "title": "Kms Enabled",
            "default": true
          },
          "local_key_provider_enabled": {
            "type": "boolean",
            "title": "Local Key Provider Enabled",
            "default": false
          },
          "manifest_version": {
            "type": "integer",
            "title": "Manifest Version",
            "default": 2
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "no_instance_id": {
            "type": "boolean",
            "title": "No Instance Id",
            "default": false
          },
          "pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script"
          },
          "public_logs": {
            "type": "boolean",
            "title": "Public Logs",
            "default": true
          },
          "public_sysinfo": {
            "type": "boolean",
            "title": "Public Sysinfo",
            "default": true
          },
          "public_tcbinfo": {
            "type": "boolean",
            "title": "Public Tcbinfo",
            "default": true
          },
          "runner": {
            "type": "string",
            "title": "Runner",
            "default": "docker-compose"
          },
          "gateway_enabled": {
            "type": "boolean",
            "title": "Gateway Enabled",
            "default": true
          },
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Features",
            "default": [
              "kms",
              "tproxy-net"
            ]
          },
          "salt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salt"
          },
          "secure_time": {
            "type": "boolean",
            "title": "Secure Time",
            "default": false
          },
          "storage_fs": {
            "anyOf": [
              {
                "type": "string",
                "const": "ext4"
              },
              {
                "type": "string",
                "const": "zfs"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Fs",
            "default": "zfs"
          },
          "tproxy_enabled": {
            "type": "boolean",
            "title": "Tproxy Enabled",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AppComposeV2"
      },
      "AppCvmsBatchIsAllowedResponse": {
        "properties": {
          "is_onchain": {
            "type": "boolean",
            "title": "Is Onchain",
            "description": "Whether this app uses on-chain KMS"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CvmIsAllowedItem"
            },
            "type": "array",
            "title": "Results"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "default": 0
          },
          "allowed_count": {
            "type": "integer",
            "title": "Allowed Count",
            "default": 0
          },
          "denied_count": {
            "type": "integer",
            "title": "Denied Count",
            "default": 0
          },
          "error_count": {
            "type": "integer",
            "title": "Error Count",
            "default": 0
          },
          "skipped_cvm_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Skipped Cvm Ids"
          }
        },
        "type": "object",
        "required": [
          "is_onchain"
        ],
        "title": "AppCvmsBatchIsAllowedResponse"
      },
      "AppEventsResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__apps__schemas__InstanceEventResponse"
            },
            "type": "array",
            "title": "Events",
            "description": "Event records"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Number of events returned"
          }
        },
        "type": "object",
        "required": [
          "events",
          "total"
        ],
        "title": "AppEventsResponse",
        "description": "Instance event list response."
      },
      "AppIsAllowedRequest": {
        "properties": {
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "Compose hash to check (hex)"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Node ID (resolves device_id from DB)"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Device ID (hex, direct)"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id",
            "description": "Chain ID for RPC URL resolution. If omitted, resolved from DB via CVM/KMS records."
          }
        },
        "type": "object",
        "required": [
          "compose_hash"
        ],
        "title": "AppIsAllowedRequest"
      },
      "AppIsAllowedResponse": {
        "properties": {
          "app_contract_address": {
            "type": "string",
            "title": "App Contract Address"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "compose_hash_allowed": {
            "type": "boolean",
            "title": "Compose Hash Allowed"
          },
          "allow_any_device": {
            "type": "boolean",
            "title": "Allow Any Device"
          },
          "device_id_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id Allowed"
          },
          "is_allowed": {
            "type": "boolean",
            "title": "Is Allowed"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "app_contract_address",
          "compose_hash",
          "device_id",
          "compose_hash_allowed",
          "allow_any_device",
          "is_allowed"
        ],
        "title": "AppIsAllowedResponse"
      },
      "AppKmsInfoResponse": {
        "properties": {
          "is_onchain_kms": {
            "type": "boolean",
            "title": "Is Onchain Kms",
            "default": false
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id"
          },
          "kms_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Address"
          },
          "app_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Contract Address"
          },
          "deployer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployer Address"
          },
          "deployer_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "eoa",
                  "safe",
                  "legacy_multisig",
                  "erc4337",
                  "contract"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployer Type"
          },
          "is_contract": {
            "type": "boolean",
            "title": "Is Contract",
            "default": false
          },
          "safe_app_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Safe App Url"
          }
        },
        "type": "object",
        "title": "AppKmsInfoResponse"
      },
      "AppRevisionDetailResponse": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "description": "Revision record identifier (hashid of snowflake_id)"
          },
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "Hex app identifier"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "CVM UUID"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "SHA-256 hash of compose file"
          },
          "compose_file": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose File",
            "description": "Docker compose content (dict or raw string)"
          },
          "encrypted_env": {
            "type": "string",
            "title": "Encrypted Env",
            "description": "Hex-encoded encrypted environment variables"
          },
          "user_config": {
            "type": "string",
            "title": "User Config",
            "description": "JSON user configuration string"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "Revision timestamp (ISO 8601)"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Id",
            "description": "Request trace ID for debugging"
          },
          "operation_type": {
            "type": "string",
            "title": "Operation Type",
            "description": "Operation: deploy, update, restart, etc."
          },
          "triggered_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "User who triggered the operation"
          },
          "cvm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "CVM reference"
          },
          "workspace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkspaceRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "Workspace reference"
          }
        },
        "type": "object",
        "required": [
          "revision_id",
          "app_id",
          "vm_uuid",
          "compose_hash",
          "compose_file",
          "encrypted_env",
          "user_config",
          "created_at",
          "trace_id",
          "operation_type"
        ],
        "title": "AppRevisionDetailResponse",
        "description": "Full revision detail with configuration data."
      },
      "AppRevisionResponse": {
        "properties": {
          "revision_id": {
            "type": "string",
            "title": "Revision Id",
            "description": "Revision record identifier (hashid of snowflake_id)"
          },
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "Hex app identifier"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "CVM UUID"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "SHA-256 hash of compose file"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "Revision timestamp (ISO 8601)"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trace Id",
            "description": "Request trace ID for debugging"
          },
          "operation_type": {
            "type": "string",
            "title": "Operation Type",
            "description": "Operation: deploy, update, restart, etc."
          },
          "triggered_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "User who triggered the operation"
          },
          "cvm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "CVM reference"
          },
          "workspace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkspaceRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "Workspace reference"
          }
        },
        "type": "object",
        "required": [
          "revision_id",
          "app_id",
          "vm_uuid",
          "compose_hash",
          "created_at",
          "trace_id",
          "operation_type"
        ],
        "title": "AppRevisionResponse",
        "description": "App deployment revision summary."
      },
      "AppRevisionsResponse": {
        "properties": {
          "revisions": {
            "items": {
              "$ref": "#/components/schemas/AppRevisionResponse"
            },
            "type": "array",
            "title": "Revisions",
            "description": "Revision records"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total revision count"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "total_pages": {
            "type": "integer",
            "title": "Total Pages",
            "description": "Total page count"
          }
        },
        "type": "object",
        "required": [
          "revisions",
          "total",
          "page",
          "page_size",
          "total_pages"
        ],
        "title": "AppRevisionsResponse",
        "description": "Paginated revision list."
      },
      "AppUsageResponse": {
        "properties": {
          "usage": {
            "items": {
              "$ref": "#/components/schemas/MeteredUsageResponse"
            },
            "type": "array",
            "title": "Usage",
            "description": "Usage records"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Number of records returned"
          },
          "total_cost": {
            "type": "number",
            "title": "Total Cost",
            "description": "Sum of costs in USD"
          }
        },
        "type": "object",
        "required": [
          "usage",
          "total",
          "total_cost"
        ],
        "title": "AppUsageResponse",
        "description": "App usage response with cost summary."
      },
      "AttachmentRequest": {
        "properties": {
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Attachment filename (e.g. 'report.pdf')"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Base64-encoded file content"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "description": "MIME type of the attachment",
            "default": "application/octet-stream"
          }
        },
        "type": "object",
        "required": [
          "filename",
          "content"
        ],
        "title": "AttachmentRequest"
      },
      "AttestationKeyType": {
        "type": "integer",
        "enum": [
          2,
          3
        ],
        "title": "AttestationKeyType",
        "description": "Attestation key type (subset used in SGX/TDX DCAP quotes)."
      },
      "AuditCvmDetail": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "node_name": {
            "type": "string",
            "title": "Node Name"
          },
          "instance_type": {
            "type": "string",
            "title": "Instance Type"
          },
          "instance_type_name": {
            "type": "string",
            "title": "Instance Type Name"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory_gb": {
            "type": "integer",
            "title": "Memory Gb"
          },
          "disk_size_gb": {
            "type": "integer",
            "title": "Disk Size Gb"
          },
          "is_running": {
            "type": "boolean",
            "title": "Is Running"
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At"
          },
          "compute_rate_per_hour": {
            "type": "string",
            "title": "Compute Rate Per Hour"
          },
          "disk_rate_per_hour": {
            "type": "string",
            "title": "Disk Rate Per Hour"
          },
          "running_hours": {
            "type": "string",
            "title": "Running Hours"
          },
          "compute_estimated": {
            "type": "string",
            "title": "Compute Estimated"
          },
          "storage_estimated": {
            "type": "string",
            "title": "Storage Estimated"
          },
          "total_estimated": {
            "type": "string",
            "title": "Total Estimated"
          },
          "segments": {
            "items": {
              "$ref": "#/components/schemas/AuditSegment"
            },
            "type": "array",
            "title": "Segments"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "name",
          "vm_uuid",
          "node_name",
          "instance_type",
          "instance_type_name",
          "vcpu",
          "memory_gb",
          "disk_size_gb",
          "is_running",
          "is_deleted",
          "created_at",
          "compute_rate_per_hour",
          "disk_rate_per_hour",
          "running_hours",
          "compute_estimated",
          "storage_estimated",
          "total_estimated",
          "segments"
        ],
        "title": "AuditCvmDetail"
      },
      "AuditSegment": {
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "title": "Start"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "title": "End"
          },
          "end_reason": {
            "type": "string",
            "title": "End Reason"
          },
          "duration_hours": {
            "type": "string",
            "title": "Duration Hours"
          },
          "compute_cost": {
            "type": "string",
            "title": "Compute Cost"
          },
          "storage_cost": {
            "type": "string",
            "title": "Storage Cost"
          }
        },
        "type": "object",
        "required": [
          "start",
          "end",
          "end_reason",
          "duration_hours",
          "compute_cost",
          "storage_cost"
        ],
        "title": "AuditSegment"
      },
      "AuditSummary": {
        "properties": {
          "total_cvms": {
            "type": "integer",
            "title": "Total Cvms"
          },
          "total_running_hours": {
            "type": "string",
            "title": "Total Running Hours"
          },
          "total_compute": {
            "type": "string",
            "title": "Total Compute"
          },
          "total_storage": {
            "type": "string",
            "title": "Total Storage"
          },
          "total_estimated": {
            "type": "string",
            "title": "Total Estimated"
          }
        },
        "type": "object",
        "required": [
          "total_cvms",
          "total_running_hours",
          "total_compute",
          "total_storage",
          "total_estimated"
        ],
        "title": "AuditSummary"
      },
      "AutoSettleRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "AutoSettleRequest"
      },
      "AutoSettleResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "invoice_id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "original_amount_due": {
            "type": "string",
            "title": "Original Amount Due"
          },
          "write_off_amount": {
            "type": "string",
            "title": "Write Off Amount"
          },
          "adjustment_item_id": {
            "type": "string",
            "pattern": "^ini_.+",
            "format": "hashid",
            "title": "HashedId[invoice_items]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "ini_0123abcd"
            ]
          }
        },
        "type": "object",
        "required": [
          "success",
          "invoice_id",
          "status",
          "original_amount_due",
          "write_off_amount",
          "adjustment_item_id"
        ],
        "title": "AutoSettleResponse"
      },
      "AvailableGpuItem": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "node_region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Region"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "slot": {
            "type": "string",
            "title": "Slot"
          },
          "allocation_status": {
            "type": "string",
            "title": "Allocation Status"
          },
          "is_reserved": {
            "type": "boolean",
            "title": "Is Reserved"
          },
          "reserved_by_team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reserved By Team Id"
          },
          "reserved_by_team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reserved By Team Name"
          },
          "added_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Added At"
          },
          "allocated_to_cvm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allocated To Cvm Id"
          },
          "allocated_to_cvm_instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allocated To Cvm Instance Id"
          },
          "allocated_to_team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allocated To Team Id"
          },
          "allocated_to_team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allocated To Team Name"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "teepod_id",
          "teepod_name",
          "node_id",
          "node_name",
          "node_region",
          "product_id",
          "slot",
          "allocation_status",
          "is_reserved"
        ],
        "title": "AvailableGpuItem",
        "description": "GPU information for available GPUs (reserved + available)."
      },
      "AvailableGpusResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AvailableGpuItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "AvailableGpusResponse",
        "description": "Response for available GPUs list."
      },
      "AvailableImageOut": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Image slug name"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Semantic version string"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image flag"
          },
          "in_database": {
            "type": "boolean",
            "title": "In Database",
            "description": "Whether image exists in database",
            "default": false
          },
          "os_image_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Id",
            "description": "Database ID if stored"
          }
        },
        "type": "object",
        "required": [
          "name",
          "version",
          "is_dev"
        ],
        "title": "AvailableImageOut",
        "description": "Available OS image from teepod RPC."
      },
      "AvailableOSImageOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "OS image ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Slug"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Version"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "Image hash"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "is_associated": {
            "type": "boolean",
            "title": "Is Associated",
            "description": "Already associated with KMS",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "version",
          "is_dev",
          "created_at"
        ],
        "title": "AvailableOSImageOut",
        "description": "OS image available for KMS association."
      },
      "AvailableTeepodItem": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "is_reserved": {
            "type": "boolean",
            "title": "Is Reserved"
          },
          "added_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Added At"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "name",
          "region_identifier",
          "status",
          "is_reserved"
        ],
        "title": "AvailableTeepodItem",
        "description": "Teepod information for available teepods (reserved + enabled)."
      },
      "AvailableTeepodsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AvailableTeepodItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "AvailableTeepodsResponse",
        "description": "Response for available teepods list."
      },
      "BackfillEnvPubkeyItem": {
        "properties": {
          "cvm_id": {
            "type": "string",
            "title": "Cvm Id"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "updated",
              "skipped",
              "failed"
            ],
            "title": "Status"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "pubkey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pubkey"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "app_id",
          "status"
        ],
        "title": "BackfillEnvPubkeyItem"
      },
      "BackfillEnvPubkeyRequest": {
        "properties": {
          "cvm_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Ids",
            "description": "CVM IDs to backfill. If omitted, all CVMs with missing pubkey are processed."
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "description": "Preview affected CVMs without making changes.",
            "default": false
          }
        },
        "type": "object",
        "title": "BackfillEnvPubkeyRequest"
      },
      "BackfillEnvPubkeyResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Number of CVMs matching the criteria"
          },
          "updated": {
            "type": "integer",
            "title": "Updated",
            "description": "Number of CVMs actually updated (0 when dry_run)"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/BackfillEnvPubkeyItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "total",
          "updated",
          "items"
        ],
        "title": "BackfillEnvPubkeyResponse"
      },
      "BalanceResponse": {
        "properties": {
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "credits": {
            "type": "number",
            "title": "Credits"
          },
          "credits_line": {
            "type": "number",
            "title": "Credits Line"
          },
          "needs_recharge": {
            "type": "boolean",
            "title": "Needs Recharge"
          },
          "recharge_amount": {
            "type": "number",
            "title": "Recharge Amount"
          }
        },
        "type": "object",
        "required": [
          "external_id",
          "credits",
          "credits_line",
          "needs_recharge",
          "recharge_amount"
        ],
        "title": "BalanceResponse"
      },
      "BatchDeleteKmsOSImagesRequest": {
        "properties": {
          "os_image_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Os Image Ids",
            "description": "OS image IDs to remove"
          }
        },
        "type": "object",
        "required": [
          "os_image_ids"
        ],
        "title": "BatchDeleteKmsOSImagesRequest",
        "description": "Batch delete KMS-OS image relationships."
      },
      "BatchDisableRequest": {
        "properties": {
          "user_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "User Ids",
            "description": "List of user hash IDs to disable"
          }
        },
        "type": "object",
        "required": [
          "user_ids"
        ],
        "title": "BatchDisableRequest",
        "description": "Request to batch disable multiple users."
      },
      "BatchDisableResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total users in request"
          },
          "disabled": {
            "type": "integer",
            "title": "Disabled",
            "description": "Users successfully disabled"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "description": "Users skipped (admin, self, already disabled, not found)"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/DisableErrorEntry"
            },
            "type": "array",
            "title": "Errors",
            "description": "Per-user errors"
          }
        },
        "type": "object",
        "required": [
          "total",
          "disabled",
          "skipped"
        ],
        "title": "BatchDisableResponse",
        "description": "Summary of batch disable operation."
      },
      "BatchInstanceIdRefreshRequest": {
        "properties": {
          "cvm_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Ids",
            "description": "Optional CVM identifiers. Admin can pass cross-workspace IDs."
          },
          "running_only": {
            "type": "boolean",
            "title": "Running Only",
            "description": "Only process CVMs with status=running",
            "default": true
          },
          "missing_only": {
            "type": "boolean",
            "title": "Missing Only",
            "description": "Only process CVMs with missing instance_id",
            "default": true
          },
          "overwrite": {
            "type": "boolean",
            "title": "Overwrite",
            "description": "Overwrite existing instance_id when different",
            "default": false
          },
          "limit": {
            "type": "integer",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "description": "Max CVMs to process in one request",
            "default": 100
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "description": "Preview changes without persisting",
            "default": false
          }
        },
        "type": "object",
        "title": "BatchInstanceIdRefreshRequest"
      },
      "BatchInstanceIdRefreshResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "scanned": {
            "type": "integer",
            "title": "Scanned"
          },
          "updated": {
            "type": "integer",
            "title": "Updated"
          },
          "unchanged": {
            "type": "integer",
            "title": "Unchanged"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped"
          },
          "conflicts": {
            "type": "integer",
            "title": "Conflicts"
          },
          "errors": {
            "type": "integer",
            "title": "Errors"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/InstanceIdRefreshResult"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "total",
          "scanned",
          "updated",
          "unchanged",
          "skipped",
          "conflicts",
          "errors",
          "items"
        ],
        "title": "BatchInstanceIdRefreshResponse"
      },
      "BatchIsAllowedRequest": {
        "properties": {
          "cvm_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 500,
            "title": "Cvm Ids",
            "description": "List of CVM IDs to check"
          }
        },
        "type": "object",
        "required": [
          "cvm_ids"
        ],
        "title": "BatchIsAllowedRequest"
      },
      "BatchIsAllowedResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/BatchItemResult"
            },
            "type": "array",
            "title": "Results"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "allowed_count": {
            "type": "integer",
            "title": "Allowed Count"
          },
          "denied_count": {
            "type": "integer",
            "title": "Denied Count"
          },
          "error_count": {
            "type": "integer",
            "title": "Error Count"
          },
          "skipped_cvm_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Skipped Cvm Ids",
            "description": "CVMs skipped (no contract_address, missing compose_hash/device_id, etc.)"
          }
        },
        "type": "object",
        "required": [
          "results",
          "total",
          "allowed_count",
          "denied_count",
          "error_count"
        ],
        "title": "BatchIsAllowedResponse"
      },
      "BatchItemResult": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "app_contract_address": {
            "type": "string",
            "title": "App Contract Address"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "compose_hash_allowed": {
            "type": "boolean",
            "title": "Compose Hash Allowed"
          },
          "allow_any_device": {
            "type": "boolean",
            "title": "Allow Any Device"
          },
          "device_id_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id Allowed"
          },
          "is_allowed": {
            "type": "boolean",
            "title": "Is Allowed"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "app_contract_address",
          "compose_hash",
          "device_id",
          "compose_hash_allowed",
          "allow_any_device",
          "is_allowed"
        ],
        "title": "BatchItemResult"
      },
      "BatchKmsOSImageRelationRequest": {
        "properties": {
          "os_image_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Os Image Ids",
            "description": "OS image IDs to allow"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enable the relationships",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "os_image_ids"
        ],
        "title": "BatchKmsOSImageRelationRequest",
        "description": "Batch create/update KMS-OS image relationships."
      },
      "BatchStatusRequest": {
        "properties": {
          "vm_uuids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Vm Uuids"
          }
        },
        "type": "object",
        "required": [
          "vm_uuids"
        ],
        "title": "BatchStatusRequest"
      },
      "BatchStopErrorEntry": {
        "properties": {
          "cvm_id": {
            "type": "string",
            "title": "Cvm Id",
            "description": "Hashed CVM ID"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Error message"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "error"
        ],
        "title": "BatchStopErrorEntry",
        "description": "Error detail for a single CVM in batch stop."
      },
      "BatchStopRequest": {
        "properties": {
          "cvm_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Cvm Ids",
            "description": "List of CVM hash IDs to stop"
          }
        },
        "type": "object",
        "required": [
          "cvm_ids"
        ],
        "title": "BatchStopRequest",
        "description": "Request to batch stop multiple CVMs."
      },
      "BatchStopResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total CVMs requested"
          },
          "stopped": {
            "type": "integer",
            "title": "Stopped",
            "description": "CVMs successfully scheduled for stop"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "description": "CVMs skipped (in_progress, no vm_uuid, GPU rental managed)"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/BatchStopErrorEntry"
            },
            "type": "array",
            "title": "Errors",
            "description": "CVMs that failed to stop"
          }
        },
        "type": "object",
        "required": [
          "total",
          "stopped",
          "skipped"
        ],
        "title": "BatchStopResponse",
        "description": "Summary of batch stop operation."
      },
      "BatchSyncMetadataResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/KmsSyncResult"
            },
            "type": "array",
            "title": "Results",
            "description": "Per-KMS sync results"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total KMS nodes attempted"
          },
          "synced": {
            "type": "integer",
            "title": "Synced",
            "description": "Successfully synced count"
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "description": "Failed sync count"
          },
          "unchanged": {
            "type": "integer",
            "title": "Unchanged",
            "description": "Nodes where version did not change"
          }
        },
        "type": "object",
        "required": [
          "results",
          "total",
          "synced",
          "failed",
          "unchanged"
        ],
        "title": "BatchSyncMetadataResponse",
        "description": "Result of batch KMS metadata sync."
      },
      "BatchTeepodKmsRelationRequest": {
        "properties": {
          "kms_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Ids",
            "description": "KMS hashed IDs to process"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enabled state for all relations",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "kms_ids"
        ],
        "title": "BatchTeepodKmsRelationRequest",
        "description": "Request for batch teepod-KMS operations."
      },
      "BatchTeepodOSImageRelationRequest": {
        "properties": {
          "os_image_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Os Image Ids",
            "description": "OS image database IDs to process"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enabled state for all relations",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "os_image_ids"
        ],
        "title": "BatchTeepodOSImageRelationRequest",
        "description": "Request for batch teepod-OS image operations."
      },
      "BatchTeepodTeamAccessRequest": {
        "properties": {
          "team_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Team Ids",
            "description": "Team database IDs to process"
          }
        },
        "type": "object",
        "required": [
          "team_ids"
        ],
        "title": "BatchTeepodTeamAccessRequest",
        "description": "Request for batch team access operations."
      },
      "BatchUpdateItemRequest": {
        "properties": {
          "item_id": {
            "type": "string",
            "title": "Item Id",
            "description": "Invoice item ID"
          },
          "cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost",
            "description": "Updated amount (positive or negative)"
          }
        },
        "type": "object",
        "required": [
          "item_id"
        ],
        "title": "BatchUpdateItemRequest",
        "description": "Single item update in a batch request."
      },
      "BatchUpdateItemsRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BatchUpdateItemRequest"
            },
            "type": "array",
            "title": "Items",
            "description": "List of item updates"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "BatchUpdateItemsRequest",
        "description": "Request to batch update invoice items."
      },
      "BatchUpdateItemsResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "updated_count": {
            "type": "integer",
            "title": "Updated Count"
          },
          "total_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Total Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "success",
          "updated_count",
          "total_amount"
        ],
        "title": "BatchUpdateItemsResponse",
        "description": "Response for batch update operation."
      },
      "BatchUpdateResult": {
        "properties": {
          "success_count": {
            "type": "integer",
            "title": "Success Count",
            "description": "Successfully updated count"
          },
          "failed_count": {
            "type": "integer",
            "title": "Failed Count",
            "description": "Failed count"
          },
          "failed_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Failed Ids",
            "description": "IDs that failed"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Result message"
          }
        },
        "type": "object",
        "required": [
          "success_count",
          "failed_count",
          "failed_ids",
          "message"
        ],
        "title": "BatchUpdateResult",
        "description": "Batch update operation result."
      },
      "BatchUpdateStatusRequest": {
        "properties": {
          "gpu_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "minItems": 1,
            "title": "Gpu Ids",
            "description": "GPU IDs to update"
          },
          "allocation_status": {
            "$ref": "#/components/schemas/GpuAllocationStatus",
            "description": "New status"
          }
        },
        "type": "object",
        "required": [
          "gpu_ids",
          "allocation_status"
        ],
        "title": "BatchUpdateStatusRequest",
        "description": "Batch update GPU status request."
      },
      "BillingBalanceResponse": {
        "properties": {
          "balance": {
            "type": "string",
            "format": "decimal",
            "title": "Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "granted_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Granted Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid"
          },
          "outstanding_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Outstanding Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "tier": {
            "$ref": "#/components/schemas/TeamTier"
          }
        },
        "type": "object",
        "required": [
          "balance",
          "granted_balance",
          "is_post_paid",
          "outstanding_amount",
          "tier"
        ],
        "title": "BillingBalanceResponse"
      },
      "BillingPeriod": {
        "type": "string",
        "enum": [
          "skip",
          "hourly",
          "monthly"
        ],
        "title": "BillingPeriod"
      },
      "BillingPeriodResourceItem": {
        "properties": {
          "billing_period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Period"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          },
          "running_count": {
            "type": "integer",
            "title": "Running Count"
          },
          "total_vcpu": {
            "type": "integer",
            "title": "Total Vcpu"
          },
          "running_vcpu": {
            "type": "integer",
            "title": "Running Vcpu"
          },
          "total_memory_mb": {
            "type": "integer",
            "title": "Total Memory Mb"
          },
          "running_memory_mb": {
            "type": "integer",
            "title": "Running Memory Mb"
          },
          "total_disk_gb": {
            "type": "integer",
            "title": "Total Disk Gb"
          },
          "running_disk_gb": {
            "type": "integer",
            "title": "Running Disk Gb"
          }
        },
        "type": "object",
        "required": [
          "billing_period",
          "total_count",
          "running_count",
          "total_vcpu",
          "running_vcpu",
          "total_memory_mb",
          "running_memory_mb",
          "total_disk_gb",
          "running_disk_gb"
        ],
        "title": "BillingPeriodResourceItem",
        "description": "Resource usage breakdown by billing period."
      },
      "BillingRecordDetail": {
        "properties": {
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Event: compute, egress, storage, etc."
          },
          "cost": {
            "type": "number",
            "title": "Cost",
            "description": "USD cost for this event"
          },
          "details": {
            "type": "string",
            "title": "Details",
            "description": "Human-readable event description"
          },
          "vm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__api__routes__billing__usage__CVMInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "CVM metadata if instance-based"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Project ID if project-scoped"
          },
          "team": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Team metadata"
          },
          "billing_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Start",
            "description": "Period start (ISO 8601)"
          },
          "billing_end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing End",
            "description": "Period end (ISO 8601)"
          }
        },
        "type": "object",
        "required": [
          "event_type",
          "cost",
          "details"
        ],
        "title": "BillingRecordDetail",
        "description": "Single metered usage event."
      },
      "BillingSettingsResponse": {
        "properties": {
          "billing_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Email"
          },
          "stripe_customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Email"
          },
          "billing_mode": {
            "type": "string",
            "enum": [
              "prepaid",
              "prepaid_auto_topup",
              "post_paid"
            ],
            "title": "Billing Mode"
          },
          "flag_billing_v2_enabled": {
            "type": "boolean",
            "title": "Flag Billing V2 Enabled"
          },
          "auto_topup_enabled": {
            "type": "boolean",
            "title": "Auto Topup Enabled"
          },
          "auto_topup_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Auto Topup Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "auto_topup_threshold": {
            "type": "string",
            "format": "decimal",
            "title": "Auto Topup Threshold",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "post_paid_available": {
            "type": "boolean",
            "title": "Post Paid Available"
          },
          "post_paid_charge_cap": {
            "type": "string",
            "format": "decimal",
            "title": "Post Paid Charge Cap",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "post_paid_grace_deadline": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Paid Grace Deadline"
          },
          "has_saved_card": {
            "type": "boolean",
            "title": "Has Saved Card"
          },
          "outstanding_debt": {
            "type": "string",
            "format": "decimal",
            "title": "Outstanding Debt",
            "description": "A monetary value with precise decimal arithmetic",
            "default": "0.000000",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "billing_mode",
          "flag_billing_v2_enabled",
          "auto_topup_enabled",
          "auto_topup_amount",
          "auto_topup_threshold",
          "post_paid_available",
          "post_paid_charge_cap",
          "has_saved_card"
        ],
        "title": "BillingSettingsResponse"
      },
      "BlacklistRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "description": "Why this card is blocked"
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "BlacklistRequest",
        "description": "Request body for blacklisting a card fingerprint."
      },
      "Body_api_verify_email_token_api_v1_auth_verify_email_token_post": {
        "properties": {
          "request": {
            "$ref": "#/components/schemas/EmailTokenVerificationRequest"
          },
          "site_key": {
            "type": "string",
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "request"
        ],
        "title": "Body_api_verify_email_token_api_v1_auth_verify_email_token_post"
      },
      "Body_handle_restart_cvm_api_v1_cvms__cvm_id__restart_post": {
        "properties": {
          "force": {
            "type": "boolean",
            "title": "Force",
            "description": "Skip graceful shutdown",
            "default": false
          }
        },
        "type": "object",
        "title": "Body_handle_restart_cvm_api_v1_cvms__cvm_id__restart_post"
      },
      "Body_handle_save_intent_api_v1_setup_billing_save_intent_post": {
        "properties": {
          "payment_intent_id": {
            "type": "string",
            "title": "Payment Intent Id",
            "description": "Stripe PaymentIntent ID from frontend"
          },
          "payment_method_id": {
            "type": "string",
            "title": "Payment Method Id",
            "description": "Stripe PaymentMethod ID from frontend"
          }
        },
        "type": "object",
        "required": [
          "payment_intent_id",
          "payment_method_id"
        ],
        "title": "Body_handle_save_intent_api_v1_setup_billing_save_intent_post"
      },
      "Body_handle_update_cvm_listed_api_v1_cvms__cvm_id__listed_patch": {
        "properties": {
          "listed": {
            "type": "boolean",
            "title": "Listed"
          }
        },
        "type": "object",
        "required": [
          "listed"
        ],
        "title": "Body_handle_update_cvm_listed_api_v1_cvms__cvm_id__listed_patch"
      },
      "Body_handle_update_cvm_name_api_v1_cvms__cvm_id__name_patch": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "Body_handle_update_cvm_name_api_v1_cvms__cvm_id__name_patch"
      },
      "Body_handle_update_cvm_scheduled_delete_api_v1_cvms__cvm_id__scheduled_delete_patch": {
        "properties": {
          "scheduled_delete_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled Delete At"
          }
        },
        "type": "object",
        "title": "Body_handle_update_cvm_scheduled_delete_api_v1_cvms__cvm_id__scheduled_delete_patch"
      },
      "Body_handle_update_cvm_visibility_api_v1_cvms__cvm_id__visibility_patch": {
        "properties": {
          "public_sysinfo": {
            "type": "boolean",
            "title": "Public Sysinfo",
            "description": "Expose system info publicly"
          },
          "public_logs": {
            "type": "boolean",
            "title": "Public Logs",
            "description": "Expose container logs publicly"
          },
          "public_tcbinfo": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Tcbinfo",
            "description": "Expose TCB attestation info publicly"
          }
        },
        "type": "object",
        "required": [
          "public_sysinfo",
          "public_logs"
        ],
        "title": "Body_handle_update_cvm_visibility_api_v1_cvms__cvm_id__visibility_patch"
      },
      "Body_handle_upload_and_verify_api_v1_attestations_verify_post": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string",
                "format": "binary"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "hex": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hex"
          }
        },
        "type": "object",
        "title": "Body_handle_upload_and_verify_api_v1_attestations_verify_post"
      },
      "Body_login_for_access_token_api_v1_auth_token_post": {
        "properties": {
          "grant_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^password$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "Body_login_for_access_token_api_v1_auth_token_post"
      },
      "Body_login_with_cookie_api_v1_auth_login_post": {
        "properties": {
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          },
          "grant_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^password$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "Body_login_with_cookie_api_v1_auth_login_post"
      },
      "Body_setup_2fa_endpoint_api_v1_auth_2fa_setup_post": {
        "properties": {
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "title": "Body_setup_2fa_endpoint_api_v1_auth_2fa_setup_post"
      },
      "Body_trigger_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_patch": {
        "properties": {
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "Hash from provision response"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "New encrypted env blob (hex)"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys",
            "description": "Allowed env var names"
          },
          "update_env_vars": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Update Env Vars",
            "description": "Update allowed_envs list",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "compose_hash"
        ],
        "title": "Body_trigger_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_patch"
      },
      "Body_update_cvm_docker_compose_api_v1_cvms__cvm_id__docker_compose_patch": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string",
                "format": "binary"
              },
              {
                "type": "null"
              }
            ],
            "title": "File",
            "description": "Docker Compose YAML file to upload"
          }
        },
        "type": "object",
        "title": "Body_update_cvm_docker_compose_api_v1_cvms__cvm_id__docker_compose_patch"
      },
      "Body_update_cvm_envs_api_v1_cvms__cvm_id__envs_patch": {
        "properties": {
          "encrypted_env": {
            "type": "string",
            "title": "Encrypted Env",
            "description": "Encrypted env blob as hex string"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys",
            "description": "Allowed env var names. Changes trigger verification for contract-owned KMS."
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash",
            "description": "Hash from Phase 1 response (Phase 2 only)"
          },
          "transaction_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transaction Hash",
            "description": "Transaction hash proving on-chain registration (Phase 2 only)"
          }
        },
        "type": "object",
        "required": [
          "encrypted_env"
        ],
        "title": "Body_update_cvm_envs_api_v1_cvms__cvm_id__envs_patch"
      },
      "Body_update_cvm_os_image_api_v1_cvms__cvm_id__os_image_patch": {
        "properties": {
          "os_image_name": {
            "type": "string",
            "title": "Os Image Name",
            "description": "Image name or slug from available-os-images"
          }
        },
        "type": "object",
        "required": [
          "os_image_name"
        ],
        "title": "Body_update_cvm_os_image_api_v1_cvms__cvm_id__os_image_patch"
      },
      "Body_update_cvm_pre_launch_script_api_v1_cvms__cvm_id__pre_launch_script_patch": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string",
                "format": "binary"
              },
              {
                "type": "null"
              }
            ],
            "title": "File",
            "description": "Shell script file to upload"
          }
        },
        "type": "object",
        "title": "Body_update_cvm_pre_launch_script_api_v1_cvms__cvm_id__pre_launch_script_patch"
      },
      "Body_upload_avatar_api_v1_profiles__entity_type___entity_id__avatar_put": {
        "properties": {
          "avatar": {
            "type": "string",
            "format": "binary",
            "title": "Avatar",
            "description": "Avatar image (max 5MB)"
          }
        },
        "type": "object",
        "required": [
          "avatar"
        ],
        "title": "Body_upload_avatar_api_v1_profiles__entity_type___entity_id__avatar_put"
      },
      "Body_upload_my_avatar_api_v1_profiles_me_avatar_put": {
        "properties": {
          "avatar": {
            "type": "string",
            "format": "binary",
            "title": "Avatar",
            "description": "Avatar image (max 5MB)"
          }
        },
        "type": "object",
        "required": [
          "avatar"
        ],
        "title": "Body_upload_my_avatar_api_v1_profiles_me_avatar_put"
      },
      "BootInfo": {
        "properties": {
          "mrAggregated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mraggregated",
            "description": "Aggregated measurement hash"
          },
          "osImageHash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Osimagehash",
            "description": "OS image hash"
          },
          "appId": {
            "type": "string",
            "title": "Appid",
            "description": "Application ID (40-char hex)"
          },
          "composeHash": {
            "type": "string",
            "title": "Composehash",
            "description": "Hash of the compose file"
          },
          "instanceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instanceid",
            "description": "Instance identifier"
          },
          "deviceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deviceid",
            "description": "Device identifier"
          },
          "tcbStatus": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tcbstatus",
            "description": "TCB status from attestation"
          },
          "advisoryIds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Advisoryids",
            "description": "Intel advisory IDs"
          },
          "mrSystem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mrsystem",
            "description": "System measurement"
          },
          "attestationMode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attestationmode",
            "description": "Attestation mode"
          },
          "keyProviderInfo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keyproviderinfo",
            "description": "Key provider info"
          }
        },
        "type": "object",
        "required": [
          "appId",
          "composeHash"
        ],
        "title": "BootInfo",
        "description": "Boot attestation data from a DStack TEE instance."
      },
      "BootResponse": {
        "properties": {
          "isAllowed": {
            "type": "boolean",
            "title": "Isallowed",
            "description": "True if boot is authorized"
          },
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "Human-readable authorization reason"
          },
          "gatewayAppId": {
            "type": "string",
            "title": "Gatewayappid",
            "description": "Gateway app ID for the KMS"
          }
        },
        "type": "object",
        "required": [
          "isAllowed",
          "reason",
          "gatewayAppId"
        ],
        "title": "BootResponse",
        "description": "Boot authentication result."
      },
      "BootstrapInfoOut": {
        "properties": {
          "k256_pubkey": {
            "type": "string",
            "title": "K256 Pubkey",
            "description": "K256 public key hex"
          },
          "ca_pubkey": {
            "type": "string",
            "title": "Ca Pubkey",
            "description": "CA public key hex"
          },
          "quote_length": {
            "type": "integer",
            "title": "Quote Length",
            "description": "Quote byte length"
          },
          "eventlog_length": {
            "type": "integer",
            "title": "Eventlog Length",
            "description": "Eventlog byte length"
          }
        },
        "type": "object",
        "required": [
          "k256_pubkey",
          "ca_pubkey",
          "quote_length",
          "eventlog_length"
        ],
        "title": "BootstrapInfoOut"
      },
      "CIOAuditMismatch": {
        "properties": {
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "db_email": {
            "type": "string",
            "title": "Db Email"
          },
          "cio_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cio Email"
          },
          "cio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cio Id"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "db_email",
          "reason"
        ],
        "title": "CIOAuditMismatch"
      },
      "CIOAuditResponse": {
        "properties": {
          "total_checked": {
            "type": "integer",
            "title": "Total Checked"
          },
          "mismatches": {
            "items": {
              "$ref": "#/components/schemas/CIOAuditMismatch"
            },
            "type": "array",
            "title": "Mismatches"
          },
          "error_count": {
            "type": "integer",
            "title": "Error Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "total_checked"
        ],
        "title": "CIOAuditResponse"
      },
      "CIODeleteRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "CIODeleteRequest"
      },
      "CIODeleteResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message",
          "user_id"
        ],
        "title": "CIODeleteResponse"
      },
      "CIOEmailRecipient": {
        "properties": {
          "customer_id": {
            "type": "string",
            "title": "Customer Id",
            "description": "CIO customer ID (user.id as string)"
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "Recipient email address (CIO requires 'to')"
          },
          "message_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Data",
            "description": "Per-recipient liquid variables ({{trigger.xxx}})"
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "email"
        ],
        "title": "CIOEmailRecipient"
      },
      "CIOFixEmailRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "strategy": {
            "$ref": "#/components/schemas/CIOFixEmailStrategy",
            "default": "update"
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "CIOFixEmailRequest"
      },
      "CIOFixEmailResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "strategy": {
            "type": "string",
            "title": "Strategy"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message",
          "user_id",
          "strategy"
        ],
        "title": "CIOFixEmailResponse"
      },
      "CIOFixEmailStrategy": {
        "type": "string",
        "enum": [
          "update",
          "delete_and_recreate"
        ],
        "title": "CIOFixEmailStrategy"
      },
      "CIOIdType": {
        "type": "string",
        "enum": [
          "id",
          "email",
          "cio_id"
        ],
        "title": "CIOIdType"
      },
      "CIOPersonResponse": {
        "properties": {
          "found": {
            "type": "boolean",
            "title": "Found"
          },
          "identifiers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonIdentifiers"
              },
              {
                "type": "null"
              }
            ]
          },
          "attributes": {
            "additionalProperties": true,
            "type": "object",
            "title": "Attributes"
          },
          "cio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cio Id"
          }
        },
        "type": "object",
        "required": [
          "found"
        ],
        "title": "CIOPersonResponse"
      },
      "CIOSendEmailAdminRequest": {
        "properties": {
          "transactional_message_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "title": "Transactional Message Id",
            "description": "CIO transactional message template ID"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/CIOEmailRecipient"
            },
            "type": "array",
            "title": "Recipients"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject",
            "description": "Override template subject"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body",
            "description": "Override template body (HTML)"
          },
          "from_email": {
            "type": "string",
            "title": "From Email",
            "description": "Sender address. Defaults to cloud@phala.network.",
            "default": "Phala Cloud <cloud@phala.network>"
          },
          "reply_to": {
            "type": "string",
            "title": "Reply To",
            "description": "Reply-to address. Defaults to cloud@phala.network.",
            "default": "cloud@phala.network"
          },
          "send_to_unsubscribed": {
            "type": "boolean",
            "title": "Send To Unsubscribed",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "transactional_message_id",
          "recipients"
        ],
        "title": "CIOSendEmailAdminRequest"
      },
      "CIOSendEmailAdminResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "sent": {
            "type": "integer",
            "title": "Sent"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/CIOSendEmailResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "total",
          "sent",
          "failed",
          "results"
        ],
        "title": "CIOSendEmailAdminResponse"
      },
      "CIOSendEmailResult": {
        "properties": {
          "customer_id": {
            "type": "string",
            "title": "Customer Id"
          },
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "delivery_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "customer_id",
          "success"
        ],
        "title": "CIOSendEmailResult"
      },
      "CIOTransactionalMessage": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "send_to_unsubscribed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send To Unsubscribed"
          },
          "link_tracking": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link Tracking"
          },
          "open_tracking": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Open Tracking"
          },
          "hide_message_body": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hide Message Body"
          },
          "queue_drafts": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Drafts"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "title": "CIOTransactionalMessage",
        "description": "A transactional message template."
      },
      "CIOTriggerBroadcastAdminRequest": {
        "properties": {
          "broadcast_id": {
            "type": "integer",
            "title": "Broadcast Id"
          },
          "customer_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Ids",
            "description": "CIO customer IDs (max 10,000)"
          },
          "emails": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Emails",
            "description": "Email addresses (max 10,000)"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data",
            "description": "Global liquid variables ({{trigger.key}})"
          },
          "email_ignore_missing": {
            "type": "boolean",
            "title": "Email Ignore Missing",
            "default": true
          },
          "id_ignore_missing": {
            "type": "boolean",
            "title": "Id Ignore Missing",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "broadcast_id"
        ],
        "title": "CIOTriggerBroadcastAdminRequest"
      },
      "CIOTriggerBroadcastResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "trigger_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "CIOTriggerBroadcastResponse"
      },
      "CVMDetail": {
        "properties": {
          "cvm_id": {
            "type": "string",
            "title": "Cvm Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "instance_type": {
            "type": "string",
            "title": "Instance Type"
          },
          "instance_type_name": {
            "type": "string",
            "title": "Instance Type Name"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory_gb": {
            "type": "integer",
            "title": "Memory Gb"
          },
          "disk_size_gb": {
            "type": "integer",
            "title": "Disk Size Gb"
          },
          "gpu_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Count"
          },
          "teepod_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Name"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "is_running": {
            "type": "boolean",
            "title": "Is Running"
          },
          "is_deleted": {
            "type": "boolean",
            "title": "Is Deleted"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At"
          },
          "running_hours": {
            "type": "string",
            "title": "Running Hours"
          },
          "compute_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Compute Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "storage_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Storage Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "total_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Total Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "name",
          "instance_type",
          "instance_type_name",
          "vcpu",
          "memory_gb",
          "disk_size_gb",
          "is_running",
          "is_deleted",
          "created_at",
          "running_hours",
          "compute_estimated",
          "storage_estimated",
          "total_estimated"
        ],
        "title": "CVMDetail",
        "description": "CVM detail with usage and cost breakdown."
      },
      "CVMGatewayInfo": {
        "properties": {
          "base_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Domain"
          },
          "cname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cname"
          }
        },
        "type": "object",
        "title": "CVMGatewayInfo"
      },
      "CVMInfoDetail": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^cvm_.+",
            "format": "hashid",
            "title": "HashedId[cvms]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "cvm_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "resource": {
            "$ref": "#/components/schemas/CVMResourceInfo"
          },
          "node_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "os": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CVMOSInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "kms_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KmsType"
              },
              {
                "type": "null"
              }
            ]
          },
          "kms_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CVMKmsInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress",
            "default": false
          },
          "progress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CVMProgressInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash"
          },
          "docker_compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose Hash"
          },
          "pre_launch_script_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script Hash"
          },
          "gateway": {
            "$ref": "#/components/schemas/CVMGatewayInfo"
          },
          "logs": {
            "$ref": "#/components/schemas/CVMLogUrls"
          },
          "services": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Services"
          },
          "endpoints": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CvmNetworkUrls"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoints"
          },
          "public_logs": {
            "type": "boolean",
            "title": "Public Logs",
            "default": false
          },
          "public_sysinfo": {
            "type": "boolean",
            "title": "Public Sysinfo",
            "default": false
          },
          "public_tcbinfo": {
            "type": "boolean",
            "title": "Public Tcbinfo",
            "default": true
          },
          "gateway_enabled": {
            "type": "boolean",
            "title": "Gateway Enabled",
            "default": false
          },
          "secure_time": {
            "type": "boolean",
            "title": "Secure Time",
            "default": false
          },
          "storage_fs": {
            "type": "string",
            "title": "Storage Fs",
            "default": "zfs"
          },
          "workspace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkspaceRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "creator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At"
          },
          "listed": {
            "type": "boolean",
            "title": "Listed",
            "default": false
          },
          "project_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Type"
          },
          "compose_file": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose File"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "resource",
          "status",
          "gateway"
        ],
        "title": "CVMInfoDetail"
      },
      "CVMItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "project_name": {
            "type": "string",
            "title": "Project Name"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "kms_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Type"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "vm_uuid",
          "instance_id",
          "status",
          "instance_type",
          "project_name",
          "project_id",
          "created_at"
        ],
        "title": "CVMItem",
        "description": "CVM item for team CVMs list."
      },
      "CVMKmsInfo": {
        "properties": {
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id"
          },
          "dstack_kms_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dstack Kms Address"
          },
          "dstack_app_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dstack App Address"
          },
          "deployer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployer Address"
          },
          "rpc_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rpc Endpoint"
          },
          "encrypted_env_pubkey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env Pubkey"
          }
        },
        "type": "object",
        "title": "CVMKmsInfo"
      },
      "CVMLogUrls": {
        "properties": {
          "serial": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial"
          },
          "stdout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stdout"
          },
          "stderr": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stderr"
          },
          "container_log_base": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Container Log Base"
          }
        },
        "type": "object",
        "title": "CVMLogUrls"
      },
      "CVMOSInfo": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "is_dev": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Dev"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash"
          }
        },
        "type": "object",
        "title": "CVMOSInfo"
      },
      "CVMPreview": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory": {
            "type": "integer",
            "title": "Memory"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "vcpu",
          "memory",
          "instance_type",
          "project_name",
          "created_at"
        ],
        "title": "CVMPreview",
        "description": "CVM information for team preview."
      },
      "CVMProgressInfo": {
        "properties": {
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          }
        },
        "type": "object",
        "title": "CVMProgressInfo"
      },
      "CVMResourceInfo": {
        "properties": {
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "memory_in_gb": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory In Gb"
          },
          "disk_in_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk In Gb"
          },
          "gpus": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpus"
          },
          "compute_billing_price": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Compute Billing Price"
          },
          "billing_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingPeriod"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "CVMResourceInfo"
      },
      "CaaCheckResult": {
        "properties": {
          "caa_records": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Caa Records",
            "description": "Raw CAA DNS records found"
          },
          "accounturi": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accounturi",
            "description": "Account URI extracted from CAA record"
          },
          "acme_fetches": {
            "items": {
              "$ref": "#/components/schemas/AcmeFetchResult"
            },
            "type": "array",
            "title": "Acme Fetches",
            "description": "ACME endpoint query attempts"
          },
          "expected_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Uri",
            "description": "Expected URI from ACME account"
          },
          "is_match": {
            "type": "boolean",
            "title": "Is Match",
            "description": "True if CAA accounturi matches ACME account"
          },
          "info_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Info Message",
            "description": "Additional context or guidance"
          }
        },
        "type": "object",
        "required": [
          "caa_records",
          "acme_fetches",
          "is_match"
        ],
        "title": "CaaCheckResult",
        "description": "CAA record check result (informational, not required for validation)."
      },
      "CancelOperationRequest": {
        "properties": {
          "cancelled": {
            "type": "boolean",
            "title": "Cancelled",
            "description": "Whether an operation was actually cancelled"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Correlation ID of the cancelled op"
          }
        },
        "type": "object",
        "required": [
          "cancelled"
        ],
        "title": "CancelOperationRequest",
        "description": "Response for cancel operation."
      },
      "CancelOperationResponse": {
        "properties": {
          "cvm_id": {
            "type": "string",
            "title": "Cvm Id"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          },
          "operation_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Type"
          },
          "cancelled": {
            "type": "boolean",
            "title": "Cancelled"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "cancelled"
        ],
        "title": "CancelOperationResponse"
      },
      "CardFingerprintDetailOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint",
            "description": "Stripe card fingerprint string"
          },
          "is_claimed": {
            "type": "boolean",
            "title": "Is Claimed",
            "description": "Whether free verification credits were claimed"
          },
          "is_blacklisted": {
            "type": "boolean",
            "title": "Is Blacklisted",
            "description": "Whether this fingerprint is blocked"
          },
          "blacklist_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blacklist Reason",
            "description": "Admin-provided reason"
          },
          "blacklisted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blacklisted At",
            "description": "When the blacklist was set"
          },
          "first_verification_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Verification At",
            "description": "First verification attempt timestamp"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "verification_count": {
            "type": "integer",
            "title": "Verification Count",
            "description": "Total verification attempts using this card"
          },
          "verification_attempts": {
            "items": {
              "$ref": "#/components/schemas/VerificationAttemptOut"
            },
            "type": "array",
            "title": "Verification Attempts"
          }
        },
        "type": "object",
        "required": [
          "id",
          "fingerprint",
          "is_claimed",
          "is_blacklisted",
          "created_at",
          "verification_count",
          "verification_attempts"
        ],
        "title": "CardFingerprintDetailOut",
        "description": "Card fingerprint with full verification attempt history."
      },
      "CardFingerprintListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CardFingerprintOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching records (before pagination)"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "CardFingerprintListResponse",
        "description": "Paginated list of card fingerprints."
      },
      "CardFingerprintOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint",
            "description": "Stripe card fingerprint string"
          },
          "is_claimed": {
            "type": "boolean",
            "title": "Is Claimed",
            "description": "Whether free verification credits were claimed"
          },
          "is_blacklisted": {
            "type": "boolean",
            "title": "Is Blacklisted",
            "description": "Whether this fingerprint is blocked"
          },
          "blacklist_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blacklist Reason",
            "description": "Admin-provided reason"
          },
          "blacklisted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blacklisted At",
            "description": "When the blacklist was set"
          },
          "first_verification_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Verification At",
            "description": "First verification attempt timestamp"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "verification_count": {
            "type": "integer",
            "title": "Verification Count",
            "description": "Total verification attempts using this card"
          }
        },
        "type": "object",
        "required": [
          "id",
          "fingerprint",
          "is_claimed",
          "is_blacklisted",
          "created_at",
          "verification_count"
        ],
        "title": "CardFingerprintOut",
        "description": "Card fingerprint record with verification count."
      },
      "Certificate": {
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/CertificateSubject"
          },
          "issuer": {
            "$ref": "#/components/schemas/CertificateIssuer"
          },
          "serial_number": {
            "type": "string",
            "title": "Serial Number"
          },
          "not_before": {
            "type": "string",
            "format": "date-time",
            "title": "Not Before"
          },
          "not_after": {
            "type": "string",
            "format": "date-time",
            "title": "Not After"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint"
          },
          "signature_algorithm": {
            "type": "string",
            "title": "Signature Algorithm"
          },
          "sans": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sans"
          },
          "is_ca": {
            "type": "boolean",
            "title": "Is Ca",
            "default": false
          },
          "position_in_chain": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position In Chain"
          },
          "quote": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "cert_usage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cert Usage"
          }
        },
        "type": "object",
        "required": [
          "subject",
          "issuer",
          "serial_number",
          "not_before",
          "not_after",
          "version",
          "fingerprint",
          "signature_algorithm"
        ],
        "title": "Certificate"
      },
      "CertificateIssuer": {
        "properties": {
          "common_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Common Name",
            "description": "Issuer common name"
          },
          "organization": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization",
            "description": "Issuer organization"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "Issuer country code"
          }
        },
        "type": "object",
        "title": "CertificateIssuer"
      },
      "CertificateSubject": {
        "properties": {
          "common_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Common Name",
            "description": "Certificate subject common name"
          },
          "organization": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization",
            "description": "Organization name"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "Country code"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State",
            "description": "State or province"
          },
          "locality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locality",
            "description": "Locality name"
          }
        },
        "type": "object",
        "title": "CertificateSubject"
      },
      "ChangeEmailPayload": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          },
          "current_password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Password"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "ChangeEmailPayload",
        "description": "Request payload for changing email address"
      },
      "ChargeRequest": {
        "properties": {
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "USD amount to charge (minimum $0.50)",
            "examples": [
              "19.99",
              "123.456000"
            ],
            "ge": 0.5
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProvider",
            "description": "Payment provider: coinbase, square, stripe, or mock"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Order flow code: setup-billing or top-up"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Id",
            "description": "Invoice ID for direct invoice payment"
          },
          "force_checkout": {
            "type": "boolean",
            "title": "Force Checkout",
            "description": "For Stripe only: skip direct card charge and always create checkout session",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "amount",
          "provider"
        ],
        "title": "ChargeRequest",
        "description": "Request body for creating a payment charge."
      },
      "CheckEmailMXInfo": {
        "properties": {
          "accepts_mail": {
            "type": "boolean",
            "title": "Accepts Mail"
          },
          "records": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Records"
          }
        },
        "type": "object",
        "required": [
          "accepts_mail",
          "records"
        ],
        "title": "CheckEmailMXInfo"
      },
      "CheckEmailMisc": {
        "properties": {
          "is_disposable": {
            "type": "boolean",
            "title": "Is Disposable"
          },
          "is_role_account": {
            "type": "boolean",
            "title": "Is Role Account"
          },
          "is_b2c": {
            "type": "boolean",
            "title": "Is B2C"
          },
          "gravatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gravatar Url"
          },
          "haveibeenpwned": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Haveibeenpwned"
          }
        },
        "type": "object",
        "required": [
          "is_disposable",
          "is_role_account",
          "is_b2c"
        ],
        "title": "CheckEmailMisc"
      },
      "CheckEmailResult": {
        "properties": {
          "input": {
            "type": "string",
            "title": "Input"
          },
          "is_reachable": {
            "type": "string",
            "enum": [
              "unknown",
              "invalid",
              "risky",
              "safe"
            ],
            "title": "Is Reachable"
          },
          "misc": {
            "$ref": "#/components/schemas/CheckEmailMisc"
          },
          "mx": {
            "$ref": "#/components/schemas/CheckEmailMXInfo"
          },
          "smtp": {
            "$ref": "#/components/schemas/CheckEmailSMTPInfo"
          },
          "syntax": {
            "$ref": "#/components/schemas/CheckEmailSyntax"
          }
        },
        "type": "object",
        "required": [
          "input",
          "is_reachable",
          "misc",
          "mx",
          "smtp",
          "syntax"
        ],
        "title": "CheckEmailResult"
      },
      "CheckEmailSMTPInfo": {
        "properties": {
          "can_connect_smtp": {
            "type": "boolean",
            "title": "Can Connect Smtp",
            "default": false
          },
          "has_full_inbox": {
            "type": "boolean",
            "title": "Has Full Inbox",
            "default": false
          },
          "is_catch_all": {
            "type": "boolean",
            "title": "Is Catch All",
            "default": false
          },
          "is_deliverable": {
            "type": "boolean",
            "title": "Is Deliverable",
            "default": false
          },
          "is_disabled": {
            "type": "boolean",
            "title": "Is Disabled",
            "default": false
          }
        },
        "type": "object",
        "title": "CheckEmailSMTPInfo"
      },
      "CheckEmailSyntax": {
        "properties": {
          "address": {
            "type": "string",
            "title": "Address"
          },
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "is_valid_syntax": {
            "type": "boolean",
            "title": "Is Valid Syntax"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "normalized_email": {
            "type": "string",
            "title": "Normalized Email"
          },
          "suggestion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggestion"
          }
        },
        "type": "object",
        "required": [
          "address",
          "domain",
          "is_valid_syntax",
          "username",
          "normalized_email"
        ],
        "title": "CheckEmailSyntax"
      },
      "CheckSlugRequest": {
        "properties": {
          "slug": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Slug",
            "description": "Proposed workspace slug (lowercase alphanumeric and hyphens)"
          }
        },
        "type": "object",
        "required": [
          "slug"
        ],
        "title": "CheckSlugRequest",
        "description": "Slug validation request."
      },
      "CheckSlugResponse": {
        "properties": {
          "is_valid": {
            "type": "boolean",
            "title": "Is Valid",
            "description": "Whether slug passes format and reserved word checks"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code",
            "description": "Error code if invalid (e.g., 'reserved', 'invalid_format')"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message",
            "description": "Human-readable error message"
          }
        },
        "type": "object",
        "required": [
          "is_valid"
        ],
        "title": "CheckSlugResponse",
        "description": "Slug validation result."
      },
      "CommitUpdateRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token",
            "description": "Commit token (can also be passed as ?token= query param)",
            "default": ""
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "Compose hash from Phase 1. If omitted, auto-read from commit token.",
            "default": ""
          },
          "transaction_hash": {
            "type": "string",
            "title": "Transaction Hash",
            "description": "Transaction hash proving on-chain registration. Leave empty or use 'already-registered' if the hash was already registered on-chain.",
            "default": ""
          }
        },
        "type": "object",
        "title": "CommitUpdateRequest"
      },
      "ComposeFilePatchRequest": {
        "properties": {
          "compose_manifest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ComposeManifestPatchRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys"
          }
        },
        "type": "object",
        "title": "ComposeFilePatchRequest",
        "description": "API request model for partially updating CVM compose files - matches CvmUpgradePayload structure"
      },
      "ComposeFileProvisionResponse": {
        "properties": {
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "kms_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KMSInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "compose_hash_registered": {
            "type": "boolean",
            "title": "Compose Hash Registered",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "app_id",
          "compose_hash"
        ],
        "title": "ComposeFileProvisionResponse",
        "description": "API response model for compose file provision"
      },
      "ComposeFileUpdateRequest": {
        "properties": {
          "compose_file": {
            "$ref": "#/components/schemas/AppComposeV2"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys"
          }
        },
        "type": "object",
        "required": [
          "compose_file",
          "compose_hash"
        ],
        "title": "ComposeFileUpdateRequest",
        "description": "API request model for updating CVM compose files"
      },
      "ComposeManifest": {
        "properties": {
          "bash_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bash Script"
          },
          "default_gateway_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Gateway Domain"
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "docker_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DockerConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Features",
            "default": [
              "kms",
              "tproxy-net"
            ]
          },
          "kms_enabled": {
            "type": "boolean",
            "title": "Kms Enabled",
            "default": true
          },
          "manifest_version": {
            "type": "integer",
            "title": "Manifest Version",
            "default": 1
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script"
          },
          "public_logs": {
            "type": "boolean",
            "title": "Public Logs",
            "default": true
          },
          "public_sysinfo": {
            "type": "boolean",
            "title": "Public Sysinfo",
            "default": true
          },
          "runner": {
            "type": "string",
            "title": "Runner",
            "default": "docker-compose"
          },
          "salt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salt"
          },
          "tproxy_enabled": {
            "type": "boolean",
            "title": "Tproxy Enabled",
            "default": true
          },
          "version": {
            "type": "string",
            "title": "Version",
            "default": "1.0.0"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ComposeManifest",
        "description": "@see https://github.com/Dstack-TEE/dstack/blob/master/tdxctl/src/utils.rs#L77\n@see https://github.com/Dstack-TEE/dstack/blob/master/basefiles/app-compose.sh"
      },
      "ComposeManifestPatchRequest": {
        "properties": {
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script"
          }
        },
        "type": "object",
        "title": "ComposeManifestPatchRequest",
        "description": "Partial update for compose_manifest fields"
      },
      "ComputeMetrics": {
        "properties": {
          "total_cu_hours": {
            "type": "string",
            "title": "Total Cu Hours",
            "description": "Total CU-hours"
          },
          "estimated_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Estimated Cost",
            "description": "Estimated compute cost",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "total_cu_hours",
          "estimated_cost"
        ],
        "title": "ComputeMetrics",
        "description": "Compute usage metrics."
      },
      "ConnectionItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug"
          },
          "team_balance": {
            "type": "string",
            "title": "Team Balance"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "credits_line": {
            "type": "number",
            "title": "Credits Line"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid",
            "default": false
          },
          "last_checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked At"
          },
          "last_recharged_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Recharged At"
          },
          "last_skip_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Skip Reason"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "username",
          "email",
          "team_id",
          "team_name",
          "team_balance",
          "external_id",
          "credits_line",
          "created_at"
        ],
        "title": "ConnectionItem"
      },
      "ConnectionListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectionItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "ConnectionListResponse"
      },
      "ContractDeviceOut": {
        "properties": {
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "on_chain_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Chain Allowed",
            "description": "null if multicall3 failed"
          },
          "teepods": {
            "items": {
              "$ref": "#/components/schemas/DeviceTeepodInfo"
            },
            "type": "array",
            "title": "Teepods"
          }
        },
        "type": "object",
        "required": [
          "device_id",
          "teepods"
        ],
        "title": "ContractDeviceOut"
      },
      "ContractDevicesResponse": {
        "properties": {
          "contract_id": {
            "type": "integer",
            "title": "Contract Id"
          },
          "contract_address": {
            "type": "string",
            "title": "Contract Address"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id"
          },
          "devices": {
            "items": {
              "$ref": "#/components/schemas/ContractDeviceOut"
            },
            "type": "array",
            "title": "Devices"
          }
        },
        "type": "object",
        "required": [
          "contract_id",
          "contract_address",
          "chain_id",
          "devices"
        ],
        "title": "ContractDevicesResponse"
      },
      "ContractOsImageOut": {
        "properties": {
          "os_image_id": {
            "type": "integer",
            "title": "Os Image Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash"
          },
          "on_chain_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Chain Allowed",
            "description": "null if no hash or multicall3 failed"
          }
        },
        "type": "object",
        "required": [
          "os_image_id",
          "name",
          "version"
        ],
        "title": "ContractOsImageOut"
      },
      "ContractOsImagesResponse": {
        "properties": {
          "contract_id": {
            "type": "integer",
            "title": "Contract Id"
          },
          "contract_address": {
            "type": "string",
            "title": "Contract Address"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/ContractOsImageOut"
            },
            "type": "array",
            "title": "Images"
          }
        },
        "type": "object",
        "required": [
          "contract_id",
          "contract_address",
          "chain_id",
          "images"
        ],
        "title": "ContractOsImagesResponse"
      },
      "CoreMetrics": {
        "properties": {
          "estimated_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Estimated Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "running_cvms_count": {
            "type": "integer",
            "title": "Running Cvms Count"
          },
          "daily_average_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Daily Average Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "daily_forecast": {
            "type": "string",
            "format": "decimal",
            "title": "Daily Forecast",
            "description": "Forecasted daily cost based on currently running CVMs (24h estimation)",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "estimated_per_cvm": {
            "type": "string",
            "format": "decimal",
            "title": "Estimated Per Cvm",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "compute": {
            "$ref": "#/components/schemas/ComputeMetrics"
          },
          "storage": {
            "$ref": "#/components/schemas/StorageMetrics"
          }
        },
        "type": "object",
        "required": [
          "estimated_cost",
          "running_cvms_count",
          "daily_average_estimated",
          "daily_forecast",
          "estimated_per_cvm",
          "compute",
          "storage"
        ],
        "title": "CoreMetrics",
        "description": "Core usage metrics."
      },
      "CreateAppInstanceRequest": {
        "properties": {
          "teepod_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Id",
            "description": "Target node ID (deprecated, use node_id)"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Target node ID for the replica"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "New encrypted env blob (hex)"
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash",
            "description": "Explicit compose hash to replicate. Required when the source app has multiple live instances."
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File",
            "description": "New Docker Compose YAML content"
          },
          "pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script",
            "description": "New pre-launch script content"
          },
          "token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Token",
            "description": "Commit token returned by a prior prepare-only request. When set, this request commits the previously-prepared instance instead of preparing a new one."
          },
          "transaction_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transaction Hash",
            "description": "On-chain transaction hash proving compose-hash registration. Use 'already-registered' (or omit) when the hash was registered earlier."
          }
        },
        "type": "object",
        "title": "CreateAppInstanceRequest",
        "description": "Request model for creating a new instance under an existing app.\n\nInherits node_id, encrypted_env, compose_hash and their validators from ReplicateRequest."
      },
      "CreateConnectionRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "credits_line": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Credits Line",
            "default": 5.0
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "team_id"
        ],
        "title": "CreateConnectionRequest"
      },
      "CreateDraftInvoiceRequest": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Team ID"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start",
            "description": "Period start datetime"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End",
            "description": "Period end datetime"
          },
          "invoice_type": {
            "type": "string",
            "enum": [
              "auto",
              "local",
              "stripe"
            ],
            "title": "Invoice Type",
            "description": "Draft invoice channel. auto=prefer Stripe when payment method is available; local=always local; stripe=force Stripe (validation required).",
            "default": "auto"
          },
          "include_usage": {
            "type": "boolean",
            "title": "Include Usage",
            "description": "Include usage data from ClickHouse",
            "default": true
          },
          "include_transactions": {
            "type": "boolean",
            "title": "Include Transactions",
            "description": "Include unpaid transactions from PostgreSQL",
            "default": false
          },
          "merge_transactions_by_vm": {
            "type": "boolean",
            "title": "Merge Transactions By Vm",
            "description": "Preview transactions merged by VM instead of individual transactions",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "period_start",
          "period_end"
        ],
        "title": "CreateDraftInvoiceRequest",
        "description": "Request to create a draft invoice."
      },
      "CreateDraftInvoiceResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "hashid",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Id"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "draft"
          },
          "invoice_type": {
            "type": "string",
            "enum": [
              "local",
              "stripe"
            ],
            "title": "Invoice Type",
            "default": "local"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "CreateDraftInvoiceResponse",
        "description": "Response for draft invoice creation."
      },
      "CreateGpuRentalOrderRequest": {
        "properties": {
          "sku_id": {
            "type": "integer",
            "title": "Sku Id",
            "description": "ID of the GPU SKU to rent"
          },
          "sku_price_id": {
            "type": "integer",
            "title": "Sku Price Id",
            "description": "ID of the selected pricing plan"
          },
          "deployment_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Deployment Name",
            "description": "Name for the deployment"
          },
          "docker_compose_file": {
            "type": "string",
            "minLength": 1,
            "title": "Docker Compose File",
            "description": "Docker Compose configuration"
          },
          "quantity": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Quantity",
            "description": "Number of instances (default: 1)",
            "default": 1
          },
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "App ID from provisioning"
          },
          "app_id_salt": {
            "type": "string",
            "title": "App Id Salt",
            "description": "Salt for app ID generation"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "Compose hash from provisioning"
          },
          "app_env_encrypt_pubkey": {
            "type": "string",
            "title": "App Env Encrypt Pubkey",
            "description": "Public key for encrypting environment variables"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "Encrypted environment variables (X25519 + AES-GCM encrypted)"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys",
            "description": "List of environment variable keys for metadata tracking"
          },
          "os_image_name": {
            "type": "string",
            "title": "Os Image Name",
            "description": "Selected OS image from provisioning"
          }
        },
        "type": "object",
        "required": [
          "sku_id",
          "sku_price_id",
          "deployment_name",
          "docker_compose_file",
          "app_id",
          "app_id_salt",
          "compose_hash",
          "app_env_encrypt_pubkey",
          "os_image_name"
        ],
        "title": "CreateGpuRentalOrderRequest",
        "description": "Request payload for creating a GPU rental order."
      },
      "CreateInstanceTypeRequest": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Unique ID (e.g., 'tdx.small')"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Display name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Description"
          },
          "vcpu": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Vcpu",
            "description": "vCPU count"
          },
          "memory_mb": {
            "type": "integer",
            "minimum": 512.0,
            "title": "Memory Mb",
            "description": "Memory in MB"
          },
          "hourly_rate": {
            "type": "number",
            "minimum": 0.0,
            "title": "Hourly Rate",
            "description": "Hourly rate in USD"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Requires GPU",
            "default": false
          },
          "requires_gpu_count": {
            "type": "integer",
            "title": "Requires Gpu Count",
            "description": "GPU count",
            "default": 0
          },
          "requires_gpu_cc_mode": {
            "type": "boolean",
            "title": "Requires Gpu Cc Mode",
            "description": "Requires GPU CC mode",
            "default": false
          },
          "default_disk_size_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 20.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Disk Size Gb",
            "description": "Default disk size (GB)"
          },
          "extra_specs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Specs",
            "description": "Extended specs"
          },
          "public": {
            "type": "boolean",
            "title": "Public",
            "description": "Publicly visible",
            "default": true
          },
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Family",
            "description": "Family (cpu, gpu)"
          },
          "display_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Order",
            "description": "Sort order"
          },
          "hugepages": {
            "type": "boolean",
            "title": "Hugepages",
            "description": "Enable hugepages",
            "default": false
          },
          "pin_numa": {
            "type": "boolean",
            "title": "Pin Numa",
            "description": "Enable NUMA pinning",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "vcpu",
          "memory_mb",
          "hourly_rate"
        ],
        "title": "CreateInstanceTypeRequest",
        "description": "Create instance type request."
      },
      "CreateInvoiceItemRequest": {
        "properties": {
          "instance_id": {
            "type": "string",
            "title": "Instance Id",
            "description": "Instance ID (can be custom)"
          },
          "instance_name": {
            "type": "string",
            "title": "Instance Name",
            "description": "Instance display name"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region",
            "description": "Region"
          },
          "cost": {
            "type": "number",
            "title": "Cost",
            "description": "Item amount (positive or negative)"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Item description"
          },
          "record_count": {
            "type": "integer",
            "title": "Record Count",
            "description": "Number of billing records",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "instance_id",
          "instance_name",
          "cost",
          "description"
        ],
        "title": "CreateInvoiceItemRequest",
        "description": "Request to manually add an invoice item."
      },
      "CreateTappRequest": {
        "properties": {
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "The calculated app ID from compose file."
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "The compose hash of the app compose file."
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "The encrypted environment variables."
          },
          "kms_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Id",
            "description": "The KMS ID."
          },
          "contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Address",
            "description": "The contract address."
          },
          "deployer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployer Address",
            "description": "The deployer address."
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys",
            "description": "The environment variables to use for the app."
          }
        },
        "type": "object",
        "required": [
          "app_id",
          "compose_hash"
        ],
        "title": "CreateTappRequest"
      },
      "CreateWorkloadTappRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the tapp."
          },
          "instance_type": {
            "type": "string",
            "title": "Instance Type",
            "description": "The instance_type of the tapp."
          },
          "model_id": {
            "type": "string",
            "title": "Model Id",
            "description": "The model_id of the tapp."
          },
          "scheduled_delete_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled Delete At",
            "description": "The scheduled delete time of the tapp."
          }
        },
        "type": "object",
        "required": [
          "name",
          "instance_type",
          "model_id"
        ],
        "title": "CreateWorkloadTappRequest"
      },
      "CreateWorkspaceRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3,
            "pattern": "^[a-z0-9-]+$",
            "title": "Slug"
          },
          "creator_user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "User hash ID (usr_xxx)",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "tier": {
            "$ref": "#/components/schemas/TeamTier",
            "default": "LEVEL_1"
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug",
          "creator_user_id"
        ],
        "title": "CreateWorkspaceRequest",
        "description": "Request model for creating a new workspace."
      },
      "CreateWorkspaceResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "creator_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "tier": {
            "$ref": "#/components/schemas/TeamTier"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "creator_id",
          "tier",
          "created_at",
          "message"
        ],
        "title": "CreateWorkspaceResponse",
        "description": "Response model for workspace creation."
      },
      "CreatorInfo": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "row_id": {
            "type": "integer",
            "title": "Row Id"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "last_activity_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Activity At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "row_id",
          "username",
          "email"
        ],
        "title": "CreatorInfo",
        "description": "Basic creator information embedded in team responses."
      },
      "CreditAdjustment": {
        "properties": {
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "CreditAdjustment"
      },
      "CreditAdjustmentRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Amount to adjust (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for adjustment (required for audit)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional custom description (defaults to 'Credit adjustment for reconciliation')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "CreditAdjustmentRequest",
        "description": "Request model for credit adjustment (reconciliation)."
      },
      "CreditAdjustmentResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "previous_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_balance": {
            "type": "string",
            "format": "decimal",
            "title": "New Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "previous_balance",
          "new_balance"
        ],
        "title": "CreditAdjustmentResponse",
        "description": "Response model for credit adjustment (reconciliation)."
      },
      "CreditHealthResponse": {
        "properties": {
          "credit_id": {
            "type": "integer",
            "title": "Credit Id"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "title": "Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "granted_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Granted Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "total_snapshot": {
            "type": "string",
            "format": "decimal",
            "title": "Total Snapshot",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "ledger_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Ledger Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "total_debt": {
            "type": "string",
            "format": "decimal",
            "title": "Total Debt",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "expected_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Expected Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "adjustment_needed": {
            "type": "string",
            "format": "decimal",
            "title": "Adjustment Needed",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "is_healthy": {
            "type": "boolean",
            "title": "Is Healthy"
          },
          "discrepancy": {
            "type": "string",
            "format": "decimal",
            "title": "Discrepancy",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "unexplained_discrepancy": {
            "type": "string",
            "format": "decimal",
            "title": "Unexplained Discrepancy",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          },
          "suggested_actions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Suggested Actions"
          },
          "suggested_action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Action"
          }
        },
        "type": "object",
        "required": [
          "credit_id",
          "balance",
          "granted_balance",
          "total_snapshot",
          "ledger_balance",
          "total_debt",
          "expected_balance",
          "adjustment_needed",
          "is_healthy",
          "discrepancy",
          "unexplained_discrepancy",
          "warnings",
          "suggested_actions"
        ],
        "title": "CreditHealthResponse",
        "description": "Response for credit health check endpoint."
      },
      "CreditTransaction": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "has_paid": {
            "type": "boolean",
            "title": "Has Paid"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "amount",
          "type",
          "has_paid",
          "created_at"
        ],
        "title": "CreditTransaction"
      },
      "CreditTransactionItem": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "credit_id": {
            "type": "integer",
            "title": "Credit Id"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^wks_.+",
                "format": "hashid",
                "title": "HashedId[teams]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "wks_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^in_.+",
                "format": "hashid",
                "title": "HashedId[invoices]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "in_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Id"
          },
          "amount": {
            "type": "number",
            "title": "Amount"
          },
          "has_paid": {
            "type": "boolean",
            "title": "Has Paid"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "internal_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Internal Note"
          },
          "created_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Username"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "credit_id",
          "team_id",
          "invoice_id",
          "amount",
          "has_paid",
          "type",
          "description",
          "created_at"
        ],
        "title": "CreditTransactionItem",
        "description": "Credit transaction item for workspace transactions list."
      },
      "CreditTransactionOut": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "credit_id": {
            "type": "string",
            "pattern": "^crd_.+",
            "format": "hashid",
            "title": "HashedId[credits]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crd_0123abcd"
            ]
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "amount": {
            "type": "number",
            "title": "Amount"
          },
          "has_paid": {
            "type": "boolean",
            "title": "Has Paid"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "credit_id",
          "team_id",
          "amount",
          "has_paid",
          "type",
          "description",
          "created_at"
        ],
        "title": "CreditTransactionOut"
      },
      "CurrentStatusResponse": {
        "properties": {
          "running_cvms_count": {
            "type": "integer",
            "title": "Running Cvms Count",
            "description": "Number of currently running CVMs"
          },
          "daily_forecast": {
            "type": "string",
            "format": "decimal",
            "title": "Daily Forecast",
            "description": "Forecasted daily cost (24h)",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "monthly_forecast": {
            "type": "string",
            "format": "decimal",
            "title": "Monthly Forecast",
            "description": "Forecasted monthly cost (30 days)",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "per_cvm_daily_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Per Cvm Daily Cost",
            "description": "Daily cost per CVM",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "running_cvms_count",
          "daily_forecast",
          "monthly_forecast",
          "per_cvm_daily_cost"
        ],
        "title": "CurrentStatusResponse",
        "description": "Current running status response."
      },
      "CvmAllocationResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "cvm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Id"
          },
          "cvm_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm App Id"
          },
          "cvm_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Status"
          },
          "allocated_at": {
            "type": "string",
            "title": "Allocated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "allocated_at"
        ],
        "title": "CvmAllocationResponse",
        "description": "CVM allocation info for a GPU rental order."
      },
      "CvmAttestation": {
        "properties": {
          "is_online": {
            "type": "boolean",
            "title": "Is Online"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "app_certificates": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Certificate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Certificates"
          },
          "tcb_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TcbInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose File"
          }
        },
        "type": "object",
        "required": [
          "is_online"
        ],
        "title": "CvmAttestation",
        "description": "Model representing CVM attestation information"
      },
      "CvmComposeFile": {
        "properties": {
          "compose_file": {
            "$ref": "#/components/schemas/ComposeManifest"
          },
          "env_pubkey": {
            "type": "string",
            "title": "Env Pubkey"
          },
          "salt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salt"
          }
        },
        "type": "object",
        "required": [
          "compose_file",
          "env_pubkey"
        ],
        "title": "CvmComposeFile",
        "description": "Model representing CVM compose file information"
      },
      "CvmComposition": {
        "properties": {
          "is_online": {
            "type": "boolean",
            "title": "Is Online"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "manifest_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manifest Version"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "runner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runner"
          },
          "features": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Features"
          },
          "containers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ExtendedContainer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Containers"
          }
        },
        "type": "object",
        "required": [
          "is_online"
        ],
        "title": "CvmComposition",
        "description": "Model representing CVM container list information"
      },
      "CvmIsAllowedItem": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "app_contract_address": {
            "type": "string",
            "title": "App Contract Address"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "compose_hash_allowed": {
            "type": "boolean",
            "title": "Compose Hash Allowed"
          },
          "allow_any_device": {
            "type": "boolean",
            "title": "Allow Any Device"
          },
          "device_id_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id Allowed"
          },
          "is_allowed": {
            "type": "boolean",
            "title": "Is Allowed"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "app_contract_address",
          "compose_hash",
          "device_id",
          "compose_hash_allowed",
          "allow_any_device",
          "is_allowed"
        ],
        "title": "CvmIsAllowedItem"
      },
      "CvmNetwork": {
        "properties": {
          "is_online": {
            "type": "boolean",
            "title": "Is Online"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "internal_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Internal Ip"
          },
          "latest_handshake": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Handshake"
          },
          "public_urls": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CvmNetworkUrls"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Urls"
          }
        },
        "type": "object",
        "required": [
          "is_online"
        ],
        "title": "CvmNetwork",
        "description": "Model representing CVM network information"
      },
      "CvmNetworkUrls": {
        "properties": {
          "app": {
            "type": "string",
            "title": "App"
          },
          "instance": {
            "type": "string",
            "title": "Instance"
          }
        },
        "type": "object",
        "required": [
          "app",
          "instance"
        ],
        "title": "CvmNetworkUrls",
        "description": "Model representing public URLs for a CVM port"
      },
      "CvmNode": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "CvmNode"
      },
      "CvmOperationResponse": {
        "properties": {
          "correlation_id": {
            "type": "string",
            "title": "Correlation Id",
            "description": "Unique ID linking all events in this operation"
          },
          "operation_type": {
            "type": "string",
            "title": "Operation Type",
            "description": "Type: compose_update, power_on, resize, etc."
          },
          "target_state": {
            "type": "string",
            "title": "Target State",
            "description": "Expected CVM state after completion"
          },
          "triggered_by": {
            "type": "integer",
            "title": "Triggered By",
            "description": "User ID who initiated the operation"
          },
          "triggered_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By Username",
            "description": "Username if available"
          },
          "triggered_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By Email",
            "description": "Email if available"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At",
            "description": "UTC timestamp of first event"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "UTC timestamp of last event"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms",
            "description": "Total duration from start to completion"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current status: completed, in_progress, or failed"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Failure reason (sanitized for non-admins)"
          },
          "sub_operations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sub Operations",
            "description": "Ordered list of sub-operation types"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/OperationEventDetail"
            },
            "type": "array",
            "title": "Events",
            "description": "Chronological event timeline"
          },
          "instance_name": {
            "type": "string",
            "title": "Instance Name",
            "description": "CVM name at operation time"
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash",
            "description": "Hash identifying compose configuration"
          }
        },
        "type": "object",
        "required": [
          "correlation_id",
          "operation_type",
          "target_state",
          "triggered_by",
          "started_at",
          "status",
          "sub_operations",
          "events",
          "instance_name"
        ],
        "title": "CvmOperationResponse",
        "description": "Aggregated operation record grouped by correlation_id."
      },
      "CvmRef": {
        "properties": {
          "object_type": {
            "type": "string",
            "const": "cvm",
            "title": "Object Type",
            "description": "Fixed value 'cvm'",
            "default": "cvm"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "CVM instance UUID"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id",
            "description": "Deterministic app identifier from manifest"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "User-assigned CVM name"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid"
        ],
        "title": "CvmRef",
        "description": "Minimal CVM reference for embedding in responses."
      },
      "CvmResizePayload": {
        "properties": {
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "memory": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory"
          },
          "disk_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size"
          },
          "allow_restart": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Restart"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          }
        },
        "type": "object",
        "title": "CvmResizePayload"
      },
      "CvmStatus": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "uptime": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uptime"
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress",
            "default": false
          },
          "boot_progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boot Progress"
          },
          "boot_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boot Error"
          },
          "shutdown_progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shutdown Progress"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/GuestEvent"
            },
            "type": "array",
            "title": "Events"
          },
          "operation_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Type"
          },
          "operation_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Started At"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid",
          "status"
        ],
        "title": "CvmStatus",
        "description": "CVM status information for API response.\n\nThis schema is used for both internal status determination and API responses.\nContains current state, progress information, and async operation tracking."
      },
      "CvmSystemInfo": {
        "properties": {
          "is_online": {
            "type": "boolean",
            "title": "Is Online"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": true
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "sysinfo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SystemInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress",
            "default": false
          },
          "boot_progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boot Progress"
          },
          "boot_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boot Error"
          }
        },
        "type": "object",
        "required": [
          "is_online"
        ],
        "title": "CvmSystemInfo"
      },
      "CvmTeescopeEgress": {
        "properties": {
          "total_sent_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Sent Bytes",
            "default": 0
          },
          "total_recv_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Recv Bytes",
            "default": 0
          },
          "peak_sent_kbs": {
            "type": "number",
            "minimum": 0.0,
            "title": "Peak Sent Kbs",
            "default": 0.0
          },
          "peak_recv_kbs": {
            "type": "number",
            "minimum": 0.0,
            "title": "Peak Recv Kbs",
            "default": 0.0
          }
        },
        "type": "object",
        "title": "CvmTeescopeEgress"
      },
      "CvmTeescopeInfo": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "qemu": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmTeescopeQemu"
              },
              {
                "type": "null"
              }
            ]
          },
          "storage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmTeescopeStorage"
              },
              {
                "type": "null"
              }
            ]
          },
          "egress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmTeescopeEgress"
              },
              {
                "type": "null"
              }
            ]
          },
          "ingress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmTeescopeIngress"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "vm_uuid"
        ],
        "title": "CvmTeescopeInfo"
      },
      "CvmTeescopeIngress": {
        "properties": {
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "total_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Bytes",
            "default": 0
          },
          "connections": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Connections",
            "default": 0
          },
          "snis": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Snis"
          }
        },
        "type": "object",
        "title": "CvmTeescopeIngress"
      },
      "CvmTeescopeQemu": {
        "properties": {
          "pid": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pid"
          },
          "uptime": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Uptime",
            "default": 0
          },
          "cpu_usage_perc": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Usage Perc",
            "default": 0.0
          },
          "cpu_pct_usr": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Usr",
            "default": 0.0
          },
          "cpu_pct_system": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct System",
            "default": 0.0
          },
          "cpu_pct_guest": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Guest",
            "default": 0.0
          },
          "cpu_pct_wait": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Wait",
            "default": 0.0
          },
          "cpu_pct_total": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Total",
            "default": 0.0
          },
          "cpu_cores": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cpu Cores",
            "default": 0
          },
          "allocated_mb": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Allocated Mb",
            "default": 0
          },
          "kvm_guest_mem_mb": {
            "type": "number",
            "minimum": 0.0,
            "title": "Kvm Guest Mem Mb",
            "default": 0.0
          },
          "kvm_mem_usage_perc": {
            "type": "number",
            "minimum": 0.0,
            "title": "Kvm Mem Usage Perc",
            "default": 0.0
          },
          "io_read_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Io Read Bytes",
            "default": 0
          },
          "io_write_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Io Write Bytes",
            "default": 0
          },
          "slots": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Slots"
          }
        },
        "type": "object",
        "required": [
          "pid"
        ],
        "title": "CvmTeescopeQemu"
      },
      "CvmTeescopeStorage": {
        "properties": {
          "size_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Size Bytes",
            "default": 0
          },
          "exists": {
            "type": "boolean",
            "title": "Exists",
            "default": false
          }
        },
        "type": "object",
        "title": "CvmTeescopeStorage"
      },
      "CvmUpgradePayload": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "compose_manifest": {
            "$ref": "#/components/schemas/AppComposeV2"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env"
          },
          "user_config": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Config"
          },
          "update_ports": {
            "type": "boolean",
            "title": "Update Ports",
            "default": false
          },
          "ports": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PortMapping"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ports"
          },
          "allow_restart": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Restart"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys"
          }
        },
        "type": "object",
        "required": [
          "compose_manifest"
        ],
        "title": "CvmUpgradePayload"
      },
      "CvmUserConfig": {
        "properties": {
          "hostname": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hostname",
            "description": "CVM hostname"
          },
          "ssh_authorized_keys": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ssh Authorized Keys",
            "description": "SSH public keys injected at launch"
          },
          "default_gateway_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Gateway Domain",
            "description": "Default gateway domain"
          }
        },
        "type": "object",
        "title": "CvmUserConfig"
      },
      "DailyStats": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date",
            "description": "Date of the metrics"
          },
          "total_users": {
            "type": "integer",
            "title": "Total Users",
            "description": "Cumulative registered users"
          },
          "activated_users": {
            "type": "integer",
            "title": "Activated Users",
            "description": "Users who created at least one CVM"
          },
          "active_users": {
            "type": "integer",
            "title": "Active Users",
            "description": "Users with running CVMs"
          },
          "total_vms": {
            "type": "integer",
            "title": "Total Vms",
            "description": "Cumulative CVMs created"
          },
          "running_vms": {
            "type": "integer",
            "title": "Running Vms",
            "description": "CVMs in running state"
          },
          "total_vcpu": {
            "type": "integer",
            "title": "Total Vcpu",
            "description": "Sum of vCPUs across all CVMs"
          },
          "total_memory_gb": {
            "type": "number",
            "title": "Total Memory Gb",
            "description": "Sum of memory (GB) across all CVMs"
          },
          "total_disk_gb": {
            "type": "integer",
            "title": "Total Disk Gb",
            "description": "Sum of disk (GB) across all CVMs"
          },
          "running_vcpu": {
            "type": "integer",
            "title": "Running Vcpu",
            "description": "vCPUs for running CVMs only"
          },
          "running_memory_gb": {
            "type": "number",
            "title": "Running Memory Gb",
            "description": "Memory (GB) for running CVMs only"
          },
          "running_disk_gb": {
            "type": "integer",
            "title": "Running Disk Gb",
            "description": "Disk (GB) for running CVMs only"
          }
        },
        "type": "object",
        "required": [
          "date",
          "total_users",
          "activated_users",
          "active_users",
          "total_vms",
          "running_vms",
          "total_vcpu",
          "total_memory_gb",
          "total_disk_gb",
          "running_vcpu",
          "running_memory_gb",
          "running_disk_gb"
        ],
        "title": "DailyStats",
        "description": "Platform metrics for a single day."
      },
      "DailyTrend": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "is_estimated": {
            "type": "boolean",
            "title": "Is Estimated",
            "description": "Whether this is an estimated value"
          },
          "compute_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Compute Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "compute_by_instance_type": {
            "additionalProperties": {
              "type": "string",
              "format": "decimal",
              "description": "A monetary value with precise decimal arithmetic",
              "examples": [
                "19.99",
                "123.456000"
              ]
            },
            "type": "object",
            "title": "Compute By Instance Type",
            "description": "Compute cost breakdown by instance type"
          },
          "storage_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Storage Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "date",
          "is_estimated",
          "compute_estimated",
          "compute_by_instance_type",
          "storage_estimated"
        ],
        "title": "DailyTrend",
        "description": "Daily usage trend data."
      },
      "DailyUptimeItem": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "total_checks": {
            "type": "integer",
            "title": "Total Checks"
          },
          "successful_checks": {
            "type": "integer",
            "title": "Successful Checks"
          },
          "uptime_percent": {
            "type": "number",
            "title": "Uptime Percent"
          },
          "avg_duration_ms": {
            "type": "number",
            "title": "Avg Duration Ms"
          }
        },
        "type": "object",
        "required": [
          "date",
          "total_checks",
          "successful_checks",
          "uptime_percent",
          "avg_duration_ms"
        ],
        "title": "DailyUptimeItem"
      },
      "DailyUptimeResponse": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/DailyUptimeItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "items"
        ],
        "title": "DailyUptimeResponse"
      },
      "DailyUsageItem": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "compute_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Compute Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "disk_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Disk Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "total_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Total Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "usage_hours": {
            "type": "number",
            "title": "Usage Hours"
          }
        },
        "type": "object",
        "required": [
          "date",
          "compute_cost",
          "disk_cost",
          "total_cost",
          "usage_hours"
        ],
        "title": "DailyUsageItem",
        "description": "Daily usage item with compute and disk costs."
      },
      "DecoupleOrderRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "description": "Short justification recorded in logs and returned to the caller"
          },
          "internal_note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Internal Note",
            "description": "Optional extended audit note, not user-visible"
          },
          "target_billing_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingPeriod"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit billing period for the detached CVMs. Defaults to HOURLY for regular tiers and SKIP for enterprise tiers."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "DecoupleOrderRequest",
        "description": "Input for decoupling a GPU rental order."
      },
      "DecoupleOrderResponse": {
        "properties": {
          "order_id": {
            "type": "string",
            "format": "hashid",
            "title": "Order Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/GpuRentalOrderStatus"
          },
          "previous_status": {
            "$ref": "#/components/schemas/GpuRentalOrderStatus"
          },
          "decoupled_at": {
            "type": "string",
            "format": "date-time",
            "title": "Decoupled At"
          },
          "target_billing_period": {
            "$ref": "#/components/schemas/BillingPeriod"
          },
          "affected_cvms": {
            "items": {
              "$ref": "#/components/schemas/DecoupledCvmChangeOut"
            },
            "type": "array",
            "title": "Affected Cvms"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "status",
          "previous_status",
          "decoupled_at",
          "target_billing_period",
          "affected_cvms"
        ],
        "title": "DecoupleOrderResponse"
      },
      "DecoupledCvmChangeOut": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "previous_billing_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingPeriod"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_billing_period": {
            "$ref": "#/components/schemas/BillingPeriod"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "previous_billing_period",
          "new_billing_period"
        ],
        "title": "DecoupledCvmChangeOut"
      },
      "DeviceAllowlistItem": {
        "properties": {
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "cvm_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Cvm Ids",
            "default": []
          },
          "allowed_onchain": {
            "type": "boolean",
            "title": "Allowed Onchain",
            "default": false
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "device_id",
          "status"
        ],
        "title": "DeviceAllowlistItem"
      },
      "DeviceAllowlistResponse": {
        "properties": {
          "is_onchain_kms": {
            "type": "boolean",
            "title": "Is Onchain Kms",
            "default": false
          },
          "allow_any_device": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allow Any Device"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id"
          },
          "app_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Contract Address"
          },
          "devices": {
            "items": {
              "$ref": "#/components/schemas/DeviceAllowlistItem"
            },
            "type": "array",
            "title": "Devices",
            "default": []
          }
        },
        "type": "object",
        "title": "DeviceAllowlistResponse"
      },
      "DeviceAuthorizeRequest": {
        "properties": {
          "user_code": {
            "type": "string",
            "title": "User Code",
            "description": "Verification code from CLI (e.g., XXXX-XXXX)"
          },
          "workspace_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Slug",
            "description": "Workspace to bind the token to"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code",
            "description": "2FA code if user has TOTP enabled"
          }
        },
        "type": "object",
        "required": [
          "user_code"
        ],
        "title": "DeviceAuthorizeRequest",
        "description": "Request body for user approval of a device authorization."
      },
      "DeviceCodeRequest": {
        "properties": {
          "client_id": {
            "type": "string",
            "title": "Client Id",
            "description": "OAuth client identifier",
            "default": "phala-cli"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "description": "Space-separated list of requested permissions",
            "default": "user:profile cvms:* nodes:*"
          }
        },
        "type": "object",
        "title": "DeviceCodeRequest",
        "description": "Request body for initiating device authorization flow (RFC 8628)."
      },
      "DeviceCodeResponse": {
        "properties": {
          "device_code": {
            "type": "string",
            "title": "Device Code",
            "description": "Opaque code for CLI polling"
          },
          "user_code": {
            "type": "string",
            "title": "User Code",
            "description": "Short code user enters in browser (e.g., XXXX-XXXX)"
          },
          "verification_uri": {
            "type": "string",
            "title": "Verification Uri",
            "description": "URL where user enters the code"
          },
          "verification_uri_complete": {
            "type": "string",
            "title": "Verification Uri Complete",
            "description": "URL with code pre-filled"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds until codes expire"
          },
          "interval": {
            "type": "integer",
            "title": "Interval",
            "description": "Minimum polling interval in seconds"
          }
        },
        "type": "object",
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "expires_in",
          "interval"
        ],
        "title": "DeviceCodeResponse",
        "description": "Response containing codes for device authorization flow."
      },
      "DeviceIdAuditResponse": {
        "properties": {
          "total_checked": {
            "type": "integer",
            "title": "Total Checked",
            "default": 0
          },
          "total_missing_device_id": {
            "type": "integer",
            "title": "Total Missing Device Id",
            "default": 0
          },
          "total_not_allowed": {
            "type": "integer",
            "title": "Total Not Allowed",
            "default": 0
          },
          "affected_teams": {
            "items": {
              "$ref": "#/components/schemas/AffectedTeam"
            },
            "type": "array",
            "title": "Affected Teams",
            "default": []
          }
        },
        "type": "object",
        "title": "DeviceIdAuditResponse"
      },
      "DeviceIdHistoryItem": {
        "properties": {
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "changed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Changed At"
          }
        },
        "type": "object",
        "required": [
          "device_id",
          "changed_at"
        ],
        "title": "DeviceIdHistoryItem"
      },
      "DeviceTeepodInfo": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name"
          },
          "kms_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Slug"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "teepod_name"
        ],
        "title": "DeviceTeepodInfo"
      },
      "DeviceTokenRequest": {
        "properties": {
          "device_code": {
            "type": "string",
            "title": "Device Code",
            "description": "Device code from /device/code response"
          },
          "grant_type": {
            "type": "string",
            "title": "Grant Type",
            "description": "OAuth grant type (must be device_code)",
            "default": "urn:ietf:params:oauth:grant-type:device_code"
          }
        },
        "type": "object",
        "required": [
          "device_code"
        ],
        "title": "DeviceTokenRequest",
        "description": "Request body for polling device authorization status."
      },
      "DeviceTokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token",
            "description": "API token for CLI authentication"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type",
            "description": "Token type (always 'bearer')",
            "default": "bearer"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Token lifetime in seconds (90 days)",
            "default": 7776000
          }
        },
        "type": "object",
        "required": [
          "access_token"
        ],
        "title": "DeviceTokenResponse",
        "description": "Response containing the issued access token."
      },
      "DiagnoseDomainsRequest": {
        "properties": {
          "domains": {
            "items": {
              "$ref": "#/components/schemas/DomainCheckRequest"
            },
            "type": "array",
            "title": "Domains",
            "description": "List of domain and port pairs to check"
          }
        },
        "type": "object",
        "required": [
          "domains"
        ],
        "title": "DiagnoseDomainsRequest",
        "description": "Request for diagnosing custom domain DNS configuration."
      },
      "DiagnosisResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/DomainDiagnosisResult"
            },
            "type": "array",
            "title": "Results",
            "description": "Diagnosis results in request order"
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "DiagnosisResponse",
        "description": "Response containing diagnosis results for all requested domains."
      },
      "DisableErrorEntry": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "Hashed user ID"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Error message"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "error"
        ],
        "title": "DisableErrorEntry",
        "description": "Error detail for a single user in batch disable."
      },
      "DiskInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "mount_point": {
            "type": "string",
            "title": "Mount Point"
          },
          "total_size": {
            "type": "integer",
            "title": "Total Size"
          },
          "free_size": {
            "type": "integer",
            "title": "Free Size"
          }
        },
        "type": "object",
        "required": [
          "name",
          "mount_point",
          "total_size",
          "free_size"
        ],
        "title": "DiskInfo"
      },
      "DisputeOperation": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "cvm_name": {
            "type": "string",
            "title": "Cvm Name"
          },
          "instance_id": {
            "type": "string",
            "title": "Instance Id"
          },
          "operation": {
            "type": "string",
            "title": "Operation"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "triggered_by": {
            "type": "integer",
            "title": "Triggered By"
          },
          "triggered_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By Username"
          },
          "running_duration_hours": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Running Duration Hours"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "cvm_name",
          "instance_id",
          "operation",
          "timestamp",
          "triggered_by"
        ],
        "title": "DisputeOperation"
      },
      "DisputeTimelineResponse": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "title": "Period End"
          },
          "operations": {
            "items": {
              "$ref": "#/components/schemas/DisputeOperation"
            },
            "type": "array",
            "title": "Operations"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name",
          "period_start",
          "period_end",
          "operations"
        ],
        "title": "DisputeTimelineResponse"
      },
      "DnsRecordResult": {
        "properties": {
          "record_type": {
            "type": "string",
            "title": "Record Type",
            "description": "Record type: CNAME or TXT"
          },
          "query_name": {
            "type": "string",
            "title": "Query Name",
            "description": "Domain name queried"
          },
          "expected_value": {
            "type": "string",
            "title": "Expected Value",
            "description": "Expected record value"
          },
          "actual_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Value",
            "description": "Actual value found, null if missing"
          },
          "is_valid": {
            "type": "boolean",
            "title": "Is Valid",
            "description": "True if actual matches expected"
          },
          "is_deprecated": {
            "type": "boolean",
            "title": "Is Deprecated",
            "description": "True if this record format is deprecated",
            "default": false
          },
          "warning_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warning Message",
            "description": "Deprecation or migration warning"
          }
        },
        "type": "object",
        "required": [
          "record_type",
          "query_name",
          "expected_value",
          "is_valid"
        ],
        "title": "DnsRecordResult",
        "description": "DNS record check result."
      },
      "DockerConfig": {
        "properties": {
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "default": ""
          },
          "registry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registry"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username",
            "default": ""
          }
        },
        "type": "object",
        "title": "DockerConfig"
      },
      "DomainCheckRequest": {
        "properties": {
          "domain": {
            "type": "string",
            "title": "Domain",
            "description": "Domain name to diagnose (e.g., app.example.com)"
          },
          "port": {
            "type": "integer",
            "title": "Port",
            "description": "Port number the domain routes to"
          }
        },
        "type": "object",
        "required": [
          "domain",
          "port"
        ],
        "title": "DomainCheckRequest",
        "description": "Single domain check entry."
      },
      "DomainDiagnosisResult": {
        "properties": {
          "domain": {
            "type": "string",
            "title": "Domain",
            "description": "Domain name checked"
          },
          "port": {
            "type": "integer",
            "title": "Port",
            "description": "Port number checked"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/DnsRecordResult"
            },
            "type": "array",
            "title": "Records",
            "description": "DNS record check results"
          },
          "is_valid": {
            "type": "boolean",
            "title": "Is Valid",
            "description": "True if all required records (CNAME, TXT) are correct"
          },
          "caa_check": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CaaCheckResult"
              },
              {
                "type": "null"
              }
            ],
            "description": "CAA record check (informational only)"
          }
        },
        "type": "object",
        "required": [
          "domain",
          "port",
          "records",
          "is_valid"
        ],
        "title": "DomainDiagnosisResult",
        "description": "Diagnosis result for a single domain."
      },
      "DstackAppItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "hashid": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "cvms_count": {
            "type": "integer",
            "title": "Cvms Count"
          },
          "running_cvms_count": {
            "type": "integer",
            "title": "Running Cvms Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "hashid",
          "name",
          "slug",
          "app_id",
          "cvms_count",
          "running_cvms_count",
          "created_at"
        ],
        "title": "DstackAppItem",
        "description": "Dstack app item for team dstack apps list."
      },
      "DstackAppMinimalResponse": {
        "properties": {
          "id": {
            "type": "null",
            "title": "Id"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "name": {
            "type": "null",
            "title": "Name"
          },
          "app_provision_type": {
            "type": "null",
            "title": "App Provision Type"
          },
          "app_icon_url": {
            "type": "null",
            "title": "App Icon Url"
          },
          "created_at": {
            "type": "null",
            "title": "Created At"
          },
          "kms_type": {
            "type": "null",
            "title": "Kms Type"
          },
          "profile": {
            "type": "null",
            "title": "Profile"
          },
          "current_cvm": {
            "type": "null",
            "title": "Current Cvm"
          },
          "cvms": {
            "type": "null",
            "title": "Cvms"
          },
          "cvm_count": {
            "type": "null",
            "title": "Cvm Count"
          }
        },
        "type": "object",
        "required": [
          "app_id"
        ],
        "title": "DstackAppMinimalResponse"
      },
      "DstackAppPreview": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "cvms_count": {
            "type": "integer",
            "title": "Cvms Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "app_id",
          "cvms_count",
          "created_at"
        ],
        "title": "DstackAppPreview",
        "description": "Dstack app information for team preview."
      },
      "EmailTokenVerificationRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "EmailTokenVerificationRequest"
      },
      "EmailVerificationPayload": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "title": "EmailVerificationPayload",
        "description": "Request payload for email verification"
      },
      "EventLog": {
        "properties": {
          "imr": {
            "type": "integer",
            "title": "Imr"
          },
          "event_type": {
            "type": "integer",
            "title": "Event Type"
          },
          "digest": {
            "type": "string",
            "title": "Digest"
          },
          "event": {
            "type": "string",
            "title": "Event"
          },
          "event_payload": {
            "type": "string",
            "title": "Event Payload"
          }
        },
        "type": "object",
        "required": [
          "imr",
          "event_type",
          "digest",
          "event",
          "event_payload"
        ],
        "title": "EventLog"
      },
      "ExtendedContainer": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Names"
          },
          "image": {
            "type": "string",
            "title": "Image"
          },
          "image_id": {
            "type": "string",
            "title": "Image Id"
          },
          "command": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Command"
          },
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "state": {
            "type": "string",
            "title": "State"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "log_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Log Endpoint"
          }
        },
        "type": "object",
        "required": [
          "id",
          "names",
          "image",
          "image_id",
          "created",
          "state",
          "status"
        ],
        "title": "ExtendedContainer",
        "description": "Extended Container with the public log endpoint if any."
      },
      "ExtendedCreditTransaction": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "has_paid": {
            "type": "boolean",
            "title": "Has Paid"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserSchema"
              },
              {
                "type": "null"
              }
            ],
            "description": "User who owns the credit account"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name",
            "description": "Team name if team-owned credit"
          },
          "internal_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Internal Note",
            "description": "Internal admin note"
          },
          "created_by_user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By User Id",
            "description": "Admin who created transaction"
          },
          "created_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Username",
            "description": "Admin username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "amount",
          "type",
          "has_paid",
          "created_at"
        ],
        "title": "ExtendedCreditTransaction",
        "description": "Credit transaction with associated user and team data."
      },
      "ExternalSettlementRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Payment amount (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for settlement (required for audit)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional custom description (defaults to 'External payment settlement')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "ExternalSettlementRequest",
        "description": "Request model for external payment settlement."
      },
      "ExternalSettlementResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "settlement_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^crt_.+",
                "format": "hashid",
                "title": "HashedId[credit_transactions]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "crt_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settlement Transaction Id"
          },
          "credit_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^crt_.+",
                "format": "hashid",
                "title": "HashedId[credit_transactions]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "crt_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Credit Transaction Id"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "settlement_amount": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settlement Amount"
          },
          "credited_amount": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Credited Amount"
          },
          "previous_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "New Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "previous_outstanding",
          "new_outstanding"
        ],
        "title": "ExternalSettlementResponse",
        "description": "Response model for external payment settlement."
      },
      "FamilyGroup": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Family name"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/InstanceTypePublic"
            },
            "type": "array",
            "title": "Items",
            "description": "Instance types in family"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Count of types in family"
          }
        },
        "type": "object",
        "required": [
          "name",
          "items",
          "total"
        ],
        "title": "FamilyGroup",
        "description": "Instance types grouped by family."
      },
      "FamilyInstanceTypesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InstanceTypePublic"
            },
            "type": "array",
            "title": "Items",
            "description": "Instance types"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total count"
          },
          "family": {
            "type": "string",
            "title": "Family",
            "description": "Family name"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "family"
        ],
        "title": "FamilyInstanceTypesResponse",
        "description": "Instance types for one family."
      },
      "FeatureFlag": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Flag identifier (e.g., 'can_create_cvm')"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether the feature is enabled",
            "default": true
          },
          "options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Options",
            "description": "Feature-specific options (e.g., payment providers)"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Why disabled, if applicable"
          },
          "action_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Text",
            "description": "Button label when action needed"
          },
          "action_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Url",
            "description": "URL for action button"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "FeatureFlag",
        "description": "Feature flag with optional UI hints."
      },
      "FilterOptionsResponse": {
        "properties": {
          "statuses": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Statuses",
            "description": "Distinct CVM status values"
          },
          "image_versions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Image Versions",
            "description": "Distinct OS image names"
          },
          "instance_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Instance Types",
            "description": "Distinct instance type identifiers"
          },
          "kms_slugs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Slugs",
            "description": "Distinct KMS slug values"
          },
          "kms_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Types",
            "description": "Distinct KMS type values"
          },
          "regions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Regions",
            "description": "Distinct region identifiers"
          },
          "nodes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Nodes",
            "description": "Distinct node names (union of teepod and node names)"
          }
        },
        "type": "object",
        "required": [
          "statuses",
          "image_versions",
          "instance_types",
          "kms_slugs",
          "kms_types",
          "regions",
          "nodes"
        ],
        "title": "FilterOptionsResponse",
        "description": "Available filter values for app list queries."
      },
      "FinalizeBatchItemRequest": {
        "properties": {
          "invoice_id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "invoice_type": {
            "type": "string",
            "enum": [
              "local",
              "stripe"
            ],
            "title": "Invoice Type"
          },
          "send_email": {
            "type": "boolean",
            "title": "Send Email",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "invoice_id",
          "invoice_type"
        ],
        "title": "FinalizeBatchItemRequest"
      },
      "FinalizeBatchItemResult": {
        "properties": {
          "invoice_id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "ok": {
            "type": "boolean",
            "title": "Ok"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "invoice_id",
          "ok"
        ],
        "title": "FinalizeBatchItemResult"
      },
      "FinalizeBatchRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FinalizeBatchItemRequest"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "FinalizeBatchRequest"
      },
      "FinalizeBatchResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "succeeded": {
            "type": "integer",
            "title": "Succeeded"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/FinalizeBatchItemResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "total",
          "succeeded",
          "failed",
          "results"
        ],
        "title": "FinalizeBatchResponse"
      },
      "FinalizeInvoiceRequest": {
        "properties": {
          "send_email": {
            "type": "boolean",
            "title": "Send Email",
            "default": true
          },
          "invoice_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "local",
                  "stripe"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Type",
            "description": "Optional override for draft invoice channel before finalize"
          }
        },
        "type": "object",
        "title": "FinalizeInvoiceRequest",
        "description": "Request for finalize invoice operation."
      },
      "FinalizeInvoiceResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "invoice_id": {
            "type": "string",
            "format": "hashid",
            "title": "Invoice Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "amount_due": {
            "type": "string",
            "format": "decimal",
            "title": "Amount Due",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "item_count": {
            "type": "integer",
            "title": "Item Count"
          },
          "email_sent": {
            "type": "boolean",
            "title": "Email Sent",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "success",
          "invoice_id",
          "status",
          "amount_due",
          "item_count"
        ],
        "title": "FinalizeInvoiceResponse",
        "description": "Response for finalize invoice operation."
      },
      "FirewallStatusResponse": {
        "properties": {
          "available": {
            "type": "boolean",
            "title": "Available",
            "description": "Whether firewall/port-mapping is available"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Why it is unavailable"
          }
        },
        "type": "object",
        "required": [
          "available"
        ],
        "title": "FirewallStatusResponse",
        "description": "Firewall availability for the node hosting a CVM."
      },
      "GithubProfileImportRequest": {
        "properties": {
          "github_username": {
            "type": "string",
            "maxLength": 39,
            "minLength": 1,
            "title": "Github Username",
            "description": "GitHub username to import SSH keys from"
          }
        },
        "type": "object",
        "required": [
          "github_username"
        ],
        "title": "GithubProfileImportRequest",
        "description": "Request model for importing SSH keys from a GitHub profile."
      },
      "GithubProfileImportResponse": {
        "properties": {
          "github_username": {
            "type": "string",
            "title": "Github Username",
            "description": "GitHub username that was imported"
          },
          "keys_added": {
            "type": "integer",
            "title": "Keys Added",
            "description": "New keys added"
          },
          "keys_skipped": {
            "type": "integer",
            "title": "Keys Skipped",
            "description": "Keys skipped (already exist by fingerprint)"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors",
            "description": "Per-key errors encountered"
          }
        },
        "type": "object",
        "required": [
          "github_username",
          "keys_added",
          "keys_skipped"
        ],
        "title": "GithubProfileImportResponse",
        "description": "Result of importing SSH keys from a GitHub profile."
      },
      "GithubSyncResponse": {
        "properties": {
          "synced_count": {
            "type": "integer",
            "title": "Synced Count",
            "description": "Total keys synced from GitHub"
          },
          "keys_added": {
            "type": "integer",
            "title": "Keys Added",
            "description": "New keys added"
          },
          "keys_updated": {
            "type": "integer",
            "title": "Keys Updated",
            "description": "Existing keys updated"
          },
          "keys_removed": {
            "type": "integer",
            "title": "Keys Removed",
            "description": "Stale keys removed"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors",
            "description": "Sync errors encountered"
          }
        },
        "type": "object",
        "required": [
          "synced_count",
          "keys_added",
          "keys_updated",
          "keys_removed"
        ],
        "title": "GithubSyncResponse",
        "description": "Result of GitHub SSH key sync operation."
      },
      "GpuAllocationStatus": {
        "type": "string",
        "enum": [
          "available",
          "reserved",
          "allocated"
        ],
        "title": "GpuAllocationStatus"
      },
      "GpuAllocationStatusOut": {
        "properties": {
          "inventory": {
            "$ref": "#/components/schemas/GpuInventoryStateOut",
            "description": "Inventory state"
          },
          "device": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuDeviceStateOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Device state"
          },
          "sync_status": {
            "type": "string",
            "title": "Sync Status",
            "description": "Sync status"
          },
          "mismatch_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mismatch Reason",
            "description": "Mismatch reason"
          }
        },
        "type": "object",
        "required": [
          "inventory",
          "sync_status"
        ],
        "title": "GpuAllocationStatusOut",
        "description": "Combined inventory and device state."
      },
      "GpuAvailability": {
        "properties": {
          "has_reserved_gpus": {
            "type": "boolean",
            "title": "Has Reserved Gpus",
            "description": "Whether team has reserved GPU access",
            "default": false
          },
          "reserved_gpu_count": {
            "type": "integer",
            "title": "Reserved Gpu Count",
            "description": "Number of reserved GPUs available to use",
            "default": 0
          },
          "has_public_gpus": {
            "type": "boolean",
            "title": "Has Public Gpus",
            "description": "Whether there are public GPUs available",
            "default": false
          },
          "public_gpu_count": {
            "type": "integer",
            "title": "Public Gpu Count",
            "description": "Number of public GPUs available",
            "default": 0
          }
        },
        "type": "object",
        "title": "GpuAvailability",
        "description": "GPU availability information for the current team"
      },
      "GpuAvailabilityCheckRequest": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Workspace database ID"
          },
          "instance_type": {
            "type": "string",
            "title": "Instance Type",
            "description": "GPU instance type ID (e.g., 'gpu.h100')"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region",
            "description": "Region filter"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "instance_type"
        ],
        "title": "GpuAvailabilityCheckRequest",
        "description": "Request to check GPU availability for a workspace."
      },
      "GpuAvailabilityCheckResponse": {
        "properties": {
          "available": {
            "type": "boolean",
            "title": "Available",
            "description": "Whether GPU resources are available"
          },
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Workspace database ID"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name",
            "description": "Workspace name"
          },
          "instance_type": {
            "type": "string",
            "title": "Instance Type",
            "description": "Requested instance type"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Reason if unavailable"
          },
          "error_details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Details",
            "description": "Resource requirements"
          },
          "matched_resource": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MatchedResourceInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched resource if available"
          }
        },
        "type": "object",
        "required": [
          "available",
          "team_id",
          "instance_type"
        ],
        "title": "GpuAvailabilityCheckResponse",
        "description": "GPU availability check result."
      },
      "GpuConfig": {
        "properties": {
          "gpus": {
            "items": {
              "$ref": "#/components/schemas/GpuSpec"
            },
            "type": "array",
            "title": "Gpus"
          },
          "attach_mode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "listed",
                  "all"
                ]
              },
              {
                "type": "string"
              }
            ],
            "title": "Attach Mode",
            "default": "listed"
          }
        },
        "type": "object",
        "required": [
          "gpus"
        ],
        "title": "GpuConfig"
      },
      "GpuCurrentAllocation": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id",
            "description": "Allocated CVM ID"
          },
          "cvm_vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Vm Uuid",
            "description": "CVM UUID"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Project ID"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name",
            "description": "Project name"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id",
            "description": "Hashed team ID"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name",
            "description": "Team name"
          }
        },
        "type": "object",
        "required": [
          "cvm_id"
        ],
        "title": "GpuCurrentAllocation",
        "description": "Current CVM allocation for GPU."
      },
      "GpuDeviceState": {
        "properties": {
          "in_use": {
            "type": "boolean",
            "title": "In Use",
            "description": "Device in use",
            "default": false
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "VM using this device"
          },
          "power_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Power State",
            "description": "Power state (D0, D3)"
          },
          "runtime_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime Status",
            "description": "Runtime status"
          },
          "driver": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Driver",
            "description": "Driver (vfio-pci, nvidia)"
          },
          "vfio_group": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vfio Group",
            "description": "VFIO group number"
          },
          "vfio_occupied": {
            "type": "boolean",
            "title": "Vfio Occupied",
            "description": "VFIO group occupied",
            "default": false
          },
          "vfio_pids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Vfio Pids",
            "description": "PIDs using VFIO"
          },
          "cc_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Mode",
            "description": "Confidential computing mode"
          },
          "ppcie_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppcie Mode",
            "description": "PPCIe mode"
          }
        },
        "type": "object",
        "title": "GpuDeviceState",
        "description": "Real-time device state from Teescope."
      },
      "GpuDeviceStateOut": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Device name"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "VM UUID using device"
          },
          "pid": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pid",
            "description": "Process ID"
          },
          "uptime": {
            "type": "integer",
            "title": "Uptime",
            "description": "Uptime in seconds",
            "default": 0
          },
          "in_use": {
            "type": "boolean",
            "title": "In Use",
            "description": "Device in use",
            "default": false
          },
          "power_state": {
            "type": "string",
            "title": "Power State",
            "description": "Power state",
            "default": "unknown"
          },
          "runtime_status": {
            "type": "string",
            "title": "Runtime Status",
            "description": "Runtime status",
            "default": "unknown"
          },
          "driver": {
            "type": "string",
            "title": "Driver",
            "description": "Driver name",
            "default": "unknown"
          },
          "vfio_group": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vfio Group",
            "description": "VFIO group"
          },
          "vfio_occupied": {
            "type": "boolean",
            "title": "Vfio Occupied",
            "description": "VFIO occupied",
            "default": false
          },
          "vfio_pids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Vfio Pids",
            "description": "VFIO PIDs"
          },
          "cc_mode": {
            "type": "string",
            "title": "Cc Mode",
            "description": "CC mode",
            "default": "unknown"
          },
          "ppcie_mode": {
            "type": "string",
            "title": "Ppcie Mode",
            "description": "PPCIe mode",
            "default": "unknown"
          }
        },
        "type": "object",
        "required": [
          "slot",
          "name"
        ],
        "title": "GpuDeviceStateOut",
        "description": "GPU device state from Teescope."
      },
      "GpuIdsRequest": {
        "properties": {
          "gpu_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "minItems": 1,
            "title": "Gpu Ids",
            "description": "GPU IDs to query"
          }
        },
        "type": "object",
        "required": [
          "gpu_ids"
        ],
        "title": "GpuIdsRequest",
        "description": "Request for GPU IDs."
      },
      "GpuInventoryStateOut": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id",
            "description": "GPU ID"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Teepod ID"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id",
            "description": "Node ID"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "description": "Product ID"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot"
          },
          "allocation_status": {
            "$ref": "#/components/schemas/GpuAllocationStatus",
            "description": "Status"
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "description": "Version"
          },
          "cvm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Id",
            "description": "Allocated CVM ID"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "Allocated VM UUID"
          },
          "allocated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allocated At",
            "description": "Allocation timestamp"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "teepod_id",
          "node_id",
          "product_id",
          "slot",
          "allocation_status",
          "version"
        ],
        "title": "GpuInventoryStateOut",
        "description": "GPU inventory state from database."
      },
      "GpuItem": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "slot": {
            "type": "string",
            "title": "Slot"
          },
          "allocation_status": {
            "type": "string",
            "title": "Allocation Status"
          },
          "added_at": {
            "type": "string",
            "format": "date-time",
            "title": "Added At"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "teepod_id",
          "teepod_name",
          "node_id",
          "node_name",
          "product_id",
          "slot",
          "allocation_status",
          "added_at"
        ],
        "title": "GpuItem",
        "description": "GPU information for workspace GPUs list."
      },
      "GpuNodeInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Node name"
          },
          "cpu_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Model",
            "description": "CPU model"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "GpuNodeInfo",
        "description": "Node context for GPU."
      },
      "GpuRentalOrderCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^gord_.+",
            "format": "hashid",
            "title": "HashedId[gpu_rental_orders]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "gord_0123abcd"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/GpuRentalOrderStatus"
          },
          "deployment_name": {
            "type": "string",
            "title": "Deployment Name"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "deployment_name",
          "created_at"
        ],
        "title": "GpuRentalOrderCreateResponse",
        "description": "Response payload for GPU rental order creation (minimal info)."
      },
      "GpuRentalOrderHistoryItem": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^gord_.+",
            "format": "hashid",
            "title": "HashedId[gpu_rental_orders]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "gord_0123abcd"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/GpuRentalOrderStatus"
          },
          "sku": {
            "$ref": "#/components/schemas/GpuSkuHistoryResponse"
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity"
          },
          "agreed_hourly_rate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreed Hourly Rate"
          },
          "total_spent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Spent"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "sku",
          "quantity",
          "created_at"
        ],
        "title": "GpuRentalOrderHistoryItem",
        "description": "User-facing order history item. Does not expose admin-only decouple metadata."
      },
      "GpuRentalOrderHistoryResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GpuRentalOrderHistoryItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "GpuRentalOrderHistoryResponse",
        "description": "Paginated order history response."
      },
      "GpuRentalOrderItem": {
        "properties": {
          "id": {
            "type": "string",
            "format": "hashid",
            "title": "Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "user_id": {
            "type": "string",
            "format": "hashid",
            "title": "User Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "sku_id": {
            "type": "integer",
            "title": "Sku Id"
          },
          "sku_price_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku Price Id"
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity"
          },
          "status": {
            "$ref": "#/components/schemas/GpuRentalOrderStatus"
          },
          "requested_start_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested Start Time"
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days"
          },
          "agreed_hourly_rate": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreed Hourly Rate"
          },
          "deployment_name": {
            "type": "string",
            "title": "Deployment Name"
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          },
          "decoupled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decoupled At"
          },
          "hourly_billing_start_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hourly Billing Start Time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "user_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Username"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          },
          "sku_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku Code"
          },
          "sku_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku Display Name"
          },
          "sku_min_rental_duration_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku Min Rental Duration Hours"
          },
          "price_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuSkuPricingPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "price_hourly_rate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Hourly Rate"
          },
          "price_commitment_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Commitment Days"
          },
          "allocation_count": {
            "type": "integer",
            "title": "Allocation Count",
            "default": 0
          },
          "allocations": {
            "items": {
              "$ref": "#/components/schemas/AllocationDetail"
            },
            "type": "array",
            "title": "Allocations"
          },
          "decouple_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decouple Reason"
          },
          "decouple_internal_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decouple Internal Note"
          },
          "decoupled_by_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "hashid",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Decoupled By User Id"
          },
          "decoupled_by_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decoupled By Email"
          },
          "decoupled_by_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decoupled By Username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "team_id",
          "sku_id",
          "sku_price_id",
          "quantity",
          "status",
          "requested_start_time",
          "commitment_days",
          "agreed_hourly_rate",
          "deployment_name",
          "docker_compose_file",
          "activated_at",
          "completed_at",
          "cancelled_at",
          "decoupled_at",
          "hourly_billing_start_time",
          "created_at",
          "updated_at"
        ],
        "title": "GpuRentalOrderItem",
        "description": "GPU rental order with related metadata."
      },
      "GpuRentalOrderListResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^gord_.+",
            "format": "hashid",
            "title": "HashedId[gpu_rental_orders]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "gord_0123abcd"
            ]
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "status": {
            "$ref": "#/components/schemas/GpuRentalOrderStatus"
          },
          "agreed_hourly_rate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agreed Hourly Rate"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "os_image_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Name"
          },
          "sku": {
            "$ref": "#/components/schemas/GpuSkuResponse"
          },
          "cvm_allocations": {
            "items": {
              "$ref": "#/components/schemas/CvmAllocationResponse"
            },
            "type": "array",
            "title": "Cvm Allocations"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "team_id",
          "status",
          "agreed_hourly_rate",
          "created_at",
          "sku",
          "cvm_allocations"
        ],
        "title": "GpuRentalOrderListResponse",
        "description": "Response payload for GPU rental order list."
      },
      "GpuRentalOrderStatus": {
        "type": "string",
        "enum": [
          "pending",
          "provisioning",
          "active",
          "completed",
          "cancelled"
        ],
        "title": "GpuRentalOrderStatus",
        "description": "Lifecycle states for GPU rental orders."
      },
      "GpuRentalOrderSummaryOut": {
        "properties": {
          "order_id": {
            "type": "string",
            "format": "hashid",
            "title": "Order Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "pricing_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuSkuPricingPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days"
          },
          "financial": {
            "$ref": "#/components/schemas/OrderFinancialSummaryOut"
          },
          "minimum_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrderMinimumPeriodOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "runway": {
            "$ref": "#/components/schemas/OrderRunwayOut"
          },
          "related_transactions": {
            "items": {
              "$ref": "#/components/schemas/RelatedTransactionOut"
            },
            "type": "array",
            "title": "Related Transactions"
          }
        },
        "type": "object",
        "required": [
          "order_id",
          "pricing_plan",
          "commitment_days",
          "financial",
          "minimum_period",
          "runway"
        ],
        "title": "GpuRentalOrderSummaryOut"
      },
      "GpuRentalProvisionRequest": {
        "properties": {
          "sku_id": {
            "type": "integer",
            "title": "Sku Id",
            "description": "ID of the GPU SKU to rent"
          },
          "docker_compose_file": {
            "type": "string",
            "minLength": 1,
            "title": "Docker Compose File",
            "description": "Docker Compose configuration"
          },
          "deployment_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Deployment Name",
            "description": "Name for the deployment"
          },
          "prefer_dev": {
            "type": "boolean",
            "title": "Prefer Dev",
            "description": "Prefer development OS images when matching resources",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "sku_id",
          "docker_compose_file",
          "deployment_name"
        ],
        "title": "GpuRentalProvisionRequest",
        "description": "Request for GPU rental provisioning (before encryption)."
      },
      "GpuRentalProvisionResponse": {
        "properties": {
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "App ID generated from compose"
          },
          "app_id_salt": {
            "type": "string",
            "title": "App Id Salt",
            "description": "Salt used for app ID generation"
          },
          "app_env_encrypt_pubkey": {
            "type": "string",
            "title": "App Env Encrypt Pubkey",
            "description": "Encryption public key from teepod KMS"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash",
            "description": "Hash of the compose file"
          },
          "os_image_name": {
            "type": "string",
            "title": "Os Image Name",
            "description": "Selected OS image for the deployment"
          }
        },
        "type": "object",
        "required": [
          "app_id",
          "app_id_salt",
          "app_env_encrypt_pubkey",
          "compose_hash",
          "os_image_name"
        ],
        "title": "GpuRentalProvisionResponse",
        "description": "Response with encryption public key and provisioning details."
      },
      "GpuReservedTeamInfo": {
        "properties": {
          "team_id": {
            "type": "string",
            "title": "Team Id",
            "description": "Hashed team ID (wks_xxx)"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name",
            "description": "Team name"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name"
        ],
        "title": "GpuReservedTeamInfo",
        "description": "Team with reserved access to GPU."
      },
      "GpuSkuAllowedTeamCreate": {
        "properties": {
          "team_id": {
            "type": "string",
            "title": "Team Id",
            "description": "Team hashed ID (wks_xxx) to grant visibility to"
          }
        },
        "type": "object",
        "required": [
          "team_id"
        ],
        "title": "GpuSkuAllowedTeamCreate",
        "description": "Input for adding a team to a GPU SKU visibility allowlist."
      },
      "GpuSkuAllowedTeamsOut": {
        "properties": {
          "sku_id": {
            "type": "integer",
            "title": "Sku Id",
            "description": "SKU ID"
          },
          "allowed_team_ids": {
            "items": {
              "type": "string",
              "pattern": "^wks_.+",
              "format": "hashid",
              "title": "HashedId[teams]",
              "description": "A hashed identifier that maps to an internal database ID",
              "examples": [
                "wks_0123abcd"
              ]
            },
            "type": "array",
            "title": "Allowed Team Ids",
            "description": "Team IDs with access; empty list means the SKU is public"
          }
        },
        "type": "object",
        "required": [
          "sku_id"
        ],
        "title": "GpuSkuAllowedTeamsOut",
        "description": "Allowlist snapshot for a GPU SKU."
      },
      "GpuSkuCreate": {
        "properties": {
          "sku_code": {
            "type": "string",
            "title": "Sku Code",
            "description": "Unique business identifier for the SKU"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "Customer facing name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional descriptive text"
          },
          "region": {
            "type": "string",
            "title": "Region",
            "description": "Region where the SKU is available"
          },
          "gpu_model": {
            "type": "string",
            "title": "Gpu Model",
            "description": "GPU model e.g. H200"
          },
          "gpu_count": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Gpu Count",
            "description": "Number of GPUs in this SKU"
          },
          "provisioning_time_hours": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Provisioning Time Hours",
            "description": "Lead time before the SKU is ready"
          },
          "min_rental_duration_hours": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Min Rental Duration Hours",
            "description": "Minimum rental duration in hours"
          },
          "stock_quantity": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Stock Quantity",
            "description": "Available inventory quantity",
            "default": 0
          },
          "restocking_time_hours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Restocking Time Hours",
            "description": "Time needed for restocking in hours"
          },
          "ram_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Ram Gb"
          },
          "vram_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Vram Gb"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "disk_size_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size Gb"
          },
          "extra_specs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Specs"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type ID for CVM provisioning"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "sku_code",
          "display_name",
          "region",
          "gpu_model",
          "gpu_count",
          "provisioning_time_hours",
          "min_rental_duration_hours"
        ],
        "title": "GpuSkuCreate"
      },
      "GpuSkuHistoryResponse": {
        "properties": {
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count"
          },
          "gpu_model": {
            "type": "string",
            "title": "Gpu Model"
          }
        },
        "type": "object",
        "required": [
          "display_name",
          "gpu_count",
          "gpu_model"
        ],
        "title": "GpuSkuHistoryResponse",
        "description": "Minimal SKU info for order history."
      },
      "GpuSkuOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "SKU ID"
          },
          "sku_code": {
            "type": "string",
            "title": "Sku Code",
            "description": "Unique SKU identifier"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "Customer-facing name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "SKU description"
          },
          "region": {
            "type": "string",
            "title": "Region",
            "description": "Deployment region"
          },
          "gpu_model": {
            "type": "string",
            "title": "Gpu Model",
            "description": "GPU model (e.g., H200)"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count",
            "description": "Number of GPUs"
          },
          "provisioning_time_hours": {
            "type": "integer",
            "title": "Provisioning Time Hours",
            "description": "Lead time before ready"
          },
          "min_rental_duration_hours": {
            "type": "integer",
            "title": "Min Rental Duration Hours",
            "description": "Minimum rental period"
          },
          "stock_quantity": {
            "type": "integer",
            "title": "Stock Quantity",
            "description": "Available inventory"
          },
          "restocking_time_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restocking Time Hours",
            "description": "Restocking lead time"
          },
          "ram_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ram Gb",
            "description": "System RAM in GB"
          },
          "vram_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vram Gb",
            "description": "GPU VRAM in GB"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu",
            "description": "vCPU count"
          },
          "disk_size_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size Gb",
            "description": "Disk size in GB"
          },
          "extra_specs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Specs",
            "description": "Additional specifications"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type ID for CVM provisioning"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether SKU is orderable"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "prices": {
            "items": {
              "$ref": "#/components/schemas/GpuSkuPriceOut"
            },
            "type": "array",
            "title": "Prices",
            "description": "Pricing tiers"
          },
          "allowed_team_ids": {
            "items": {
              "type": "string",
              "pattern": "^wks_.+",
              "format": "hashid",
              "title": "HashedId[teams]",
              "description": "A hashed identifier that maps to an internal database ID",
              "examples": [
                "wks_0123abcd"
              ]
            },
            "type": "array",
            "title": "Allowed Team Ids",
            "description": "Team allowlist. Empty list means the SKU is public; any entry restricts visibility to the listed teams."
          }
        },
        "type": "object",
        "required": [
          "id",
          "sku_code",
          "display_name",
          "region",
          "gpu_model",
          "gpu_count",
          "provisioning_time_hours",
          "min_rental_duration_hours",
          "stock_quantity",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "GpuSkuOut",
        "description": "GPU SKU with hardware specs and pricing tiers."
      },
      "GpuSkuPriceCreate": {
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/GpuSkuPricingPlan",
            "description": "Pricing plan type"
          },
          "hourly_rate": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Hourly Rate",
            "description": "Hourly rate (must be positive)"
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days",
            "description": "Required commitment in days"
          }
        },
        "type": "object",
        "required": [
          "plan",
          "hourly_rate"
        ],
        "title": "GpuSkuPriceCreate",
        "description": "Input for creating a GPU SKU price tier."
      },
      "GpuSkuPriceOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Price record ID"
          },
          "plan": {
            "$ref": "#/components/schemas/GpuSkuPricingPlan",
            "description": "Pricing plan type"
          },
          "hourly_rate": {
            "type": "string",
            "title": "Hourly Rate",
            "description": "Hourly rate as decimal string"
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days",
            "description": "Required commitment period in days"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "plan",
          "hourly_rate",
          "created_at",
          "updated_at"
        ],
        "title": "GpuSkuPriceOut",
        "description": "GPU SKU pricing tier for a specific plan."
      },
      "GpuSkuPriceResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "plan": {
            "$ref": "#/components/schemas/GpuSkuPricingPlan"
          },
          "hourly_rate": {
            "type": "string",
            "title": "Hourly Rate"
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days"
          }
        },
        "type": "object",
        "required": [
          "id",
          "plan",
          "hourly_rate"
        ],
        "title": "GpuSkuPriceResponse"
      },
      "GpuSkuPriceUpdate": {
        "properties": {
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuSkuPricingPlan"
              },
              {
                "type": "null"
              }
            ],
            "description": "Update pricing plan type"
          },
          "hourly_rate": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hourly Rate",
            "description": "Update hourly rate"
          },
          "commitment_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Commitment Days",
            "description": "Update commitment period"
          }
        },
        "type": "object",
        "title": "GpuSkuPriceUpdate",
        "description": "Input for updating a GPU SKU price tier."
      },
      "GpuSkuPricingPlan": {
        "type": "string",
        "enum": [
          "on_demand",
          "commitment"
        ],
        "title": "GpuSkuPricingPlan",
        "description": "Pricing plan for GPU SKUs."
      },
      "GpuSkuResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "sku_code": {
            "type": "string",
            "title": "Sku Code"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "gpu_model": {
            "type": "string",
            "title": "Gpu Model"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count"
          },
          "region": {
            "type": "string",
            "title": "Region"
          },
          "provisioning_time_hours": {
            "type": "integer",
            "title": "Provisioning Time Hours"
          },
          "min_rental_duration_hours": {
            "type": "integer",
            "title": "Min Rental Duration Hours"
          },
          "stock_quantity": {
            "type": "integer",
            "title": "Stock Quantity"
          },
          "restocking_time_hours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restocking Time Hours"
          },
          "ram_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ram Gb"
          },
          "vram_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vram Gb"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "disk_size_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size Gb"
          },
          "extra_specs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Specs"
          },
          "prices": {
            "items": {
              "$ref": "#/components/schemas/GpuSkuPriceResponse"
            },
            "type": "array",
            "title": "Prices"
          }
        },
        "type": "object",
        "required": [
          "id",
          "sku_code",
          "display_name",
          "gpu_model",
          "gpu_count",
          "region",
          "provisioning_time_hours",
          "min_rental_duration_hours",
          "stock_quantity",
          "prices"
        ],
        "title": "GpuSkuResponse"
      },
      "GpuSkuUpdate": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "gpu_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Model"
          },
          "gpu_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Count"
          },
          "provisioning_time_hours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Provisioning Time Hours"
          },
          "min_rental_duration_hours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Rental Duration Hours"
          },
          "stock_quantity": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Stock Quantity"
          },
          "restocking_time_hours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Restocking Time Hours"
          },
          "ram_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Ram Gb"
          },
          "vram_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Vram Gb"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "disk_size_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size Gb"
          },
          "extra_specs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Specs"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "GpuSkuUpdate"
      },
      "GpuSpec": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          }
        },
        "type": "object",
        "required": [
          "slot"
        ],
        "title": "GpuSpec"
      },
      "GpuStatistics": {
        "properties": {
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "description": "Total GPU count"
          },
          "available_count": {
            "type": "integer",
            "title": "Available Count",
            "description": "Available GPUs"
          },
          "reserved_count": {
            "type": "integer",
            "title": "Reserved Count",
            "description": "Reserved GPUs"
          },
          "allocated_count": {
            "type": "integer",
            "title": "Allocated Count",
            "description": "Allocated GPUs"
          },
          "by_product_id": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "By Product Id",
            "description": "Count by product"
          },
          "by_node": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "By Node",
            "description": "Count by node"
          },
          "by_teepod": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "By Teepod",
            "description": "Count by teepod"
          }
        },
        "type": "object",
        "required": [
          "total_count",
          "available_count",
          "reserved_count",
          "allocated_count",
          "by_product_id"
        ],
        "title": "GpuStatistics",
        "description": "GPU inventory statistics."
      },
      "GpuSyncStatus": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "matched / mismatch / no_device_data"
          },
          "mismatch_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mismatch Reason",
            "description": "Reason: allocated_but_idle / available_but_in_use / wrong_vm"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "GpuSyncStatus",
        "description": "Sync status between inventory and device."
      },
      "GpuTeepodInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Teepod name"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint",
            "description": "Teepod API endpoint"
          },
          "status": {
            "$ref": "#/components/schemas/TeepodStatus",
            "description": "Teepod status"
          }
        },
        "type": "object",
        "required": [
          "name",
          "status"
        ],
        "title": "GpuTeepodInfo",
        "description": "Teepod context for GPU."
      },
      "GuestAgentInfo": {
        "properties": {
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "mr_aggregated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mr Aggregated"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "mr_key_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mr Key Provider"
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash"
          }
        },
        "type": "object",
        "required": [
          "device_id"
        ],
        "title": "GuestAgentInfo"
      },
      "GuestEvent": {
        "properties": {
          "event": {
            "type": "string",
            "title": "Event"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "timestamp": {
            "type": "integer",
            "title": "Timestamp",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "event",
          "body"
        ],
        "title": "GuestEvent",
        "description": "Structured lifecycle event emitted by the guest or runtime. Since VMM v0.5.7."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HostedCvm": {
        "properties": {
          "hosted": {
            "$ref": "#/components/schemas/VmInfo"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "managed_user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ManagedUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "node": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmNode"
              },
              {
                "type": "null"
              }
            ]
          },
          "listed": {
            "type": "boolean",
            "title": "Listed",
            "default": false
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress",
            "default": false
          },
          "dapp_dashboard_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dapp Dashboard Url"
          },
          "syslog_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Syslog Endpoint"
          },
          "allow_upgrade": {
            "type": "boolean",
            "title": "Allow Upgrade",
            "default": false
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prj_.+",
                "format": "hashid",
                "title": "HashedId[projects]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "prj_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "project_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Type"
          },
          "billing_period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Period"
          },
          "kms_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KMSInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Address"
          },
          "deployer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployer Address"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "memory": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory"
          },
          "disk_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size"
          },
          "gateway_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain"
          },
          "public_urls": {
            "items": {
              "$ref": "#/components/schemas/CvmNetworkUrls"
            },
            "type": "array",
            "title": "Public Urls"
          }
        },
        "type": "object",
        "required": [
          "hosted",
          "name",
          "status",
          "public_urls"
        ],
        "title": "HostedCvm"
      },
      "HourlyBillingResponse": {
        "properties": {
          "hour": {
            "type": "string",
            "title": "Hour",
            "description": "Hour timestamp (YYYY-MM-DD HH:00:00)"
          },
          "total_cost": {
            "type": "number",
            "title": "Total Cost",
            "description": "Total USD cost for the hour"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/BillingRecordDetail"
            },
            "type": "array",
            "title": "Items",
            "description": "Individual metered events"
          }
        },
        "type": "object",
        "required": [
          "hour",
          "total_cost"
        ],
        "title": "HourlyBillingResponse",
        "description": "Hourly billing summary with detailed events."
      },
      "ImportItemsRequest": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source",
            "description": "Data source: cvm_usage (or usage), credit_consumed"
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Start",
            "description": "Override period start (defaults to invoice period)"
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End",
            "description": "Override period end (defaults to invoice period)"
          },
          "replace_existing": {
            "type": "boolean",
            "title": "Replace Existing",
            "description": "Replace existing items from same source",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "source"
        ],
        "title": "ImportItemsRequest",
        "description": "Request to import items from a data source."
      },
      "ImportItemsResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "imported_count": {
            "type": "integer",
            "title": "Imported Count"
          },
          "total_amount": {
            "type": "number",
            "title": "Total Amount"
          },
          "source": {
            "type": "string",
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "success",
          "imported_count",
          "total_amount",
          "source"
        ],
        "title": "ImportItemsResponse",
        "description": "Response for import items operation."
      },
      "InProgressOperation": {
        "properties": {
          "cvm_id": {
            "type": "string",
            "title": "Cvm Id",
            "description": "Hashed CVM ID"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "default": ""
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": ""
          },
          "operation_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Type"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "worker_acked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Acked At"
          },
          "duration_seconds": {
            "type": "integer",
            "title": "Duration Seconds",
            "default": 0
          },
          "memory_mb": {
            "type": "integer",
            "title": "Memory Mb",
            "default": 0
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          }
        },
        "type": "object",
        "required": [
          "cvm_id"
        ],
        "title": "InProgressOperation"
      },
      "InstanceIdRefreshRequest": {
        "properties": {
          "overwrite": {
            "type": "boolean",
            "title": "Overwrite",
            "description": "Overwrite existing instance_id when different",
            "default": false
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "description": "Preview changes without persisting",
            "default": false
          }
        },
        "type": "object",
        "title": "InstanceIdRefreshRequest"
      },
      "InstanceIdRefreshResult": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "identifier": {
            "type": "string",
            "title": "Identifier"
          },
          "status": {
            "type": "string",
            "enum": [
              "updated",
              "unchanged",
              "skipped",
              "conflict",
              "error"
            ],
            "title": "Status"
          },
          "old_instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Old Instance Id"
          },
          "new_instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Instance Id"
          },
          "source": {
            "type": "string",
            "enum": [
              "teepod_state",
              "teepod_info",
              "gateway",
              "none"
            ],
            "title": "Source",
            "default": "none"
          },
          "verified_with_gateway": {
            "type": "boolean",
            "title": "Verified With Gateway",
            "default": false
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "identifier",
          "status"
        ],
        "title": "InstanceIdRefreshResult"
      },
      "InstanceSpendingResponse": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "CVM UUID (36-character string)"
          },
          "total_cost": {
            "type": "number",
            "title": "Total Cost",
            "description": "Total USD cost for the period"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid",
          "total_cost"
        ],
        "title": "InstanceSpendingResponse",
        "description": "Cost breakdown for a single CVM instance."
      },
      "InstanceTypeBreakdown": {
        "properties": {
          "instance_type": {
            "type": "string",
            "title": "Instance Type",
            "description": "Instance type ID"
          },
          "instance_type_name": {
            "type": "string",
            "title": "Instance Type Name",
            "description": "Display name from InstanceType.name"
          },
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Family",
            "description": "Instance type family (cpu, gpu, etc.)"
          },
          "hourly_rate": {
            "type": "string",
            "format": "decimal",
            "title": "Hourly Rate",
            "description": "Effective compute hourly rate (compute_estimated / running_hours). Ensures: hourly_rate × running_hours = compute_estimated",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "cvm_count": {
            "type": "integer",
            "title": "Cvm Count"
          },
          "running_hours": {
            "type": "string",
            "title": "Running Hours"
          },
          "compute_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Compute Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "storage_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Storage Estimated",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "total_estimated": {
            "type": "string",
            "format": "decimal",
            "title": "Total Estimated",
            "description": "Compute + storage",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "percentage": {
            "type": "string",
            "title": "Percentage",
            "description": "Percentage of total cost"
          }
        },
        "type": "object",
        "required": [
          "instance_type",
          "instance_type_name",
          "family",
          "hourly_rate",
          "cvm_count",
          "running_hours",
          "compute_estimated",
          "storage_estimated",
          "total_estimated",
          "percentage"
        ],
        "title": "InstanceTypeBreakdown",
        "description": "Instance type breakdown with compute and storage costs."
      },
      "InstanceTypePublic": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Instance type identifier"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Display name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Type description"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu",
            "description": "Virtual CPU count"
          },
          "memory_mb": {
            "type": "integer",
            "title": "Memory Mb",
            "description": "Memory in megabytes"
          },
          "hourly_rate": {
            "type": "string",
            "title": "Hourly Rate",
            "description": "USD per hour as decimal string"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Whether GPU is required"
          },
          "default_disk_size_gb": {
            "type": "integer",
            "title": "Default Disk Size Gb",
            "description": "Default disk size in GB",
            "default": 20
          },
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Family",
            "description": "Family category (cpu, gpu)"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "vcpu",
          "memory_mb",
          "hourly_rate",
          "requires_gpu"
        ],
        "title": "InstanceTypePublic",
        "description": "Public instance type specification."
      },
      "InstanceTypeResourceItem": {
        "properties": {
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "spec_vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Vcpu"
          },
          "spec_memory_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Memory Mb"
          },
          "spec_gpu_count": {
            "type": "integer",
            "title": "Spec Gpu Count",
            "default": 0
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count"
          },
          "running_count": {
            "type": "integer",
            "title": "Running Count"
          },
          "total_vcpu": {
            "type": "integer",
            "title": "Total Vcpu"
          },
          "running_vcpu": {
            "type": "integer",
            "title": "Running Vcpu"
          },
          "total_memory_mb": {
            "type": "integer",
            "title": "Total Memory Mb"
          },
          "running_memory_mb": {
            "type": "integer",
            "title": "Running Memory Mb"
          },
          "total_disk_gb": {
            "type": "integer",
            "title": "Total Disk Gb"
          },
          "running_disk_gb": {
            "type": "integer",
            "title": "Running Disk Gb"
          }
        },
        "type": "object",
        "required": [
          "instance_type",
          "spec_vcpu",
          "spec_memory_mb",
          "total_count",
          "running_count",
          "total_vcpu",
          "running_vcpu",
          "total_memory_mb",
          "running_memory_mb",
          "total_disk_gb",
          "running_disk_gb"
        ],
        "title": "InstanceTypeResourceItem",
        "description": "Resource usage breakdown by instance type."
      },
      "InstanceTypeResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Instance type ID (e.g., 'tdx.small')"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Display name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Description"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu",
            "description": "vCPU count"
          },
          "memory_mb": {
            "type": "integer",
            "title": "Memory Mb",
            "description": "Memory in MB"
          },
          "hourly_rate": {
            "type": "string",
            "title": "Hourly Rate",
            "description": "Hourly rate in USD"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Requires GPU"
          },
          "requires_gpu_count": {
            "type": "integer",
            "title": "Requires Gpu Count",
            "description": "GPU count",
            "default": 0
          },
          "requires_gpu_cc_mode": {
            "type": "boolean",
            "title": "Requires Gpu Cc Mode",
            "description": "Requires GPU CC mode"
          },
          "extra_specs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Extra Specs",
            "description": "Extended specifications"
          },
          "default_disk_size_gb": {
            "type": "integer",
            "title": "Default Disk Size Gb",
            "description": "Default disk size in GB",
            "default": 20
          },
          "public": {
            "type": "boolean",
            "title": "Public",
            "description": "Publicly visible"
          },
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Family",
            "description": "Family (cpu, gpu)"
          },
          "display_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Order",
            "description": "Sort order"
          },
          "hugepages": {
            "type": "boolean",
            "title": "Hugepages",
            "description": "Enable hugepages",
            "default": false
          },
          "pin_numa": {
            "type": "boolean",
            "title": "Pin Numa",
            "description": "Enable NUMA pinning",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "vcpu",
          "memory_mb",
          "hourly_rate",
          "requires_gpu",
          "requires_gpu_cc_mode",
          "extra_specs",
          "public"
        ],
        "title": "InstanceTypeResponse",
        "description": "Instance type for admin interface."
      },
      "InvitationAcceptResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Success or status message"
          },
          "workspace_slug": {
            "type": "string",
            "title": "Workspace Slug",
            "description": "Workspace URL slug for redirect"
          },
          "workspace_name": {
            "type": "string",
            "title": "Workspace Name",
            "description": "Workspace display name"
          }
        },
        "type": "object",
        "required": [
          "message",
          "workspace_slug",
          "workspace_name"
        ],
        "title": "InvitationAcceptResponse",
        "description": "Response after accepting an invitation."
      },
      "InvitationCreateRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "Email address to invite"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Role for the invited member (ADMIN or MEMBER)"
          }
        },
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "title": "InvitationCreateRequest",
        "description": "Request to create a new invitation."
      },
      "InvitationDetailResponse": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Masked email; null for shareable links"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name",
            "description": "Workspace display name"
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug",
            "description": "Workspace URL slug"
          },
          "inviter_name": {
            "type": "string",
            "title": "Inviter Name",
            "description": "Username of the inviter"
          },
          "inviter_email": {
            "type": "string",
            "title": "Inviter Email",
            "description": "Email of the inviter"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Role to be assigned: ADMIN or MEMBER"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "Invitation expiration timestamp"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current invitation status"
          }
        },
        "type": "object",
        "required": [
          "team_name",
          "inviter_name",
          "inviter_email",
          "role",
          "expires_at",
          "status"
        ],
        "title": "InvitationDetailResponse",
        "description": "Detailed invitation information for public access."
      },
      "InvitationResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Invitation ID"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Invitee email; null for shareable links"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Assigned role: ADMIN or MEMBER"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "PENDING, ACCEPTED, EXPIRED, or REVOKED"
          },
          "token": {
            "type": "string",
            "title": "Token",
            "description": "Unique token for invitation URL"
          },
          "inviter_name": {
            "type": "string",
            "title": "Inviter Name",
            "description": "Username of the inviter"
          },
          "inviter_email": {
            "type": "string",
            "title": "Inviter Email",
            "description": "Email of the inviter"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Invitation creation timestamp"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "Invitation expiration timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "role",
          "status",
          "token",
          "inviter_name",
          "inviter_email",
          "created_at",
          "expires_at"
        ],
        "title": "InvitationResponse",
        "description": "Response model for invitation."
      },
      "InvoiceDetailResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Invoice ID (integer string)"
          },
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Team database ID"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name",
            "description": "Team display name"
          },
          "team_balance": {
            "type": "number",
            "title": "Team Balance",
            "description": "Available credits (balance + granted_balance)"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start",
            "description": "Billing period start date"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End",
            "description": "Billing period end date"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Status: open, paid, uncollectible"
          },
          "amount_due": {
            "type": "number",
            "title": "Amount Due",
            "description": "Total USD amount due"
          },
          "amount_paid": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Paid",
            "description": "USD amount already paid"
          },
          "amount_remaining": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Remaining",
            "description": "USD amount still owed"
          },
          "payment_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method",
            "description": "How invoice was paid"
          },
          "invoice_pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Pdf Url",
            "description": "Download URL for PDF invoice"
          },
          "hosted_invoice_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hosted Invoice Url",
            "description": "Stripe payment page URL"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Invoice creation timestamp"
          },
          "can_pay_with_credits": {
            "type": "boolean",
            "title": "Can Pay With Credits",
            "description": "True if invoice is open and payable"
          }
        },
        "type": "object",
        "required": [
          "id",
          "team_id",
          "team_name",
          "team_balance",
          "period_start",
          "period_end",
          "status",
          "amount_due",
          "created_at",
          "can_pay_with_credits"
        ],
        "title": "InvoiceDetailResponse",
        "description": "Full invoice details with payment options."
      },
      "InvoiceItem": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^usr_.+",
                "format": "hashid",
                "title": "HashedId[users]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "usr_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "credit_id": {
            "type": "integer",
            "title": "Credit Id"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "stripe_invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Invoice Id"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "amount_due": {
            "type": "string",
            "format": "decimal",
            "title": "Amount Due",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "amount_paid": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Paid"
          },
          "amount_remaining": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Remaining"
          },
          "payment_intent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Intent Id"
          },
          "charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Charge Id"
          },
          "invoice_pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Pdf Url"
          },
          "hosted_invoice_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hosted Invoice Url"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "team_id",
          "credit_id",
          "period_start",
          "period_end",
          "status",
          "amount_due",
          "amount_paid",
          "amount_remaining",
          "payment_intent_id",
          "charge_id",
          "invoice_pdf_url",
          "hosted_invoice_url",
          "created_at",
          "updated_at"
        ],
        "title": "InvoiceItem",
        "description": "Invoice item for workspace invoices list."
      },
      "InvoiceItemOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "hashid",
            "title": "Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "invoice_id": {
            "type": "string",
            "format": "hashid",
            "title": "Invoice Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "instance_id": {
            "type": "string",
            "title": "Instance Id"
          },
          "instance_name": {
            "type": "string",
            "title": "Instance Name"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "cost": {
            "type": "string",
            "format": "decimal",
            "title": "Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "record_count": {
            "type": "integer",
            "title": "Record Count"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "is_manual": {
            "type": "boolean",
            "title": "Is Manual"
          },
          "adjusted_cost": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjusted Cost"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": "usage"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "invoice_id",
          "instance_id",
          "instance_name",
          "cost",
          "record_count",
          "description",
          "is_manual",
          "created_at"
        ],
        "title": "InvoiceItemOut",
        "description": "Invoice item output schema."
      },
      "InvoiceItemResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Item ID (integer string)"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "CVM display name"
          },
          "instance_id": {
            "type": "string",
            "title": "Instance Id",
            "description": "CVM UUID (36-character string)"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "GPU type: t4, a6000, h100, etc."
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region",
            "description": "Deployment region"
          },
          "cost": {
            "type": "number",
            "title": "Cost",
            "description": "USD cost for this line item"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "instance_id",
          "cost"
        ],
        "title": "InvoiceItemResponse",
        "description": "Line item on an invoice."
      },
      "InvoiceListItem": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Invoice ID (integer string)"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start",
            "description": "Billing period start date"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End",
            "description": "Billing period end date"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Status: open, paid, uncollectible"
          },
          "amount_due": {
            "type": "number",
            "title": "Amount Due",
            "description": "Total USD amount due"
          },
          "amount_paid": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Paid",
            "description": "USD amount already paid"
          },
          "amount_remaining": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Remaining",
            "description": "USD amount still owed"
          },
          "payment_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Method",
            "description": "How invoice was paid"
          },
          "invoice_pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Pdf Url",
            "description": "Download URL for PDF invoice"
          },
          "hosted_invoice_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hosted Invoice Url",
            "description": "Stripe payment page URL"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Invoice creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "period_start",
          "period_end",
          "status",
          "amount_due",
          "created_at"
        ],
        "title": "InvoiceListItem",
        "description": "Invoice summary for list view."
      },
      "InvoiceListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InvoiceListItem"
            },
            "type": "array",
            "title": "Items",
            "description": "Invoices for this page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching invoices"
          }
        },
        "type": "object",
        "required": [
          "total"
        ],
        "title": "InvoiceListResponse",
        "description": "Paginated invoice list."
      },
      "InvoiceWithRelations": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "credit_id": {
            "type": "integer",
            "title": "Credit Id"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "stripe_invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Invoice Id"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "amount_due": {
            "type": "string",
            "format": "decimal",
            "title": "Amount Due",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "amount_paid": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Paid"
          },
          "amount_remaining": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Remaining"
          },
          "payment_intent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Intent Id"
          },
          "charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Charge Id"
          },
          "charge_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Charge Status"
          },
          "charge_outcome": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Charge Outcome"
          },
          "invoice_pdf_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Pdf Url"
          },
          "hosted_invoice_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hosted Invoice Url"
          },
          "email_sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Sent At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          },
          "user_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Username"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          }
        },
        "type": "object",
        "required": [
          "id",
          "team_id",
          "credit_id",
          "period_start",
          "period_end",
          "status",
          "amount_due",
          "amount_paid",
          "amount_remaining",
          "payment_intent_id",
          "charge_id",
          "invoice_pdf_url",
          "hosted_invoice_url",
          "email_sent_at",
          "created_at",
          "updated_at"
        ],
        "title": "InvoiceWithRelations"
      },
      "IsAllowedRequest": {
        "properties": {
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash",
            "description": "Override compose hash to check"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Override node (resolves device_id)"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Override device_id directly"
          }
        },
        "type": "object",
        "title": "IsAllowedRequest"
      },
      "IsAllowedResponse": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "app_contract_address": {
            "type": "string",
            "title": "App Contract Address"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "compose_hash_allowed": {
            "type": "boolean",
            "title": "Compose Hash Allowed"
          },
          "allow_any_device": {
            "type": "boolean",
            "title": "Allow Any Device"
          },
          "device_id_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id Allowed"
          },
          "is_allowed": {
            "type": "boolean",
            "title": "Is Allowed"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "app_contract_address",
          "compose_hash",
          "device_id",
          "compose_hash_allowed",
          "allow_any_device",
          "is_allowed"
        ],
        "title": "IsAllowedResponse"
      },
      "KMSCreate": {
        "properties": {
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "KMS RPC endpoint URL"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Human-readable identifier (must be unique)"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Associate with physical node"
          },
          "kms_contract_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Id",
            "description": "Associate with KMS contract"
          },
          "kms_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KmsType"
              },
              {
                "type": "null"
              }
            ],
            "description": "KMS type (defaults to phala)"
          },
          "gateway_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Rpc Url",
            "description": "Gateway RPC URL"
          },
          "gateway_admin_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Admin Rpc Url",
            "description": "Gateway admin RPC URL"
          },
          "gateway_domain_suffix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain Suffix",
            "description": "Gateway domain suffix"
          },
          "gateway_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Slug",
            "description": "Gateway slug identifier"
          },
          "kms_guest_agent_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Guest Agent Endpoint",
            "description": "KMS guest agent endpoint for attestation"
          },
          "gateway_guest_agent_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Guest Agent Endpoint",
            "description": "Gateway guest agent endpoint for attestation"
          }
        },
        "type": "object",
        "required": [
          "endpoint",
          "slug"
        ],
        "title": "KMSCreate",
        "description": "Input for creating a KMS node."
      },
      "KMSInfo": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "Hashed KMS identifier (kms_xxxxx)",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Human-readable KMS name"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "KMS endpoint URL"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "KMS software version"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id",
            "description": "Blockchain chain ID if onchain"
          },
          "kms_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Address",
            "description": "Smart contract address if onchain"
          },
          "gateway_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id",
            "description": "Gateway application ID"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "version"
        ],
        "title": "KMSInfo",
        "description": "KMS instance information."
      },
      "KMSUpdate": {
        "properties": {
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Update human-readable identifier"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Update physical node association (0 to remove)"
          },
          "kms_contract_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Id",
            "description": "Update contract association (0 to remove)"
          },
          "kms_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KmsType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Update KMS type"
          },
          "gateway_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Rpc Url",
            "description": "Update gateway RPC URL"
          },
          "gateway_admin_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Admin Rpc Url",
            "description": "Update gateway admin RPC URL"
          },
          "gateway_domain_suffix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain Suffix",
            "description": "Update gateway domain suffix"
          },
          "gateway_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Slug",
            "description": "Update gateway slug identifier"
          },
          "kms_guest_agent_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Guest Agent Endpoint",
            "description": "Update KMS guest agent endpoint"
          },
          "gateway_guest_agent_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Guest Agent Endpoint",
            "description": "Update gateway guest agent endpoint"
          }
        },
        "type": "object",
        "title": "KMSUpdate",
        "description": "Input for updating a KMS node."
      },
      "KmsContractCreate": {
        "properties": {
          "contract_address": {
            "type": "string",
            "title": "Contract Address",
            "description": "On-chain contract address"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id",
            "description": "EVM chain ID where contract is deployed"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enable contract immediately",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "contract_address",
          "chain_id"
        ],
        "title": "KmsContractCreate",
        "description": "Input for creating a KMS contract."
      },
      "KmsContractOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Internal contract ID"
          },
          "contract_address": {
            "type": "string",
            "title": "Contract Address",
            "description": "On-chain contract address"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id",
            "description": "EVM chain ID"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether contract is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "contract_address",
          "chain_id",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "title": "KmsContractOut",
        "description": "KMS contract configuration for on-chain key management."
      },
      "KmsContractUpdate": {
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled",
            "description": "Update enabled status"
          }
        },
        "type": "object",
        "title": "KmsContractUpdate",
        "description": "Input for updating a KMS contract."
      },
      "KmsContractWithNodesOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Contract ID"
          },
          "contract_address": {
            "type": "string",
            "title": "Contract Address",
            "description": "On-chain contract address"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id",
            "description": "EVM chain ID"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether contract is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/KmsNodeOut"
            },
            "type": "array",
            "title": "Nodes",
            "description": "KMS nodes using this contract"
          },
          "node_count": {
            "type": "integer",
            "title": "Node Count",
            "description": "Number of associated nodes"
          }
        },
        "type": "object",
        "required": [
          "id",
          "contract_address",
          "chain_id",
          "enabled",
          "created_at",
          "updated_at",
          "nodes",
          "node_count"
        ],
        "title": "KmsContractWithNodesOut",
        "description": "KMS contract with associated KMS nodes."
      },
      "KmsGroupedData": {
        "properties": {
          "contract_groups": {
            "items": {
              "$ref": "#/components/schemas/KmsContractWithNodesOut"
            },
            "type": "array",
            "title": "Contract Groups",
            "description": "Contracts with their associated nodes"
          },
          "standalone_phala_nodes": {
            "items": {
              "$ref": "#/components/schemas/KmsNodeOut"
            },
            "type": "array",
            "title": "Standalone Phala Nodes",
            "description": "Phala-type nodes without contract"
          },
          "standalone_legacy_nodes": {
            "items": {
              "$ref": "#/components/schemas/KmsNodeOut"
            },
            "type": "array",
            "title": "Standalone Legacy Nodes",
            "description": "Legacy-type nodes without contract"
          },
          "total_contracts": {
            "type": "integer",
            "title": "Total Contracts",
            "description": "Total contract count"
          },
          "total_nodes": {
            "type": "integer",
            "title": "Total Nodes",
            "description": "Total node count"
          }
        },
        "type": "object",
        "required": [
          "contract_groups",
          "standalone_phala_nodes",
          "standalone_legacy_nodes",
          "total_contracts",
          "total_nodes"
        ],
        "title": "KmsGroupedData",
        "description": "KMS data grouped by contract association and type."
      },
      "KmsInspectResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint"
          },
          "kms_type": {
            "type": "string",
            "title": "Kms Type"
          },
          "db_version": {
            "type": "string",
            "title": "Db Version"
          },
          "rpc": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KmsRpcInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "rpc_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rpc Error"
          },
          "guest_agent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GuestAgentInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "guest_agent_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guest Agent Error"
          },
          "teepods": {
            "items": {
              "$ref": "#/components/schemas/TeepodInfo"
            },
            "type": "array",
            "title": "Teepods"
          },
          "on_chain": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OnChainInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "endpoint",
          "kms_type",
          "db_version"
        ],
        "title": "KmsInspectResponse"
      },
      "KmsListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KMSInfo"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "KmsListResponse",
        "description": "Paginated KMS list response."
      },
      "KmsNodeOut": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "KMS node ID",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Human-readable identifier"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "KMS RPC endpoint URL"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "KMS software version"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Whether this is a development node"
          },
          "kms_type": {
            "$ref": "#/components/schemas/KmsType",
            "description": "KMS type (phala or legacy)"
          },
          "gateway_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id",
            "description": "Gateway application ID"
          },
          "gateway_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Rpc Url",
            "description": "Gateway RPC URL"
          },
          "gateway_admin_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Admin Rpc Url",
            "description": "Gateway admin RPC URL"
          },
          "gateway_domain_suffix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain Suffix",
            "description": "Gateway domain suffix"
          },
          "gateway_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Slug",
            "description": "Gateway slug identifier"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "endpoint",
          "version",
          "is_dev",
          "kms_type",
          "created_at"
        ],
        "title": "KmsNodeOut",
        "description": "KMS node configuration with gateway settings."
      },
      "KmsOSImageRelationCreate": {
        "properties": {
          "os_image_id": {
            "type": "integer",
            "title": "Os Image Id",
            "description": "OS image ID to allow"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enable the relationship",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "os_image_id"
        ],
        "title": "KmsOSImageRelationCreate",
        "description": "Create KMS-OS image relationship."
      },
      "KmsOSImageRelationOut": {
        "properties": {
          "kms_id": {
            "type": "string",
            "title": "Kms Id",
            "description": "Hashed KMS ID"
          },
          "os_image_id": {
            "type": "integer",
            "title": "Os Image Id",
            "description": "OS image ID"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether relation is enabled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "os_image_name": {
            "type": "string",
            "title": "Os Image Name",
            "description": "OS image name"
          },
          "os_image_slug": {
            "type": "string",
            "title": "Os Image Slug",
            "description": "OS image slug"
          },
          "os_image_version": {
            "type": "string",
            "title": "Os Image Version",
            "description": "OS image version"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "OS image hash"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image"
          }
        },
        "type": "object",
        "required": [
          "kms_id",
          "os_image_id",
          "enabled",
          "created_at",
          "os_image_name",
          "os_image_slug",
          "os_image_version",
          "is_dev"
        ],
        "title": "KmsOSImageRelationOut",
        "description": "KMS-OS image relationship with OS image details."
      },
      "KmsOSImageRelationUpdate": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "New enabled status"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "KmsOSImageRelationUpdate",
        "description": "Update KMS-OS image relationship."
      },
      "KmsOSImageSyncResponse": {
        "properties": {
          "total_os_images": {
            "type": "integer",
            "title": "Total Os Images",
            "description": "Total OS images in database"
          },
          "checked_on_chain": {
            "type": "integer",
            "title": "Checked On Chain",
            "description": "Images checked on chain"
          },
          "allowed_on_chain": {
            "type": "integer",
            "title": "Allowed On Chain",
            "description": "Images allowed on chain"
          },
          "added_to_db": {
            "type": "integer",
            "title": "Added To Db",
            "description": "New relationships added"
          },
          "enabled_in_db": {
            "type": "integer",
            "title": "Enabled In Db",
            "description": "Relationships enabled"
          },
          "disabled_in_db": {
            "type": "integer",
            "title": "Disabled In Db",
            "description": "Relationships disabled"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors",
            "description": "Errors during sync"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Summary message"
          }
        },
        "type": "object",
        "required": [
          "total_os_images",
          "checked_on_chain",
          "allowed_on_chain",
          "added_to_db",
          "enabled_in_db",
          "disabled_in_db",
          "errors",
          "message"
        ],
        "title": "KmsOSImageSyncResponse",
        "description": "Blockchain sync operation result."
      },
      "KmsOut": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "KMS node ID",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Associated physical node ID"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Human-readable identifier"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "KMS RPC endpoint URL"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "KMS software version"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development mode flag"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id",
            "description": "EVM chain ID"
          },
          "kms_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Address",
            "description": "On-chain contract address"
          },
          "kms_contract_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Id",
            "description": "Associated contract ID"
          },
          "kms_type": {
            "$ref": "#/components/schemas/KmsType",
            "description": "KMS type (phala or legacy)"
          },
          "gateway_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id",
            "description": "Gateway application ID"
          },
          "gateway_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Rpc Url",
            "description": "Gateway RPC URL"
          },
          "gateway_admin_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Admin Rpc Url",
            "description": "Gateway admin RPC URL"
          },
          "gateway_domain_suffix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain Suffix",
            "description": "Gateway domain suffix"
          },
          "gateway_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Slug",
            "description": "Gateway slug identifier"
          },
          "kms_guest_agent_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Guest Agent Endpoint",
            "description": "KMS guest agent endpoint for attestation"
          },
          "gateway_guest_agent_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Guest Agent Endpoint",
            "description": "Gateway guest agent endpoint for attestation"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "endpoint",
          "version",
          "is_dev",
          "kms_type",
          "created_at"
        ],
        "title": "KmsOut",
        "description": "KMS node with contract association and gateway configuration."
      },
      "KmsRpcInfo": {
        "properties": {
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Real-time version from x-app-version header"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id"
          },
          "kms_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Address"
          },
          "gateway_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id"
          },
          "bootstrap_info": {
            "$ref": "#/components/schemas/BootstrapInfoOut"
          },
          "version_synced": {
            "type": "boolean",
            "title": "Version Synced",
            "description": "Whether DB version matches real version"
          }
        },
        "type": "object",
        "required": [
          "version",
          "is_dev",
          "bootstrap_info",
          "version_synced"
        ],
        "title": "KmsRpcInfo"
      },
      "KmsSearchResult": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "KMS node ID",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Display name (slug or endpoint)"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "KMS RPC endpoint URL"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "KMS software version"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development mode flag"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "endpoint",
          "version",
          "is_dev",
          "created_at"
        ],
        "title": "KmsSearchResult",
        "description": "KMS search result for relationship management."
      },
      "KmsSyncResult": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "KMS node ID",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "KMS slug"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "Synced version (null if failed)"
          },
          "previous_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Version",
            "description": "Version before sync"
          },
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Whether sync succeeded"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if failed"
          }
        },
        "type": "object",
        "required": [
          "id",
          "success"
        ],
        "title": "KmsSyncResult",
        "description": "Result of syncing metadata for a single KMS node."
      },
      "KmsType": {
        "type": "string",
        "enum": [
          "phala",
          "ethereum",
          "base",
          "legacy"
        ],
        "title": "KmsType"
      },
      "KmsWithSupportedOSImage": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "Hashed KMS identifier (kms_xxxxx)",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Human-readable KMS name"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "KMS endpoint URL"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "KMS software version"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id",
            "description": "Blockchain chain ID if onchain"
          },
          "kms_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Address",
            "description": "Smart contract address if onchain"
          },
          "gateway_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id",
            "description": "Gateway application ID"
          },
          "supported_os_images": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Supported Os Images"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "version"
        ],
        "title": "KmsWithSupportedOSImage"
      },
      "ListReservedGpusResponse": {
        "properties": {
          "gpus": {
            "items": {
              "$ref": "#/components/schemas/ReservedGpuOut"
            },
            "type": "array",
            "title": "Gpus",
            "description": "Reserved GPU records"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total count of reserved GPUs"
          }
        },
        "type": "object",
        "required": [
          "gpus",
          "total"
        ],
        "title": "ListReservedGpusResponse",
        "description": "List of GPUs reserved for the workspace."
      },
      "LoginRequest": {
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 254,
            "title": "Username"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "LoginRequest"
      },
      "LongRunningTask": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id",
            "description": "Task ID"
          },
          "task_name": {
            "type": "string",
            "title": "Task Name",
            "description": "Task function name"
          },
          "worker": {
            "type": "string",
            "title": "Worker",
            "description": "Worker executing task"
          },
          "duration": {
            "type": "integer",
            "title": "Duration",
            "description": "Runtime in seconds"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Correlation ID for tracing"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "task_name",
          "worker",
          "duration"
        ],
        "title": "LongRunningTask",
        "description": "Task running longer than 5 minutes."
      },
      "MachineInfo": {
        "properties": {
          "vcpu": {
            "type": "integer",
            "title": "Vcpu",
            "description": "Virtual CPU count"
          },
          "memory": {
            "type": "integer",
            "title": "Memory",
            "description": "Memory in MB"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size",
            "description": "Disk size in GB"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count",
            "description": "GPU count (0 if none)"
          }
        },
        "type": "object",
        "required": [
          "vcpu",
          "memory",
          "disk_size",
          "gpu_count"
        ],
        "title": "MachineInfo",
        "description": "CVM hardware configuration."
      },
      "ManagedUser": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "username": {
            "type": "string",
            "title": "Username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "username"
        ],
        "title": "ManagedUser"
      },
      "ManualDebtRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Debt amount to create (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for creating debt (required for audit)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional custom description (defaults to 'Manual debt adjustment')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "ManualDebtRequest",
        "description": "Request model for manual debt creation."
      },
      "ManualDebtResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "previous_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "New Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "previous_outstanding",
          "new_outstanding"
        ],
        "title": "ManualDebtResponse",
        "description": "Response model for manual debt creation."
      },
      "ManualSettlementRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Settlement amount in USD"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Audit trail reason"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Custom description (defaults to 'Manual reconciliation adjustment')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "ManualSettlementRequest",
        "description": "Request for manual reconciliation adjustment."
      },
      "ManualSettlementResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount"
        ],
        "title": "ManualSettlementResponse",
        "description": "Response model for manual settlement (external payment/waive)."
      },
      "MarkPaidRequest": {
        "properties": {
          "payment_method": {
            "type": "string",
            "title": "Payment Method",
            "description": "Payment method: credit_balance, manual, or other custom value",
            "default": "credit_balance"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note",
            "description": "Internal note explaining why this invoice is marked as paid"
          }
        },
        "type": "object",
        "title": "MarkPaidRequest"
      },
      "MatchedResourceInfo": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Teepod database ID"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id",
            "description": "Node database ID"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "GPU device identifier"
          },
          "instance_type": {
            "type": "string",
            "title": "Instance Type",
            "description": "Instance type ID"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu",
            "description": "Allocated vCPU count"
          },
          "memory_mb": {
            "type": "integer",
            "title": "Memory Mb",
            "description": "Allocated memory in MB"
          },
          "disk_size_gb": {
            "type": "integer",
            "title": "Disk Size Gb",
            "description": "Allocated disk in GB"
          },
          "requires_gpu_count": {
            "type": "integer",
            "title": "Requires Gpu Count",
            "description": "Number of GPUs required"
          },
          "os_image_name": {
            "type": "string",
            "title": "Os Image Name",
            "description": "OS image slug"
          },
          "kms_type": {
            "type": "string",
            "title": "Kms Type",
            "description": "KMS type (phala or custom)"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "node_id",
          "device_id",
          "instance_type",
          "vcpu",
          "memory_mb",
          "disk_size_gb",
          "requires_gpu_count",
          "os_image_name",
          "kms_type"
        ],
        "title": "MatchedResourceInfo",
        "description": "Matched GPU resource details."
      },
      "MemberPreview": {
        "properties": {
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "title": "Joined At"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "username",
          "email",
          "role",
          "joined_at"
        ],
        "title": "MemberPreview",
        "description": "Member information for team preview."
      },
      "MemberRoleUpdateRequest": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role",
            "description": "New role: ADMIN or MEMBER"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "MemberRoleUpdateRequest",
        "description": "Request to change member role."
      },
      "MeteredUsageResponse": {
        "properties": {
          "instance_id": {
            "type": "string",
            "title": "Instance Id",
            "description": "CVM instance UUID"
          },
          "project_id": {
            "type": "integer",
            "title": "Project Id",
            "description": "Project database ID"
          },
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Team database ID"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "Record timestamp (ISO 8601)"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Usage event type"
          },
          "cost": {
            "type": "number",
            "title": "Cost",
            "description": "Cost in USD"
          },
          "details": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details",
            "description": "JSON usage details"
          },
          "usage_type": {
            "type": "string",
            "title": "Usage Type",
            "description": "Billing category: compute, storage, etc."
          },
          "billing_start": {
            "type": "string",
            "title": "Billing Start",
            "description": "Billing period start (date)"
          },
          "billing_end": {
            "type": "string",
            "title": "Billing End",
            "description": "Billing period end (date)"
          },
          "duration_minutes": {
            "type": "number",
            "title": "Duration Minutes",
            "description": "Usage duration in minutes"
          },
          "billing_key": {
            "type": "string",
            "title": "Billing Key",
            "description": "Unique billing record key"
          },
          "billing_hour": {
            "type": "string",
            "title": "Billing Hour",
            "description": "Billing hour bucket"
          },
          "billing_day": {
            "type": "string",
            "title": "Billing Day",
            "description": "Billing day bucket"
          }
        },
        "type": "object",
        "required": [
          "instance_id",
          "project_id",
          "team_id",
          "timestamp",
          "event_type",
          "cost",
          "details",
          "usage_type",
          "billing_start",
          "billing_end",
          "duration_minutes",
          "billing_key",
          "billing_hour",
          "billing_day"
        ],
        "title": "MeteredUsageResponse",
        "description": "Single metered usage record."
      },
      "MonthlyInvoiceSummaryItem": {
        "properties": {
          "month": {
            "type": "string",
            "title": "Month"
          },
          "invoice_count": {
            "type": "integer",
            "title": "Invoice Count"
          },
          "total_amount_due": {
            "type": "string",
            "format": "decimal",
            "title": "Total Amount Due",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "month",
          "invoice_count",
          "total_amount_due"
        ],
        "title": "MonthlyInvoiceSummaryItem",
        "description": "Monthly invoice summary item for reconciliation."
      },
      "MonthlySpending": {
        "properties": {
          "month": {
            "type": "string",
            "format": "date",
            "title": "Month"
          },
          "total": {
            "type": "string",
            "format": "decimal",
            "title": "Total",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "compute": {
            "type": "string",
            "format": "decimal",
            "title": "Compute",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "disk": {
            "type": "string",
            "format": "decimal",
            "title": "Disk",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "usage_hours": {
            "type": "number",
            "title": "Usage Hours"
          }
        },
        "type": "object",
        "required": [
          "month",
          "total",
          "compute",
          "disk",
          "usage_hours"
        ],
        "title": "MonthlySpending",
        "description": "Monthly spending breakdown."
      },
      "MonthlyTransactionSummaryItem": {
        "properties": {
          "month": {
            "type": "string",
            "title": "Month"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "transaction_count": {
            "type": "integer",
            "title": "Transaction Count"
          },
          "total_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Total Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "month",
          "type",
          "transaction_count",
          "total_amount"
        ],
        "title": "MonthlyTransactionSummaryItem",
        "description": "Monthly transaction summary item for reconciliation."
      },
      "MonthlyUsageItem": {
        "properties": {
          "month": {
            "type": "string",
            "format": "date",
            "title": "Month"
          },
          "compute_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Compute Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "disk_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Disk Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "total_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Total Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "usage_hours": {
            "type": "number",
            "title": "Usage Hours"
          }
        },
        "type": "object",
        "required": [
          "month",
          "compute_cost",
          "disk_cost",
          "total_cost",
          "usage_hours"
        ],
        "title": "MonthlyUsageItem",
        "description": "Monthly usage item with breakdown."
      },
      "MonthlyUsageResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MonthlyUsageItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "MonthlyUsageResponse",
        "description": "Monthly usage response with list of monthly items."
      },
      "MonthlyUsageSummaryItem": {
        "properties": {
          "month": {
            "type": "string",
            "title": "Month"
          },
          "total_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Total Cost",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "usage_hours": {
            "type": "number",
            "title": "Usage Hours"
          }
        },
        "type": "object",
        "required": [
          "month",
          "total_cost",
          "usage_hours"
        ],
        "title": "MonthlyUsageSummaryItem",
        "description": "Monthly usage summary item for reconciliation."
      },
      "NetworkConfigPortMappingEntry": {
        "properties": {
          "host_port": {
            "type": "integer",
            "maximum": 65535.0,
            "minimum": 1.0,
            "title": "Host Port"
          },
          "vm_port": {
            "type": "integer",
            "maximum": 65535.0,
            "minimum": 1.0,
            "title": "Vm Port"
          },
          "protocol": {
            "type": "string",
            "pattern": "^(tcp|udp)$",
            "title": "Protocol",
            "default": "tcp"
          },
          "host_address": {
            "type": "string",
            "title": "Host Address",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "host_port",
          "vm_port"
        ],
        "title": "NetworkConfigPortMappingEntry",
        "description": "Single port mapping rule returned from VMM network config."
      },
      "NetworkConfigResponse": {
        "properties": {
          "kms_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Urls"
          },
          "gateway_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Gateway Urls"
          },
          "ports": {
            "items": {
              "$ref": "#/components/schemas/NetworkConfigPortMappingEntry"
            },
            "type": "array",
            "title": "Ports"
          }
        },
        "type": "object",
        "title": "NetworkConfigResponse",
        "description": "Real-time network configuration from VMM."
      },
      "NodeCreate": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "Unique node name"
          },
          "api_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Endpoint",
            "description": "Teescope agent endpoint URL. If provided, hardware specs are auto-filled."
          },
          "cpu_model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Model Name",
            "description": "CPU model"
          },
          "tdx_keyids": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tdx Keyids",
            "description": "TDX key IDs (max concurrent CVMs)"
          },
          "processor_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Processor Count",
            "description": "Physical CPU cores"
          },
          "memory_total_mb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Total Mb",
            "description": "Total RAM in MB"
          },
          "disk_size_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size Gb",
            "description": "Total disk in GB"
          },
          "vcpu_factor": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Vcpu Factor",
            "description": "vCPU multiplier from physical cores",
            "default": 1.0
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Region code"
          },
          "fmspc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fmspc",
            "description": "Intel TDX FMSPC value"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Hardware device identifier"
          },
          "ppid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppid",
            "description": "Platform Provisioning ID"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "NodeCreate",
        "description": "Input for creating a physical node."
      },
      "NodeFirewallRuleOut": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Firewall rule ID"
          },
          "protocol": {
            "type": "string",
            "title": "Protocol",
            "description": "Protocol (tcp/udp/tcp+udp)"
          },
          "port_from": {
            "type": "integer",
            "title": "Port From",
            "description": "Start port"
          },
          "port_to": {
            "type": "integer",
            "title": "Port To",
            "description": "End port"
          },
          "comment": {
            "type": "string",
            "title": "Comment",
            "description": "Rule comment"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At",
            "description": "Rule creation time"
          },
          "cvm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Id",
            "description": "Parsed CVM ID from comment"
          },
          "cvm_host_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Host Port",
            "description": "Parsed host port from comment metadata"
          },
          "cvm_vm_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Vm Port",
            "description": "VM-side port from DB mapping"
          },
          "cvm_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Name",
            "description": "CVM display name"
          },
          "cvm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Uuid",
            "description": "CVM UUID for admin link"
          },
          "workspace_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Slug",
            "description": "Workspace slug for admin link"
          },
          "workspace_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Name",
            "description": "Workspace display name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "protocol",
          "port_from",
          "port_to",
          "comment"
        ],
        "title": "NodeFirewallRuleOut",
        "description": "Single firewall rule on a node with parsed CVM association."
      },
      "NodeFirewallRulesResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/NodeFirewallRuleOut"
            },
            "type": "array",
            "title": "Rules",
            "description": "Firewall rules"
          }
        },
        "type": "object",
        "required": [
          "node_name"
        ],
        "title": "NodeFirewallRulesResponse",
        "description": "Node firewall rules list response."
      },
      "NodeNetworkDeviceOut": {
        "properties": {
          "device": {
            "type": "string",
            "title": "Device",
            "description": "Network device name"
          },
          "monitored_processes": {
            "type": "integer",
            "title": "Monitored Processes",
            "description": "Number of monitored QEMU processes"
          },
          "total_sent_bytes": {
            "type": "integer",
            "title": "Total Sent Bytes",
            "description": "Total sent bytes"
          },
          "total_recv_bytes": {
            "type": "integer",
            "title": "Total Recv Bytes",
            "description": "Total received bytes"
          },
          "sent_kbs_current": {
            "type": "number",
            "title": "Sent Kbs Current",
            "description": "Current send throughput in KB/s"
          },
          "recv_kbs_current": {
            "type": "number",
            "title": "Recv Kbs Current",
            "description": "Current receive throughput in KB/s"
          }
        },
        "type": "object",
        "required": [
          "device",
          "monitored_processes",
          "total_sent_bytes",
          "total_recv_bytes",
          "sent_kbs_current",
          "recv_kbs_current"
        ],
        "title": "NodeNetworkDeviceOut",
        "description": "Single host network device stat."
      },
      "NodeNetworkDevicesResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "total_monitored_processes": {
            "type": "integer",
            "title": "Total Monitored Processes",
            "description": "Total monitored QEMU processes"
          },
          "devices": {
            "items": {
              "$ref": "#/components/schemas/NodeNetworkDeviceOut"
            },
            "type": "array",
            "title": "Devices",
            "description": "Per-device stats"
          }
        },
        "type": "object",
        "required": [
          "node_name",
          "total_monitored_processes"
        ],
        "title": "NodeNetworkDevicesResponse",
        "description": "Host network devices stats for a node."
      },
      "NodeOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Node ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Node name"
          },
          "api_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Endpoint",
            "description": "Teescope agent endpoint URL"
          },
          "cpu_model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Model Name",
            "description": "CPU model"
          },
          "tdx_keyids": {
            "type": "integer",
            "title": "Tdx Keyids",
            "description": "Available TDX key IDs (max concurrent CVMs)"
          },
          "processor_count": {
            "type": "integer",
            "title": "Processor Count",
            "description": "Physical CPU cores"
          },
          "memory_total_mb": {
            "type": "integer",
            "title": "Memory Total Mb",
            "description": "Total RAM in MB"
          },
          "disk_size_gb": {
            "type": "integer",
            "title": "Disk Size Gb",
            "description": "Total disk in GB"
          },
          "vcpu_factor": {
            "type": "number",
            "title": "Vcpu Factor",
            "description": "Multiplier for vCPU allocation from cores"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Region code"
          },
          "fmspc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fmspc",
            "description": "Intel TDX FMSPC value"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Hardware device identifier"
          },
          "ppid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppid",
            "description": "Platform Provisioning ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "teepod_count": {
            "type": "integer",
            "title": "Teepod Count",
            "description": "Active teepods on this node",
            "default": 0
          },
          "resource_usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__api__routes__admin__physical_nodes__NodeResourceUsage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current resource usage"
          },
          "teepods": {
            "items": {
              "$ref": "#/components/schemas/TeepodWithStats"
            },
            "type": "array",
            "title": "Teepods",
            "description": "Teepods on this node"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "tdx_keyids",
          "processor_count",
          "memory_total_mb",
          "disk_size_gb",
          "vcpu_factor",
          "created_at",
          "updated_at"
        ],
        "title": "NodeOut",
        "description": "Physical TDX node with hardware specs and teepod assignments."
      },
      "NodeOutagesResponse": {
        "properties": {
          "node_id": {
            "type": "integer",
            "title": "Node Id"
          },
          "days": {
            "type": "integer",
            "title": "Days"
          },
          "total_outages": {
            "type": "integer",
            "title": "Total Outages"
          },
          "total_downtime_minutes": {
            "type": "integer",
            "title": "Total Downtime Minutes"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/OutageItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "node_id",
          "days",
          "total_outages",
          "total_downtime_minutes",
          "items"
        ],
        "title": "NodeOutagesResponse"
      },
      "NodeProvider": {
        "properties": {
          "proof_of_cloud": {
            "type": "boolean",
            "title": "Proof Of Cloud",
            "description": "Quote from a trusted cloud TEE"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider",
            "description": "Provider label (e.g. 'phala', 'scrt')"
          },
          "ppid": {
            "type": "string",
            "title": "Ppid",
            "description": "Platform Provisioning ID"
          }
        },
        "type": "object",
        "required": [
          "proof_of_cloud",
          "ppid"
        ],
        "title": "NodeProvider",
        "description": "TEE node provider info."
      },
      "NodeRef": {
        "properties": {
          "object_type": {
            "type": "string",
            "const": "node",
            "title": "Object Type",
            "description": "Fixed value 'node'",
            "default": "node"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Teepod numeric ID"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Physical node numeric ID"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Node display name"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region",
            "description": "Region identifier"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Device ID"
          },
          "ppid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppid",
            "description": "PPID"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeepodStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "Node status"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "Teepod version"
          }
        },
        "type": "object",
        "title": "NodeRef",
        "description": "Minimal node/teepod reference for embedding in responses."
      },
      "NodeResourceLimits": {
        "properties": {
          "max_cvm_slots": {
            "type": "integer",
            "title": "Max Cvm Slots",
            "description": "Maximum TDX keyids (from nodes.tdx_keyids)"
          },
          "max_allocable_vcpu": {
            "type": "integer",
            "title": "Max Allocable Vcpu",
            "description": "Maximum allocable vCPUs"
          },
          "max_allocable_memory_mb": {
            "type": "integer",
            "title": "Max Allocable Memory Mb",
            "description": "Maximum allocable memory in MB"
          },
          "max_allocable_disk_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Allocable Disk Gb",
            "description": "Maximum disk capacity in GB"
          }
        },
        "type": "object",
        "required": [
          "max_cvm_slots",
          "max_allocable_vcpu",
          "max_allocable_memory_mb",
          "max_allocable_disk_gb"
        ],
        "title": "NodeResourceLimits",
        "description": "Node hardware capacity limits."
      },
      "NodeSNITrafficItem": {
        "properties": {
          "sni": {
            "type": "string",
            "title": "Sni"
          },
          "total_bytes": {
            "type": "integer",
            "title": "Total Bytes",
            "default": 0
          },
          "connections": {
            "type": "integer",
            "title": "Connections",
            "default": 0
          },
          "zero_bytes": {
            "type": "integer",
            "title": "Zero Bytes",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "sni"
        ],
        "title": "NodeSNITrafficItem",
        "description": "Traffic stats for a single SNI."
      },
      "NodeStorageInfo": {
        "properties": {
          "mount_point": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mount Point"
          },
          "filesystem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filesystem"
          },
          "size_kb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Kb"
          },
          "used_kb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Kb"
          },
          "avail_kb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avail Kb"
          },
          "use_percentage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Percentage"
          }
        },
        "type": "object",
        "title": "NodeStorageInfo",
        "description": "Filesystem storage stats."
      },
      "NodeStorageListResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "default": true
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/NodeStorageVMItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "node_name"
        ],
        "title": "NodeStorageListResponse",
        "description": "Per-VM storage list for a node, sorted by size desc."
      },
      "NodeStorageVMItem": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Size Bytes",
            "default": 0
          },
          "exists": {
            "type": "boolean",
            "title": "Exists",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "vm_uuid"
        ],
        "title": "NodeStorageVMItem",
        "description": "Storage usage for a single VM from agent."
      },
      "NodeSystemInfoResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "description": "Whether agent returned system info"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason"
          },
          "qemu_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qemu Path"
          },
          "qemu_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qemu Version"
          },
          "qemu_package": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qemu Package"
          },
          "cpu_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Model"
          },
          "lscpu_model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lscpu Model Name"
          },
          "cpu_microcode_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Microcode Version"
          },
          "cpu_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Count"
          },
          "memory_gib": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Gib",
            "description": "Total memory in GiB"
          },
          "data_dir_tib": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Dir Tib",
            "description": "Data dir size in TiB"
          },
          "storage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeStorageInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filesystem storage stats"
          },
          "mk_tme_max_keys": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mk Tme Max Keys"
          },
          "num_tdx_keyids": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Tdx Keyids"
          }
        },
        "type": "object",
        "required": [
          "node_name",
          "available"
        ],
        "title": "NodeSystemInfoResponse",
        "description": "System info from node agent including MKTME and storage."
      },
      "NodeTeescopeCapabilities": {
        "properties": {
          "firewall": {
            "type": "boolean",
            "title": "Firewall",
            "description": "Whether firewall management is supported",
            "default": false
          },
          "netd_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Netd Version",
            "description": "teescope-netd version"
          }
        },
        "type": "object",
        "title": "NodeTeescopeCapabilities"
      },
      "NodeTeescopeInfoResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "api_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Endpoint",
            "description": "Teescope API endpoint URL"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "Teescope agent version"
          },
          "capabilities": {
            "$ref": "#/components/schemas/NodeTeescopeCapabilities"
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "description": "Whether teescope is reachable"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason",
            "description": "Why teescope is unavailable"
          }
        },
        "type": "object",
        "required": [
          "node_name",
          "available"
        ],
        "title": "NodeTeescopeInfoResponse",
        "description": "Teescope agent info for a node."
      },
      "NodeTopSNIsResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "default": true
          },
          "snis": {
            "items": {
              "$ref": "#/components/schemas/NodeSNITrafficItem"
            },
            "type": "array",
            "title": "Snis"
          },
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "node_name"
        ],
        "title": "NodeTopSNIsResponse",
        "description": "Top SNIs by traffic for a node."
      },
      "NodeUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Update node name"
          },
          "api_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Endpoint",
            "description": "Update Teescope agent endpoint URL"
          },
          "cpu_model_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Model Name",
            "description": "Update CPU model"
          },
          "tdx_keyids": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tdx Keyids",
            "description": "Update TDX key IDs"
          },
          "processor_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Processor Count",
            "description": "Update CPU cores"
          },
          "memory_total_mb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Total Mb",
            "description": "Update RAM in MB"
          },
          "disk_size_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size Gb",
            "description": "Update disk in GB"
          },
          "vcpu_factor": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu Factor",
            "description": "Update vCPU multiplier"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Update region code"
          },
          "fmspc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fmspc",
            "description": "Update FMSPC value"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Update device identifier"
          },
          "ppid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppid",
            "description": "Update Platform Provisioning ID"
          }
        },
        "type": "object",
        "title": "NodeUpdate",
        "description": "Input for updating a physical node."
      },
      "NodeVMEgressInfo": {
        "properties": {
          "total_sent_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Sent Bytes",
            "default": 0
          },
          "total_recv_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Recv Bytes",
            "default": 0
          },
          "peak_sent_kbs": {
            "type": "number",
            "minimum": 0.0,
            "title": "Peak Sent Kbs",
            "default": 0.0
          },
          "peak_recv_kbs": {
            "type": "number",
            "minimum": 0.0,
            "title": "Peak Recv Kbs",
            "default": 0.0
          },
          "total_sent_kbs_avg_5m": {
            "type": "number",
            "minimum": 0.0,
            "title": "Total Sent Kbs Avg 5M",
            "default": 0.0
          },
          "total_recv_kbs_avg_5m": {
            "type": "number",
            "minimum": 0.0,
            "title": "Total Recv Kbs Avg 5M",
            "default": 0.0
          }
        },
        "type": "object",
        "title": "NodeVMEgressInfo",
        "description": "Egress traffic stats for a VM."
      },
      "NodeVMIngressInfo": {
        "properties": {
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "total_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Bytes",
            "default": 0
          },
          "connections": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Connections",
            "default": 0
          },
          "zero_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Zero Bytes",
            "default": 0
          },
          "snis": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Snis"
          }
        },
        "type": "object",
        "title": "NodeVMIngressInfo",
        "description": "Ingress traffic stats for a VM (via HAProxy SNI)."
      },
      "NodeVMItem": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "cvm_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cvm Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "CVM display name"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id",
            "description": "CVM app ID"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status",
            "description": "CVM status from DB"
          },
          "project_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Name"
          },
          "workspace_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Name"
          },
          "workspace_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Slug"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "disk_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size",
            "description": "Allocated disk in GB from DB"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "qemu": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeVMQemuInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "storage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeVMStorageInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "egress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeVMEgressInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "ingress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeVMIngressInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "vm_uuid"
        ],
        "title": "NodeVMItem",
        "description": "Combined VM info: DB metadata + live agent data."
      },
      "NodeVMQemuInfo": {
        "properties": {
          "pid": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pid"
          },
          "uptime": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Uptime",
            "description": "Process uptime in seconds",
            "default": 0
          },
          "cpu_usage_perc": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Usage Perc",
            "description": "CPU% relative to allocated cores",
            "default": 0.0
          },
          "cpu_pct_usr": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Usr",
            "description": "pidstat %usr, 100 == one core",
            "default": 0.0
          },
          "cpu_pct_system": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct System",
            "description": "pidstat %system, 100 == one core",
            "default": 0.0
          },
          "cpu_pct_guest": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Guest",
            "description": "pidstat %guest, 100 == one core",
            "default": 0.0
          },
          "cpu_pct_wait": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Wait",
            "description": "pidstat %wait, 100 == one core",
            "default": 0.0
          },
          "cpu_pct_total": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Pct Total",
            "description": "pidstat %CPU = usr+system+guest",
            "default": 0.0
          },
          "cpu_cores": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cpu Cores",
            "description": "Allocated CPU cores",
            "default": 0
          },
          "allocated_mb": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Allocated Mb",
            "description": "Allocated memory in MB",
            "default": 0
          },
          "kvm_guest_mem_mb": {
            "type": "number",
            "minimum": 0.0,
            "title": "Kvm Guest Mem Mb",
            "description": "KVM guest memory in MB",
            "default": 0.0
          },
          "kvm_mem_usage_perc": {
            "type": "number",
            "minimum": 0.0,
            "title": "Kvm Mem Usage Perc",
            "description": "KVM memory usage %",
            "default": 0.0
          },
          "kvm_hugepage_ratio": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Kvm Hugepage Ratio",
            "description": "Hugepage ratio",
            "default": 0.0
          },
          "oom_score": {
            "type": "integer",
            "title": "Oom Score",
            "description": "OOM score (0-1000)",
            "default": 0
          },
          "io_read_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Io Read Bytes",
            "default": 0
          },
          "io_write_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Io Write Bytes",
            "default": 0
          },
          "slots": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Slots",
            "description": "GPU PCI slots"
          }
        },
        "type": "object",
        "required": [
          "pid"
        ],
        "title": "NodeVMQemuInfo",
        "description": "QEMU process resource usage for a VM."
      },
      "NodeVMStorageInfo": {
        "properties": {
          "size_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Size Bytes",
            "default": 0
          },
          "exists": {
            "type": "boolean",
            "title": "Exists",
            "default": false
          }
        },
        "type": "object",
        "title": "NodeVMStorageInfo",
        "description": "Storage usage for a VM data directory."
      },
      "NodeVMsResponse": {
        "properties": {
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node name"
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "default": true
          },
          "vms": {
            "items": {
              "$ref": "#/components/schemas/NodeVMItem"
            },
            "type": "array",
            "title": "Vms"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching VMs",
            "default": 0
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "default": 1
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "default": 50
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "node_name"
        ],
        "title": "NodeVMsResponse",
        "description": "Combined VM data for a node."
      },
      "OSImageCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Image name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Slug for dstack API (defaults to name)"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Version in x.y.z or x.y.z.p format"
          },
          "os_image_hash": {
            "type": "string",
            "title": "Os Image Hash",
            "description": "MR image hash with 0x prefix"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image",
            "default": false
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Requires GPU",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "version",
          "os_image_hash"
        ],
        "title": "OSImageCreate",
        "description": "Create OS image request."
      },
      "OSImageListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OSImagePublicOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "OSImageListResponse",
        "description": "Paginated OS image list response."
      },
      "OSImageOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "OS image ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Image name"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Slug for dstack API"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Version string (x.y.z)"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "MR image hash"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Requires GPU"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "teepods_count": {
            "type": "integer",
            "title": "Teepods Count",
            "description": "Teepods using this image",
            "default": 0
          },
          "kms_count": {
            "type": "integer",
            "title": "Kms Count",
            "description": "KMS instances allowing this image",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "version",
          "is_dev",
          "requires_gpu",
          "created_at"
        ],
        "title": "OSImageOut",
        "description": "OS image with usage counts."
      },
      "OSImagePublicOut": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Image name"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Image slug"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Version string (x.y.z)"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "MR image hash"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Requires GPU"
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug",
          "version",
          "is_dev",
          "requires_gpu"
        ],
        "title": "OSImagePublicOut",
        "description": "Public OS image info."
      },
      "OSImageSearchResult": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "OS image ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Image name"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Slug"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Version"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Formatted as 'name v{version}'"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "Image hash"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "description": "Requires GPU"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "version",
          "description",
          "is_dev",
          "requires_gpu",
          "created_at"
        ],
        "title": "OSImageSearchResult",
        "description": "OS image search result."
      },
      "OSImageUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Image name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "Slug for dstack API"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "Version in x.y.z or x.y.z.p format"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "MR image hash with 0x prefix"
          },
          "is_dev": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Dev",
            "description": "Development image"
          },
          "requires_gpu": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Gpu",
            "description": "Requires GPU"
          }
        },
        "type": "object",
        "title": "OSImageUpdate",
        "description": "Update OS image request."
      },
      "OSImageVariant": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Human-readable image name (e.g. dstack-0.5.5)"
          },
          "slug": {
            "type": "string",
            "title": "Slug",
            "description": "Unique identifier for API calls (e.g. dstack-0.5.5-e18f5407)"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "SHA256 hash of the OS image"
          },
          "is_current": {
            "type": "boolean",
            "title": "Is Current",
            "description": "True if this is the currently running image",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug"
        ],
        "title": "OSImageVariant",
        "description": "Single OS image variant (production or development build)."
      },
      "OnChainDeviceOut": {
        "properties": {
          "device_id": {
            "type": "string",
            "title": "Device Id"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name",
            "description": "Physical node name if available"
          },
          "on_chain_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Chain Allowed",
            "description": "null if check failed"
          }
        },
        "type": "object",
        "required": [
          "device_id"
        ],
        "title": "OnChainDeviceOut"
      },
      "OnChainInfo": {
        "properties": {
          "kms_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OnChainKmsInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "gateway_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "verification": {
            "$ref": "#/components/schemas/OnChainVerification"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "title": "OnChainInfo"
      },
      "OnChainKmsContractOut": {
        "properties": {
          "contract_address": {
            "type": "string",
            "title": "Contract Address"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id"
          },
          "chain_name": {
            "type": "string",
            "title": "Chain Name"
          },
          "devices": {
            "items": {
              "$ref": "#/components/schemas/OnChainDeviceOut"
            },
            "type": "array",
            "title": "Devices"
          },
          "os_images": {
            "items": {
              "$ref": "#/components/schemas/OnChainOsImageOut"
            },
            "type": "array",
            "title": "Os Images"
          }
        },
        "type": "object",
        "required": [
          "contract_address",
          "chain_id",
          "chain_name",
          "devices",
          "os_images"
        ],
        "title": "OnChainKmsContractOut"
      },
      "OnChainKmsInfo": {
        "properties": {
          "k256_pubkey": {
            "type": "string",
            "title": "K256 Pubkey"
          },
          "ca_pubkey": {
            "type": "string",
            "title": "Ca Pubkey"
          },
          "quote_length": {
            "type": "integer",
            "title": "Quote Length"
          },
          "eventlog_length": {
            "type": "integer",
            "title": "Eventlog Length"
          }
        },
        "type": "object",
        "required": [
          "k256_pubkey",
          "ca_pubkey",
          "quote_length",
          "eventlog_length"
        ],
        "title": "OnChainKmsInfo"
      },
      "OnChainKmsResponse": {
        "properties": {
          "chain_name": {
            "type": "string",
            "title": "Chain Name"
          },
          "chain_id": {
            "type": "integer",
            "title": "Chain Id"
          },
          "contracts": {
            "items": {
              "$ref": "#/components/schemas/OnChainKmsContractOut"
            },
            "type": "array",
            "title": "Contracts"
          }
        },
        "type": "object",
        "required": [
          "chain_name",
          "chain_id",
          "contracts"
        ],
        "title": "OnChainKmsResponse"
      },
      "OnChainOsImageOut": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash"
          },
          "on_chain_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Chain Allowed",
            "description": "null if no hash or check failed"
          }
        },
        "type": "object",
        "required": [
          "name",
          "version"
        ],
        "title": "OnChainOsImageOut"
      },
      "OnChainVerification": {
        "properties": {
          "k256_pubkey_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "K256 Pubkey Match",
            "description": "RPC vs chain k256_pubkey"
          },
          "ca_pubkey_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ca Pubkey Match",
            "description": "RPC vs chain ca_pubkey"
          },
          "gateway_app_id_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway App Id Match",
            "description": "RPC vs chain gateway_app_id"
          },
          "device_id_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id Allowed",
            "description": "Guest agent device_id in whitelist"
          },
          "os_image_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Allowed",
            "description": "Guest agent os_image_hash in whitelist"
          },
          "mr_aggregated_allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mr Aggregated Allowed",
            "description": "Guest agent mr_aggregated in whitelist"
          }
        },
        "type": "object",
        "title": "OnChainVerification"
      },
      "OperationEventDetail": {
        "properties": {
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Event type identifier (e.g. instance.power_on.start)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "UTC timestamp when event occurred"
          },
          "state": {
            "type": "string",
            "title": "State",
            "description": "CVM state at event time (e.g. running, stopped)"
          }
        },
        "type": "object",
        "required": [
          "event_type",
          "timestamp",
          "state"
        ],
        "title": "OperationEventDetail",
        "description": "Single atomic event within an operation."
      },
      "OrderFinancialSummaryOut": {
        "properties": {
          "prepaid_amount": {
            "type": "string",
            "title": "Prepaid Amount"
          },
          "prepaid_breakdown": {
            "items": {
              "$ref": "#/components/schemas/PrepaidBreakdownOut"
            },
            "type": "array",
            "title": "Prepaid Breakdown"
          },
          "prepaid_hours": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prepaid Hours"
          },
          "hourly_rate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hourly Rate"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "used_hours": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Hours"
          }
        },
        "type": "object",
        "required": [
          "prepaid_amount",
          "prepaid_breakdown",
          "prepaid_hours",
          "hourly_rate",
          "activated_at",
          "used_hours"
        ],
        "title": "OrderFinancialSummaryOut"
      },
      "OrderMinimumPeriodOut": {
        "properties": {
          "total_hours": {
            "type": "integer",
            "title": "Total Hours"
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At"
          },
          "in_minimum_period": {
            "type": "boolean",
            "title": "In Minimum Period"
          },
          "hours_remaining": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hours Remaining"
          }
        },
        "type": "object",
        "required": [
          "total_hours",
          "ends_at",
          "in_minimum_period",
          "hours_remaining"
        ],
        "title": "OrderMinimumPeriodOut"
      },
      "OrderResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Hashid-encoded order ID"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "Order amount in USD",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProvider",
            "description": "Payment provider used"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Order status: created, submitted, pending, purchased, finalized, failed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Order creation timestamp"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transaction Id",
            "description": "Credit transaction ID after completion"
          },
          "payment_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Url",
            "description": "URL to complete payment (for submitted orders)"
          },
          "invoice_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Url",
            "description": "Receipt URL (for finalized orders)"
          },
          "payment_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Order Id",
            "description": "Provider's order/transaction ID"
          }
        },
        "type": "object",
        "required": [
          "id",
          "amount",
          "provider",
          "status",
          "created_at"
        ],
        "title": "OrderResponse",
        "description": "Single order in the orders list response."
      },
      "OrderRunwayOut": {
        "properties": {
          "unmetered": {
            "type": "boolean",
            "title": "Unmetered"
          },
          "team_credit_balance": {
            "type": "string",
            "title": "Team Credit Balance"
          },
          "estimated_runway_hours": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Runway Hours"
          },
          "estimated_exhaust_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Exhaust At"
          },
          "assumption_note": {
            "type": "string",
            "title": "Assumption Note"
          }
        },
        "type": "object",
        "required": [
          "unmetered",
          "team_credit_balance",
          "estimated_runway_hours",
          "estimated_exhaust_at",
          "assumption_note"
        ],
        "title": "OrderRunwayOut"
      },
      "OrderStatus": {
        "type": "string",
        "enum": [
          "created",
          "submitted",
          "pending",
          "purchased",
          "finalized",
          "failed"
        ],
        "title": "OrderStatus"
      },
      "OrderWithRelations": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^ord_.+",
            "format": "hashid",
            "title": "HashedId[orders]",
            "description": "Hashed order ID",
            "examples": [
              "ord_0123abcd"
            ]
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "Hashed user ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "Hashed team ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "credit_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^crt_.+",
                "format": "hashid",
                "title": "HashedId[credit_transactions]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "crt_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Credit Transaction Id",
            "description": "Linked credit transaction ID"
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment",
            "description": "Payment environment (live/sandbox)"
          },
          "order_flow_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order Flow Code",
            "description": "Order flow identifier"
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProvider",
            "description": "Payment provider (stripe/crypto)"
          },
          "provider_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Transaction Id",
            "description": "Provider transaction ID"
          },
          "provider_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Order Id",
            "description": "Provider order ID"
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "Order amount in USD",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Order status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Order creation timestamp"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "user_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Username",
            "description": "Username"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email",
            "description": "User email"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name",
            "description": "Team name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "team_id",
          "provider",
          "amount",
          "status",
          "created_at"
        ],
        "title": "OrderWithRelations",
        "description": "Order with user and team context."
      },
      "OrdersListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/OrderResponse"
            },
            "type": "array",
            "title": "Data",
            "description": "Orders for the current page"
          },
          "pagination": {
            "$ref": "#/components/schemas/teehouse__api__routes__billing___common__PaginationMetadata",
            "description": "Pagination info with next_cursor"
          }
        },
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "title": "OrdersListResponse",
        "description": "Paginated list of orders."
      },
      "OutageItem": {
        "properties": {
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "null if ongoing"
          },
          "duration_minutes": {
            "type": "integer",
            "title": "Duration Minutes",
            "description": "Outage duration in minutes"
          },
          "failed_checks": {
            "type": "integer",
            "title": "Failed Checks",
            "description": "Number of failed sync checks"
          }
        },
        "type": "object",
        "required": [
          "started_at",
          "duration_minutes",
          "failed_checks"
        ],
        "title": "OutageItem",
        "description": "A single outage incident (continuous period of failures)."
      },
      "OutagesResponse": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "days": {
            "type": "integer",
            "title": "Days"
          },
          "total_outages": {
            "type": "integer",
            "title": "Total Outages"
          },
          "total_downtime_minutes": {
            "type": "integer",
            "title": "Total Downtime Minutes"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/OutageItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "days",
          "total_outages",
          "total_downtime_minutes",
          "items"
        ],
        "title": "OutagesResponse"
      },
      "PaginatedAdminInstanceEventsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdminInstanceEventResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "Instance events"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Cursor for next page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching events"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedAdminInstanceEventsResponse",
        "description": "Paginated instance events with cursor-based pagination."
      },
      "PaginatedAdminTeepodDetail": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdminTeepodDetail"
            },
            "type": "array",
            "title": "Items",
            "description": "Teepods for current page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total teepods matching filters"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedAdminTeepodDetail",
        "description": "Paginated teepod list response."
      },
      "PaginatedBillingItemsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/HourlyBillingResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "Hourly billing records for this page"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Cursor for next page, null if last page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total distinct billing hours"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedBillingItemsResponse",
        "description": "Paginated hourly billing records."
      },
      "PaginatedCVMs": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CVMItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedCVMs",
        "description": "Paginated response for CVMs list."
      },
      "PaginatedCvmInfos": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__cvms__v20260121__schemas__CVMInfo"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedCvmInfos"
      },
      "PaginatedCvmOperationsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CvmOperationResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "Operations ordered by started_at DESC"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Opaque cursor for next page, null if last page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Approximate total count (not exact for performance)"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedCvmOperationsResponse",
        "description": "Cursor-paginated list of CVM operations."
      },
      "PaginatedDstackApps": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DstackAppItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedDstackApps",
        "description": "Paginated response for dstack apps list."
      },
      "PaginatedGpuRentalOrders": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GpuRentalOrderItem"
            },
            "type": "array",
            "title": "Items",
            "description": "Order items for current page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total orders matching filters"
          },
          "status_counts": {
            "additionalProperties": {
              "$ref": "#/components/schemas/StatusCount"
            },
            "type": "object",
            "title": "Status Counts",
            "description": "Order count and total GPU quantity per status"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedGpuRentalOrders",
        "description": "Paginated GPU rental orders response."
      },
      "PaginatedHostedCvms": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/HostedCvm"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedHostedCvms",
        "description": "Paginated response for CVM list endpoints"
      },
      "PaginatedInstanceEventsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__instance_events__InstanceEventResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "Events in reverse chronological order"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Cursor for next page (pass to cursor param)"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total events matching filters"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedInstanceEventsResponse",
        "description": "Paginated list of CVM events."
      },
      "PaginatedInvitations": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InvitationResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "Invitations on current page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total invitation count"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number (1-indexed)"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total page count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedInvitations",
        "description": "Paginated list of invitations."
      },
      "PaginatedKms": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KmsOut"
            },
            "type": "array",
            "title": "Items",
            "description": "KMS nodes"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total node count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedKms",
        "description": "Paginated KMS node list."
      },
      "PaginatedKmsContracts": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KmsContractOut"
            },
            "type": "array",
            "title": "Items",
            "description": "KMS contracts"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total contract count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedKmsContracts",
        "description": "Paginated KMS contract list."
      },
      "PaginatedKmsSearchResult": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KmsSearchResult"
            },
            "type": "array",
            "title": "Items",
            "description": "Matching KMS nodes"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matches"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page (1-indexed)"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total page count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedKmsSearchResult",
        "description": "Paginated KMS search results."
      },
      "PaginatedNodes": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NodeOut"
            },
            "type": "array",
            "title": "Items",
            "description": "Nodes for current page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching nodes"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page (1-indexed)"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total page count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedNodes",
        "description": "Paginated physical node list."
      },
      "PaginatedOSImageSearchResult": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OSImageSearchResult"
            },
            "type": "array",
            "title": "Items",
            "description": "Search results"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matches"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Records per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedOSImageSearchResult",
        "description": "Paginated OS image search response."
      },
      "PaginatedOSImages": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OSImageOut"
            },
            "type": "array",
            "title": "Items",
            "description": "OS image list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total records"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedOSImages",
        "description": "Paginated OS images response."
      },
      "PaginatedOrders": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrderWithRelations"
            },
            "type": "array",
            "title": "Items",
            "description": "Order list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching records"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedOrders",
        "description": "Paginated orders response."
      },
      "PaginatedSyncLogs": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SyncLogEntry"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedSyncLogs"
      },
      "PaginatedTeamList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeamListItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedTeamList",
        "description": "Paginated response for team list endpoint."
      },
      "PaginatedTeamSearchResult": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeamSearchResult"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedTeamSearchResult",
        "description": "Paginated response for team search endpoints."
      },
      "PaginatedTeepodGpus": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeepodGpuDetail"
            },
            "type": "array",
            "title": "Items",
            "description": "GPU list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching records"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Records per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedTeepodGpus",
        "description": "Paginated GPUs response."
      },
      "PaginatedTeepods": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeepodOut"
            },
            "type": "array",
            "title": "Items",
            "description": "Teepods for current page"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching teepods"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page (1-indexed)"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total page count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedTeepods",
        "description": "Paginated teepod list."
      },
      "PaginatedUsers": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdminUserDetail"
            },
            "type": "array",
            "title": "Items",
            "description": "User list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching records"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedUsers",
        "description": "Paginated users response."
      },
      "PaginatedWorkspaceGpus": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GpuItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedWorkspaceGpus",
        "description": "Paginated response for workspace GPUs list."
      },
      "PaginatedWorkspaceNodesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NodeRef"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedWorkspaceNodesResponse"
      },
      "PaginatedWorkspaceTeepods": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeepodItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedWorkspaceTeepods",
        "description": "Paginated response for workspace teepods list."
      },
      "PasswordResetRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "PasswordResetRequest"
      },
      "PayInvoiceRequest": {
        "properties": {
          "payment_method": {
            "type": "string",
            "title": "Payment Method",
            "description": "Payment method: only 'credit_balance' supported"
          }
        },
        "type": "object",
        "required": [
          "payment_method"
        ],
        "title": "PayInvoiceRequest",
        "description": "Request body for paying an invoice."
      },
      "PayInvoiceResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "True if payment completed"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Result description"
          },
          "used_granted_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Granted Balance",
            "description": "USD deducted from granted_balance"
          },
          "used_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Balance",
            "description": "USD deducted from balance"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "title": "PayInvoiceResponse",
        "description": "Response after paying an invoice."
      },
      "PaymentProvider": {
        "type": "string",
        "enum": [
          "square",
          "coinbase",
          "stripe",
          "mock"
        ],
        "title": "PaymentProvider"
      },
      "PendingUpdateItem": {
        "properties": {
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid"
          },
          "compose_hash": {
            "type": "string",
            "title": "Compose Hash"
          },
          "on_chain": {
            "type": "boolean",
            "title": "On Chain"
          },
          "instance_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Name"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid",
          "compose_hash",
          "on_chain"
        ],
        "title": "PendingUpdateItem"
      },
      "PendingUpdatePreview": {
        "properties": {
          "current_docker_compose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Docker Compose"
          },
          "pending_docker_compose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pending Docker Compose"
          },
          "current_pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Pre Launch Script"
          },
          "pending_pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pending Pre Launch Script"
          }
        },
        "type": "object",
        "title": "PendingUpdatePreview"
      },
      "PendingUpdatesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PendingUpdateItem"
            },
            "type": "array",
            "title": "Items",
            "default": []
          }
        },
        "type": "object",
        "title": "PendingUpdatesResponse"
      },
      "PeriodInfo": {
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "title": "Start Date"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "title": "End Date"
          },
          "days": {
            "type": "integer",
            "title": "Days"
          }
        },
        "type": "object",
        "required": [
          "start_date",
          "end_date",
          "days"
        ],
        "title": "PeriodInfo",
        "description": "Time period information."
      },
      "PersonIdentifiers": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "cio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cio Id"
          }
        },
        "type": "object",
        "title": "PersonIdentifiers",
        "description": "Identifiers for person operations - one of id, email, or cio_id."
      },
      "PingNodeResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Node ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Node name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current status"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "message"
        ],
        "title": "PingNodeResponse",
        "description": "Response after pinging a node."
      },
      "PoolHealthInfo": {
        "properties": {
          "worker": {
            "type": "string",
            "title": "Worker",
            "description": "Worker hostname"
          },
          "processes": {
            "type": "integer",
            "title": "Processes",
            "description": "Max concurrent processes"
          },
          "running": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Running",
            "description": "Running process IDs"
          },
          "healthy": {
            "type": "boolean",
            "title": "Healthy",
            "description": "All processes running"
          }
        },
        "type": "object",
        "required": [
          "worker",
          "processes",
          "running",
          "healthy"
        ],
        "title": "PoolHealthInfo",
        "description": "Worker process pool health."
      },
      "PortMapping": {
        "properties": {
          "protocol": {
            "type": "string",
            "title": "Protocol"
          },
          "host_port": {
            "type": "integer",
            "title": "Host Port"
          },
          "vm_port": {
            "type": "integer",
            "title": "Vm Port"
          },
          "host_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host Address"
          }
        },
        "type": "object",
        "required": [
          "protocol",
          "host_port",
          "vm_port"
        ],
        "title": "PortMapping"
      },
      "PortMappingEntry": {
        "properties": {
          "vm_port": {
            "type": "integer",
            "maximum": 65535.0,
            "minimum": 1.0,
            "title": "Vm Port"
          },
          "protocol": {
            "type": "string",
            "pattern": "^(tcp|udp)$",
            "title": "Protocol",
            "default": "tcp"
          }
        },
        "type": "object",
        "required": [
          "vm_port"
        ],
        "title": "PortMappingEntry",
        "description": "Single requested port mapping rule."
      },
      "PortMappingResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^pm_.+",
            "format": "hashid",
            "title": "HashedId[cvm_port_mappings]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "pm_0123abcd"
            ]
          },
          "host_port": {
            "type": "integer",
            "title": "Host Port"
          },
          "vm_port": {
            "type": "integer",
            "title": "Vm Port"
          },
          "protocol": {
            "type": "string",
            "title": "Protocol"
          },
          "host_address": {
            "type": "string",
            "title": "Host Address"
          }
        },
        "type": "object",
        "required": [
          "id",
          "host_port",
          "vm_port",
          "protocol",
          "host_address"
        ],
        "title": "PortMappingResponse",
        "description": "Port mapping with server-assigned ID."
      },
      "PrepaidBreakdownOut": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "title": "Transaction Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "amount": {
            "type": "string",
            "title": "Amount"
          },
          "source": {
            "type": "string",
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "type",
          "amount",
          "source"
        ],
        "title": "PrepaidBreakdownOut"
      },
      "ProfileGetResponse": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "custom_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Domain"
          }
        },
        "type": "object",
        "title": "ProfileGetResponse",
        "description": "Response model for entity profile - only public display data."
      },
      "ProfileUpdateRequest": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "custom_domain": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 253
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Domain"
          }
        },
        "type": "object",
        "title": "ProfileUpdateRequest",
        "description": "Request model for updating entity profile."
      },
      "ProjectDetailResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "Project ID (hashid)",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Project display name"
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier",
            "description": "App identifier (e.g., 'app_abc123')"
          },
          "app_provision_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Provision Type",
            "description": "Deployment template (e.g., 'elizaos/eliza')"
          },
          "app_icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Icon Url",
            "description": "Custom icon URL"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "ISO 8601 creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "title": "ProjectDetailResponse",
        "description": "Project metadata."
      },
      "ProjectWithCvmResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "Project ID (hashid)",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Project display name"
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier",
            "description": "App identifier"
          },
          "app_provision_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Provision Type",
            "description": "Deployment template"
          },
          "app_icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Icon Url",
            "description": "Custom icon URL"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "ISO 8601 creation timestamp"
          },
          "current_cvm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__api__routes__projects__CvmBasicInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Active CVM info (if deployed)"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "title": "ProjectWithCvmResponse",
        "description": "Project with current CVM summary."
      },
      "PromotionCode": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "credit_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Credit Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "max_uses_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses Per User"
          },
          "current_uses": {
            "type": "integer",
            "title": "Current Uses",
            "default": 0
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "credit_amount",
          "created_at"
        ],
        "title": "PromotionCode"
      },
      "PromotionCodeCreate": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "credit_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Credit Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "max_uses_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses Per User"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "code",
          "credit_amount"
        ],
        "title": "PromotionCodeCreate"
      },
      "PromotionCodeUpdate": {
        "properties": {
          "max_uses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "max_uses_per_user": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses Per User"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "title": "PromotionCodeUpdate"
      },
      "PromotionCodesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PromotionCode"
            },
            "type": "array",
            "title": "Items",
            "description": "Promotion code list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching records"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PromotionCodesResponse",
        "description": "Paginated promotion codes response."
      },
      "PromotionRedemptionItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "code": {
            "type": "string",
            "title": "Code"
          },
          "credit_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Credit Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "redeemed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Redeemed At"
          },
          "redeemed_by_user_id": {
            "type": "integer",
            "title": "Redeemed By User Id"
          },
          "redeemed_by_username": {
            "type": "string",
            "title": "Redeemed By Username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "code",
          "credit_amount",
          "redeemed_at",
          "redeemed_by_user_id",
          "redeemed_by_username"
        ],
        "title": "PromotionRedemptionItem",
        "description": "Promotion code redemption item for workspace."
      },
      "PromotionRedemptionsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PromotionRedemptionItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PromotionRedemptionsResponse",
        "description": "Response for promotion redemptions list."
      },
      "ProvisionComposeFileUpdateRequest": {
        "properties": {
          "allowed_envs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Envs"
          },
          "bash_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bash Script"
          },
          "default_gateway_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Gateway Domain"
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "init_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Init Script"
          },
          "kms_enabled": {
            "type": "boolean",
            "title": "Kms Enabled",
            "default": true
          },
          "local_key_provider_enabled": {
            "type": "boolean",
            "title": "Local Key Provider Enabled",
            "default": false
          },
          "manifest_version": {
            "type": "integer",
            "title": "Manifest Version",
            "default": 2
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "no_instance_id": {
            "type": "boolean",
            "title": "No Instance Id",
            "default": false
          },
          "pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script"
          },
          "public_logs": {
            "type": "boolean",
            "title": "Public Logs",
            "default": true
          },
          "public_sysinfo": {
            "type": "boolean",
            "title": "Public Sysinfo",
            "default": true
          },
          "public_tcbinfo": {
            "type": "boolean",
            "title": "Public Tcbinfo",
            "default": true
          },
          "runner": {
            "type": "string",
            "title": "Runner",
            "default": "docker-compose"
          },
          "gateway_enabled": {
            "type": "boolean",
            "title": "Gateway Enabled",
            "default": true
          },
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Features",
            "default": [
              "kms",
              "tproxy-net"
            ]
          },
          "salt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salt"
          },
          "secure_time": {
            "type": "boolean",
            "title": "Secure Time",
            "default": false
          },
          "storage_fs": {
            "anyOf": [
              {
                "type": "string",
                "const": "ext4"
              },
              {
                "type": "string",
                "const": "zfs"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Fs",
            "default": "zfs"
          },
          "tproxy_enabled": {
            "type": "boolean",
            "title": "Tproxy Enabled",
            "default": true
          },
          "update_env_vars": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Update Env Vars",
            "description": "Whether to also update allowed_envs",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProvisionComposeFileUpdateRequest",
        "description": "Request model for provisioning compose file updates."
      },
      "ProvisionDstackAppRequestV2": {
        "properties": {
          "compose_file": {
            "$ref": "#/components/schemas/AppComposeV2"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "CVM name (used as hostname): 5-63 chars, must start with letter, can contain letters/numbers/hyphens"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu"
          },
          "memory": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory"
          },
          "disk_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size"
          },
          "image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          },
          "prefer_dev": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefer Dev",
            "description": "Prefer dev OS image (True) or non-dev OS image (False). When None, auto-selects based on image name or defaults to dev."
          },
          "teepod_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Id"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "listed": {
            "type": "boolean",
            "title": "Listed",
            "default": true
          },
          "kms_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Id"
          },
          "kms": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KmsType"
              },
              {
                "type": "null"
              }
            ],
            "default": "phala"
          },
          "nonce": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nonce",
            "description": "Optional nonce for deterministic app_id generation. When provided, app_id must also be provided. System will verify: app_id == get_create_address(team_wallet, nonce)"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id",
            "description": "Optional app_id for manual specification. Required when nonce is provided. Only works with PHALA KMS."
          },
          "env_keys": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Env Keys"
          },
          "ports": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PortMapping"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ports"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env"
          },
          "user_config": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Config"
          },
          "hugepages": {
            "type": "boolean",
            "title": "Hugepages",
            "default": false
          },
          "pin_numa": {
            "type": "boolean",
            "title": "Pin Numa",
            "default": false
          },
          "gpus": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "kms_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Urls"
          },
          "gateway_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Gateway Urls"
          },
          "experimental_vpc_server_app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Experimental Vpc Server App Id"
          }
        },
        "type": "object",
        "required": [
          "compose_file",
          "name"
        ],
        "title": "ProvisionDstackAppRequestV2",
        "description": "Request for provisioning a DStack app with automatic resource matching.\n\nMost fields are optional and will be automatically determined by the resource\nmatching logic in preflight_dstack_app. Only compose_file and name are required."
      },
      "ProvisionElizaRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the tapp."
          },
          "characterfile": {
            "type": "string",
            "title": "Characterfile",
            "description": "The characterfile to use for the a16z/eliza."
          },
          "env_keys": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Env Keys",
            "description": "The environment variables to use for the a16z/eliza."
          },
          "teepod_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Id",
            "description": "The Teepod ID to use for the a16z/eliza. If not provided, it will auto select an available one."
          },
          "image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image",
            "description": "The image to use for the a16z/eliza. If not provided, it will use the latest image."
          },
          "kms_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Id",
            "description": "The KMS ID to use."
          }
        },
        "type": "object",
        "required": [
          "name",
          "characterfile",
          "env_keys"
        ],
        "title": "ProvisionElizaRequest"
      },
      "PublicCVM": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "base_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Image",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "name",
          "status",
          "app_id",
          "base_image"
        ],
        "title": "PublicCVM"
      },
      "QueueHealth": {
        "properties": {
          "unacknowledged_count": {
            "type": "integer",
            "title": "Unacknowledged Count",
            "description": "Messages not yet acknowledged"
          },
          "pool_health": {
            "items": {
              "$ref": "#/components/schemas/PoolHealthInfo"
            },
            "type": "array",
            "title": "Pool Health",
            "description": "Worker pool status"
          },
          "long_running_tasks": {
            "items": {
              "$ref": "#/components/schemas/LongRunningTask"
            },
            "type": "array",
            "title": "Long Running Tasks",
            "description": "Tasks over 5 minutes"
          },
          "workers_online": {
            "type": "integer",
            "title": "Workers Online",
            "description": "Active worker count"
          },
          "healthy": {
            "type": "boolean",
            "title": "Healthy",
            "description": "Overall health status"
          }
        },
        "type": "object",
        "required": [
          "unacknowledged_count",
          "pool_health",
          "long_running_tasks",
          "workers_online",
          "healthy"
        ],
        "title": "QueueHealth",
        "description": "Queue health metrics."
      },
      "QueueHealthCheckResult": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "OK or ALERT"
          },
          "total_workers": {
            "type": "integer",
            "title": "Total Workers",
            "description": "Active worker count"
          },
          "queues_with_workers": {
            "type": "integer",
            "title": "Queues With Workers",
            "description": "Queues with at least one worker"
          },
          "total_configured_queues": {
            "type": "integer",
            "title": "Total Configured Queues",
            "description": "Total configured queue count"
          },
          "total_pending": {
            "type": "integer",
            "title": "Total Pending",
            "description": "Messages waiting for workers"
          },
          "total_processing": {
            "type": "integer",
            "title": "Total Processing",
            "description": "Messages being processed"
          },
          "queue_details": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Queue Details",
            "description": "Per-queue statistics"
          },
          "issues": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Issues",
            "description": "Alerts requiring action"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings",
            "description": "Non-critical warnings"
          },
          "rabbitmq_accessible": {
            "type": "boolean",
            "title": "Rabbitmq Accessible",
            "description": "RabbitMQ management API reachable"
          },
          "rabbitmq_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rabbitmq Error",
            "description": "RabbitMQ connection error"
          },
          "zombie_workers": {
            "items": {
              "$ref": "#/components/schemas/ZombieWorkerInfo"
            },
            "type": "array",
            "title": "Zombie Workers",
            "description": "Unresponsive workers"
          }
        },
        "type": "object",
        "required": [
          "status",
          "total_workers",
          "queues_with_workers",
          "total_configured_queues",
          "total_pending",
          "total_processing",
          "queue_details",
          "issues",
          "warnings",
          "rabbitmq_accessible"
        ],
        "title": "QueueHealthCheckResult",
        "description": "Comprehensive queue health check result."
      },
      "QueueStats": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Queue name"
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "Total tasks (active + reserved + scheduled)"
          },
          "active_tasks": {
            "type": "integer",
            "title": "Active Tasks",
            "description": "Currently executing tasks"
          },
          "reserved_tasks": {
            "type": "integer",
            "title": "Reserved Tasks",
            "description": "Tasks claimed by workers"
          },
          "scheduled_tasks": {
            "type": "integer",
            "title": "Scheduled Tasks",
            "description": "Tasks scheduled for later execution"
          }
        },
        "type": "object",
        "required": [
          "name",
          "size",
          "active_tasks",
          "reserved_tasks",
          "scheduled_tasks"
        ],
        "title": "QueueStats",
        "description": "Celery queue statistics."
      },
      "QuotaMetric": {
        "properties": {
          "limit": {
            "type": "integer",
            "title": "Limit",
            "default": -1
          },
          "remaining": {
            "type": "integer",
            "title": "Remaining",
            "default": -1
          }
        },
        "type": "object",
        "title": "QuotaMetric",
        "description": "Quota metric for resource limits and availability.\n\nConvention:\n- limit = -1 means unlimited (e.g. enterprise tier)\n- remaining = -1 means unlimited"
      },
      "Quote": {
        "properties": {
          "header": {
            "$ref": "#/components/schemas/QuoteHeader"
          },
          "cert_data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cert Data"
          },
          "body": {
            "$ref": "#/components/schemas/QuoteBody"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "header",
          "cert_data",
          "body"
        ],
        "title": "Quote"
      },
      "QuoteBody": {
        "properties": {
          "tee_tcb_svn": {
            "type": "string",
            "title": "Tee Tcb Svn"
          },
          "mrseam": {
            "type": "string",
            "format": "binary",
            "title": "Mrseam"
          },
          "mrsignerseam": {
            "type": "string",
            "format": "binary",
            "title": "Mrsignerseam"
          },
          "seamattributes": {
            "type": "string",
            "format": "binary",
            "title": "Seamattributes"
          },
          "tdattributes": {
            "type": "string",
            "format": "binary",
            "title": "Tdattributes"
          },
          "xfam": {
            "type": "string",
            "format": "binary",
            "title": "Xfam"
          },
          "mrtd": {
            "type": "string",
            "format": "binary",
            "title": "Mrtd"
          },
          "mrconfig": {
            "type": "string",
            "format": "binary",
            "title": "Mrconfig"
          },
          "mrowner": {
            "type": "string",
            "format": "binary",
            "title": "Mrowner"
          },
          "mrownerconfig": {
            "type": "string",
            "format": "binary",
            "title": "Mrownerconfig"
          },
          "rtmr0": {
            "type": "string",
            "format": "binary",
            "title": "Rtmr0"
          },
          "rtmr1": {
            "type": "string",
            "format": "binary",
            "title": "Rtmr1"
          },
          "rtmr2": {
            "type": "string",
            "format": "binary",
            "title": "Rtmr2"
          },
          "rtmr3": {
            "type": "string",
            "format": "binary",
            "title": "Rtmr3"
          },
          "reportdata": {
            "type": "string",
            "format": "binary",
            "title": "Reportdata"
          }
        },
        "type": "object",
        "required": [
          "tee_tcb_svn",
          "mrseam",
          "mrsignerseam",
          "seamattributes",
          "tdattributes",
          "xfam",
          "mrtd",
          "mrconfig",
          "mrowner",
          "mrownerconfig",
          "rtmr0",
          "rtmr1",
          "rtmr2",
          "rtmr3",
          "reportdata"
        ],
        "title": "QuoteBody"
      },
      "QuoteCollateralV3": {
        "properties": {
          "pck_crl_issuer_chain": {
            "type": "string",
            "title": "Pck Crl Issuer Chain"
          },
          "root_ca_crl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Root Ca Crl"
          },
          "pck_crl": {
            "type": "string",
            "title": "Pck Crl"
          },
          "tcb_info_issuer_chain": {
            "type": "string",
            "title": "Tcb Info Issuer Chain"
          },
          "tcb_info": {
            "type": "string",
            "title": "Tcb Info"
          },
          "tcb_info_signature": {
            "type": "string",
            "title": "Tcb Info Signature"
          },
          "qe_identity_issuer_chain": {
            "type": "string",
            "title": "Qe Identity Issuer Chain"
          },
          "qe_identity": {
            "type": "string",
            "title": "Qe Identity"
          },
          "qe_identity_signature": {
            "type": "string",
            "title": "Qe Identity Signature"
          }
        },
        "type": "object",
        "required": [
          "pck_crl_issuer_chain",
          "root_ca_crl",
          "pck_crl",
          "tcb_info_issuer_chain",
          "tcb_info",
          "tcb_info_signature",
          "qe_identity_issuer_chain",
          "qe_identity",
          "qe_identity_signature"
        ],
        "title": "QuoteCollateralV3"
      },
      "QuoteHeader": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "ak_type": {
            "$ref": "#/components/schemas/AttestationKeyType"
          },
          "tee_type": {
            "$ref": "#/components/schemas/TeeType"
          },
          "qe_vendor": {
            "type": "string",
            "format": "binary",
            "title": "Qe Vendor"
          },
          "user_data": {
            "type": "string",
            "format": "binary",
            "title": "User Data"
          }
        },
        "type": "object",
        "required": [
          "version",
          "ak_type",
          "tee_type",
          "qe_vendor",
          "user_data"
        ],
        "title": "QuoteHeader"
      },
      "RabbitMQOverview": {
        "properties": {
          "node": {
            "type": "string",
            "title": "Node",
            "description": "RabbitMQ node name",
            "default": "unknown"
          },
          "rabbitmq_version": {
            "type": "string",
            "title": "Rabbitmq Version",
            "description": "RabbitMQ version",
            "default": "unknown"
          },
          "erlang_version": {
            "type": "string",
            "title": "Erlang Version",
            "description": "Erlang OTP version",
            "default": "unknown"
          },
          "management_version": {
            "type": "string",
            "title": "Management Version",
            "description": "Management plugin version",
            "default": "unknown"
          },
          "total_messages": {
            "type": "integer",
            "title": "Total Messages",
            "description": "Total messages across all queues",
            "default": 0
          },
          "total_ready": {
            "type": "integer",
            "title": "Total Ready",
            "description": "Messages ready for delivery",
            "default": 0
          },
          "total_unacked": {
            "type": "integer",
            "title": "Total Unacked",
            "description": "Unacknowledged messages",
            "default": 0
          },
          "connections": {
            "type": "integer",
            "title": "Connections",
            "description": "Active connections",
            "default": 0
          },
          "channels": {
            "type": "integer",
            "title": "Channels",
            "description": "Active channels",
            "default": 0
          },
          "consumers": {
            "type": "integer",
            "title": "Consumers",
            "description": "Total consumers",
            "default": 0
          },
          "queues": {
            "type": "integer",
            "title": "Queues",
            "description": "Queue count",
            "default": 0
          },
          "publish_rate": {
            "type": "number",
            "title": "Publish Rate",
            "description": "Messages published per second",
            "default": 0.0
          },
          "deliver_rate": {
            "type": "number",
            "title": "Deliver Rate",
            "description": "Messages delivered per second",
            "default": 0.0
          },
          "ack_rate": {
            "type": "number",
            "title": "Ack Rate",
            "description": "Messages acknowledged per second",
            "default": 0.0
          }
        },
        "type": "object",
        "title": "RabbitMQOverview",
        "description": "RabbitMQ cluster overview."
      },
      "RabbitMQQueue": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Queue name"
          },
          "messages": {
            "type": "integer",
            "title": "Messages",
            "description": "Total messages in queue"
          },
          "messages_ready": {
            "type": "integer",
            "title": "Messages Ready",
            "description": "Messages ready for delivery"
          },
          "messages_unacknowledged": {
            "type": "integer",
            "title": "Messages Unacknowledged",
            "description": "Messages delivered but not acked"
          },
          "consumers": {
            "type": "integer",
            "title": "Consumers",
            "description": "Connected consumer count"
          },
          "publish_rate": {
            "type": "number",
            "title": "Publish Rate",
            "description": "Messages published per second"
          },
          "deliver_rate": {
            "type": "number",
            "title": "Deliver Rate",
            "description": "Messages delivered per second"
          },
          "memory": {
            "type": "integer",
            "title": "Memory",
            "description": "Memory usage in bytes"
          },
          "idle_since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idle Since",
            "description": "Last activity timestamp"
          }
        },
        "type": "object",
        "required": [
          "name",
          "messages",
          "messages_ready",
          "messages_unacknowledged",
          "consumers",
          "publish_rate",
          "deliver_rate",
          "memory"
        ],
        "title": "RabbitMQQueue",
        "description": "RabbitMQ queue statistics."
      },
      "RecalculateBillingDetailItem": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "new_values": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Values"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "instance_type",
          "status"
        ],
        "title": "RecalculateBillingDetailItem",
        "description": "Detail of a single CVM billing update."
      },
      "RecalculateBillingResponse": {
        "properties": {
          "updated_count": {
            "type": "integer",
            "title": "Updated Count"
          },
          "skipped_count": {
            "type": "integer",
            "title": "Skipped Count"
          },
          "details": {
            "items": {
              "$ref": "#/components/schemas/RecalculateBillingDetailItem"
            },
            "type": "array",
            "title": "Details"
          }
        },
        "type": "object",
        "required": [
          "updated_count",
          "skipped_count",
          "details"
        ],
        "title": "RecalculateBillingResponse",
        "description": "Response for recalculate billing endpoint."
      },
      "RechargeResponse": {
        "properties": {
          "recharged": {
            "type": "boolean",
            "title": "Recharged"
          },
          "transfer_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transfer Amount"
          },
          "balance_before": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance Before"
          },
          "balance_after": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance After"
          }
        },
        "type": "object",
        "required": [
          "recharged"
        ],
        "title": "RechargeResponse"
      },
      "ReconciliationDeductionRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Deduction amount (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for deduction (required for audit)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional custom description (defaults to 'Reconciliation deduction to correct ledger')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "ReconciliationDeductionRequest",
        "description": "Request model for reconciliation deduction."
      },
      "ReconciliationDeductionResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "previous_ledger_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Ledger Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_ledger_balance": {
            "type": "string",
            "format": "decimal",
            "title": "New Ledger Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "previous_ledger_balance",
          "new_ledger_balance"
        ],
        "title": "ReconciliationDeductionResponse",
        "description": "Response model for reconciliation deduction."
      },
      "RedeployRevisionRequest": {
        "properties": {
          "vm_uuids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuids"
          }
        },
        "type": "object",
        "title": "RedeployRevisionRequest"
      },
      "RedpillApiKeyCreate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Display name for the API key",
            "default": "Redpill API Key"
          }
        },
        "type": "object",
        "title": "RedpillApiKeyCreate",
        "description": "Request body for creating a Redpill API key."
      },
      "RedpillConnectionStatus": {
        "properties": {
          "connected": {
            "type": "boolean",
            "title": "Connected"
          },
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid",
            "default": false
          },
          "credits_line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credits Line"
          }
        },
        "type": "object",
        "required": [
          "connected"
        ],
        "title": "RedpillConnectionStatus"
      },
      "RefreshAttestationVerifiedItem": {
        "properties": {
          "checksum": {
            "type": "string",
            "title": "Checksum"
          },
          "status": {
            "type": "string",
            "enum": [
              "would_process",
              "updated",
              "unchanged",
              "failed",
              "not_found"
            ],
            "title": "Status"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "checksum",
          "status"
        ],
        "title": "RefreshAttestationVerifiedItem"
      },
      "RefreshAttestationVerifiedRequest": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "estimate",
              "execute"
            ],
            "title": "Mode",
            "description": "Preview affected rows or execute the refresh mutation.",
            "default": "estimate"
          },
          "since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Since",
            "description": "Refresh quotes created at or after this timestamp."
          },
          "checksums": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksums",
            "description": "Refresh one or more exact quote checksums."
          },
          "batch_size": {
            "type": "integer",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Batch Size",
            "description": "Rows to process per batch.",
            "default": 100
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit",
            "description": "Optional cap on matched rows after filtering."
          }
        },
        "type": "object",
        "title": "RefreshAttestationVerifiedRequest"
      },
      "RefreshAttestationVerifiedResponse": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "estimate",
              "execute"
            ],
            "title": "Mode"
          },
          "matched": {
            "type": "integer",
            "title": "Matched",
            "description": "Rows found in ClickHouse for the requested target."
          },
          "processed": {
            "type": "integer",
            "title": "Processed",
            "description": "Rows that were inspected in this request."
          },
          "updated": {
            "type": "integer",
            "title": "Updated",
            "description": "Rows whose verified boolean changed after refresh."
          },
          "unchanged": {
            "type": "integer",
            "title": "Unchanged",
            "description": "Rows refreshed with the same verified boolean."
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "description": "Rows that failed re-verification."
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/RefreshAttestationVerifiedItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "mode",
          "matched",
          "processed",
          "updated",
          "unchanged",
          "failed"
        ],
        "title": "RefreshAttestationVerifiedResponse"
      },
      "RegisterPayload": {
        "properties": {
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "title": "Password"
          },
          "invite_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Invite Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "username",
          "email",
          "password"
        ],
        "title": "RegisterPayload"
      },
      "RegisterRequest": {
        "properties": {
          "pubkey": {
            "type": "string",
            "title": "Pubkey",
            "description": "Compressed secp256k1 public key (hex)"
          },
          "quoteHex": {
            "type": "string",
            "title": "Quotehex",
            "description": "Raw TDX quote (hex)"
          },
          "nonce": {
            "type": "string",
            "title": "Nonce",
            "description": "Challenge nonce"
          }
        },
        "type": "object",
        "required": [
          "pubkey",
          "quoteHex",
          "nonce"
        ],
        "title": "RegisterRequest",
        "description": "Shim registration request with DCAP proof."
      },
      "RelatedTransactionOut": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "title": "Transaction Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "amount": {
            "type": "string",
            "title": "Amount"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "type",
          "amount",
          "created_at",
          "description"
        ],
        "title": "RelatedTransactionOut"
      },
      "ReplicateRequest": {
        "properties": {
          "teepod_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Id",
            "description": "Target node ID (deprecated, use node_id)"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Target node ID for the replica"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "New encrypted env blob (hex)"
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash",
            "description": "Explicit compose hash to replicate. Required when the source app has multiple live instances."
          }
        },
        "type": "object",
        "title": "ReplicateRequest",
        "description": "Request model for CVM replication."
      },
      "ReservedGpuItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "slot": {
            "type": "string",
            "title": "Slot"
          },
          "allocation_status": {
            "type": "string",
            "title": "Allocation Status"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slot",
          "allocation_status",
          "teepod_name"
        ],
        "title": "ReservedGpuItem",
        "description": "Reserved GPU item."
      },
      "ReservedGpuOut": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id",
            "description": "GPU database ID"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot address"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "description": "GPU product identifier (e.g., 'H100')"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id",
            "description": "Host node database ID"
          },
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Host node name"
          },
          "cc_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Mode",
            "description": "Current CC mode status"
          },
          "ppcie_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppcie Mode",
            "description": "Current PPCIe mode status"
          },
          "in_use": {
            "type": "boolean",
            "title": "In Use",
            "description": "Whether GPU is attached to a running VM",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "slot",
          "product_id",
          "node_id",
          "node_name"
        ],
        "title": "ReservedGpuOut",
        "description": "GPU reserved for the workspace."
      },
      "ReservedResourcesResponse": {
        "properties": {
          "teepods": {
            "items": {
              "$ref": "#/components/schemas/ReservedTeepodItem"
            },
            "type": "array",
            "title": "Teepods"
          },
          "gpus": {
            "items": {
              "$ref": "#/components/schemas/ReservedGpuItem"
            },
            "type": "array",
            "title": "Gpus"
          },
          "teepods_count": {
            "type": "integer",
            "title": "Teepods Count"
          },
          "gpus_count": {
            "type": "integer",
            "title": "Gpus Count"
          }
        },
        "type": "object",
        "required": [
          "teepods",
          "gpus",
          "teepods_count",
          "gpus_count"
        ],
        "title": "ReservedResourcesResponse",
        "description": "Response model for reserved resources."
      },
      "ReservedTeepodItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status"
        ],
        "title": "ReservedTeepodItem",
        "description": "Reserved teepod item."
      },
      "ResetPasswordWithToken": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "token",
          "password"
        ],
        "title": "ResetPasswordWithToken",
        "description": "Request model for resetting password with token."
      },
      "ResourceMetrics": {
        "properties": {
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory_gb": {
            "type": "number",
            "title": "Memory Gb"
          },
          "disk_gb": {
            "type": "integer",
            "title": "Disk Gb"
          }
        },
        "type": "object",
        "required": [
          "vcpu",
          "memory_gb",
          "disk_gb"
        ],
        "title": "ResourceMetrics",
        "description": "Resource metrics for CPU, memory, and disk."
      },
      "ResourceSummaryResponse": {
        "properties": {
          "running_cvms": {
            "type": "integer",
            "title": "Running Cvms"
          },
          "total_cvms": {
            "type": "integer",
            "title": "Total Cvms"
          },
          "total_resources": {
            "$ref": "#/components/schemas/ResourceMetrics"
          },
          "running_resources": {
            "$ref": "#/components/schemas/ResourceMetrics"
          },
          "by_instance_type": {
            "items": {
              "$ref": "#/components/schemas/InstanceTypeResourceItem"
            },
            "type": "array",
            "title": "By Instance Type"
          },
          "by_billing_period": {
            "items": {
              "$ref": "#/components/schemas/BillingPeriodResourceItem"
            },
            "type": "array",
            "title": "By Billing Period"
          },
          "active_gpu_allocations": {
            "type": "integer",
            "title": "Active Gpu Allocations"
          }
        },
        "type": "object",
        "required": [
          "running_cvms",
          "total_cvms",
          "total_resources",
          "running_resources",
          "by_instance_type",
          "by_billing_period",
          "active_gpu_allocations"
        ],
        "title": "ResourceSummaryResponse",
        "description": "Workspace resource summary response."
      },
      "ResourceThreshold": {
        "properties": {
          "max_instances": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Instances"
          },
          "max_vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Vcpu"
          },
          "max_memory": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Memory"
          },
          "max_disk": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Disk"
          },
          "max_memory_each": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Memory Each"
          },
          "max_disk_each": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Disk Each"
          }
        },
        "type": "object",
        "required": [
          "max_instances",
          "max_vcpu",
          "max_memory",
          "max_disk"
        ],
        "title": "ResourceThreshold",
        "description": "Resource threshold for VM creation."
      },
      "ReviewQueueItem": {
        "properties": {
          "invoice_id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "team_row_id": {
            "type": "integer",
            "title": "Team Row Id"
          },
          "workspace_name": {
            "type": "string",
            "title": "Workspace Name"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "amount_due": {
            "type": "string",
            "format": "decimal",
            "title": "Amount Due",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "item_count": {
            "type": "integer",
            "title": "Item Count"
          },
          "stripe_payment_available": {
            "type": "boolean",
            "title": "Stripe Payment Available"
          },
          "default_invoice_type": {
            "type": "string",
            "enum": [
              "local",
              "stripe"
            ],
            "title": "Default Invoice Type"
          },
          "send_email_default": {
            "type": "boolean",
            "title": "Send Email Default"
          },
          "outstanding_debt_current": {
            "type": "string",
            "format": "decimal",
            "title": "Outstanding Debt Current",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "usage_items_total": {
            "type": "string",
            "format": "decimal",
            "title": "Usage Items Total",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "credit_consumed_total": {
            "type": "string",
            "format": "decimal",
            "title": "Credit Consumed Total",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "debt_gap": {
            "type": "string",
            "format": "decimal",
            "title": "Debt Gap",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "has_running_cvms": {
            "type": "boolean",
            "title": "Has Running Cvms"
          },
          "running_cvm_count": {
            "type": "integer",
            "title": "Running Cvm Count"
          },
          "has_unpaid_or_uncollectible_invoices": {
            "type": "boolean",
            "title": "Has Unpaid Or Uncollectible Invoices"
          },
          "unpaid_or_uncollectible_invoice_count": {
            "type": "integer",
            "title": "Unpaid Or Uncollectible Invoice Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "invoice_id",
          "team_id",
          "team_row_id",
          "workspace_name",
          "period_start",
          "period_end",
          "status",
          "amount_due",
          "item_count",
          "stripe_payment_available",
          "default_invoice_type",
          "send_email_default",
          "outstanding_debt_current",
          "usage_items_total",
          "credit_consumed_total",
          "debt_gap",
          "has_running_cvms",
          "running_cvm_count",
          "has_unpaid_or_uncollectible_invoices",
          "unpaid_or_uncollectible_invoice_count",
          "created_at"
        ],
        "title": "ReviewQueueItem",
        "description": "Admin review queue row for draft invoices."
      },
      "ReviewQueueResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReviewQueueItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size"
        ],
        "title": "ReviewQueueResponse"
      },
      "RevokeTaskRequest": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id",
            "description": "Task ID to revoke"
          },
          "terminate": {
            "type": "boolean",
            "title": "Terminate",
            "description": "Send SIGKILL to worker process",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "task_id"
        ],
        "title": "RevokeTaskRequest",
        "description": "Request to cancel a Celery task."
      },
      "SendTestMessageRequest": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Message text to send"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "SendTestMessageRequest",
        "description": "Input for sending a test Telegram message."
      },
      "SendTestMessageResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Whether message was sent"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "title": "SendTestMessageResponse",
        "description": "Result of test message send."
      },
      "SessionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "jti": {
            "type": "string",
            "title": "Jti"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          },
          "device_info": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Info"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Seen At"
          },
          "is_current": {
            "type": "boolean",
            "title": "Is Current"
          },
          "revoked": {
            "type": "boolean",
            "title": "Revoked"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "device_kind": {
            "type": "string",
            "enum": [
              "Mobile",
              "Desktop",
              "Unknown"
            ],
            "title": "Device Kind",
            "description": "Get device kind (Mobile/Desktop) based on user agent.",
            "readOnly": true
          },
          "device_os": {
            "type": "string",
            "title": "Device Os",
            "description": "Expose detected operating system as a computed field.",
            "readOnly": true
          },
          "device_label": {
            "type": "string",
            "title": "Device Label",
            "description": "Generate a user-friendly device label, including OS.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "jti",
          "created_at",
          "last_seen_at",
          "is_current",
          "revoked",
          "device_kind",
          "device_os",
          "device_label"
        ],
        "title": "SessionResponse",
        "description": "API response model for user sessions with sanitized device info."
      },
      "SessionsListResponse": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionResponse"
            },
            "type": "array",
            "title": "Sessions"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "sessions",
          "total"
        ],
        "title": "SessionsListResponse",
        "description": "Response for listing user sessions."
      },
      "SetCvmDeviceIdRequest": {
        "properties": {
          "device_id": {
            "type": "string",
            "minLength": 1,
            "title": "Device Id",
            "description": "Hardware device identifier"
          }
        },
        "type": "object",
        "required": [
          "device_id"
        ],
        "title": "SetCvmDeviceIdRequest"
      },
      "SettleWithCreditsRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Amount to settle (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for settlement (required for audit)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional custom description (defaults to 'Settle debt with credits')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "SettleWithCreditsRequest",
        "description": "Request model for settling debt with workspace credits."
      },
      "SettleWithCreditsResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "used_granted_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Used Granted Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "used_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Used Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "previous_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "New Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "used_granted_balance",
          "used_balance",
          "previous_outstanding",
          "new_outstanding"
        ],
        "title": "SettleWithCreditsResponse",
        "description": "Response model for settling debt with workspace credits."
      },
      "ShareableInvitationResponse": {
        "properties": {
          "invitation_url": {
            "type": "string",
            "title": "Invitation Url",
            "description": "Full URL to share"
          },
          "token": {
            "type": "string",
            "title": "Token",
            "description": "Invitation token"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "invitation_message": {
            "type": "string",
            "title": "Invitation Message",
            "description": "Pre-formatted message to share"
          }
        },
        "type": "object",
        "required": [
          "invitation_url",
          "token",
          "role",
          "expires_at",
          "invitation_message"
        ],
        "title": "ShareableInvitationResponse",
        "description": "Response with shareable invitation link details."
      },
      "ShutdownAllCvmsRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "Reason for shutdown",
            "default": "admin_manual"
          }
        },
        "type": "object",
        "title": "ShutdownAllCvmsRequest",
        "description": "Request to shutdown all CVMs in a workspace."
      },
      "ShutdownAllCvmsResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total running CVMs found"
          },
          "scheduled": {
            "type": "integer",
            "title": "Scheduled",
            "description": "CVMs scheduled for shutdown"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "description": "CVMs skipped"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ShutdownCvmErrorEntry"
            },
            "type": "array",
            "title": "Errors",
            "description": "CVMs that failed"
          }
        },
        "type": "object",
        "required": [
          "total",
          "scheduled",
          "skipped"
        ],
        "title": "ShutdownAllCvmsResponse",
        "description": "Summary of batch shutdown operation."
      },
      "ShutdownCvmErrorEntry": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id",
            "description": "Internal CVM ID"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "VM UUID"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Error message"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "vm_uuid",
          "error"
        ],
        "title": "ShutdownCvmErrorEntry",
        "description": "Error detail for a single CVM in batch shutdown."
      },
      "ShutdownDeleteAllCvmsRequest": {
        "properties": {
          "confirm_workspace_slug": {
            "type": "string",
            "title": "Confirm Workspace Slug",
            "description": "Workspace slug confirmation"
          },
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "Reason for operation",
            "default": "admin_manual"
          },
          "shutdown_timeout": {
            "type": "integer",
            "maximum": 1200.0,
            "minimum": 10.0,
            "title": "Shutdown Timeout",
            "description": "Graceful shutdown timeout in seconds for this admin bulk operation",
            "default": 300
          }
        },
        "type": "object",
        "required": [
          "confirm_workspace_slug"
        ],
        "title": "ShutdownDeleteAllCvmsRequest",
        "description": "Request to shutdown+delete all CVMs in a workspace."
      },
      "ShutdownDeleteAllCvmsResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total non-deleted CVMs found"
          },
          "scheduled": {
            "type": "integer",
            "title": "Scheduled",
            "description": "CVMs scheduled for remove task"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "description": "CVMs skipped"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ShutdownCvmErrorEntry"
            },
            "type": "array",
            "title": "Errors"
          }
        },
        "type": "object",
        "required": [
          "total",
          "scheduled",
          "skipped"
        ],
        "title": "ShutdownDeleteAllCvmsResponse",
        "description": "Summary of shutdown+delete operation."
      },
      "SpendingComparisonResponse": {
        "properties": {
          "this_month": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MonthlySpending"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_month": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MonthlySpending"
              },
              {
                "type": "null"
              }
            ]
          },
          "change_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Percent"
          }
        },
        "type": "object",
        "required": [
          "this_month",
          "last_month",
          "change_percent"
        ],
        "title": "SpendingComparisonResponse",
        "description": "Spending comparison response."
      },
      "SponsorCreditRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Amount to sponsor (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for sponsoring"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "SponsorCreditRequest",
        "description": "Request model for sponsor credit."
      },
      "SponsorCreditResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "previous_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_balance": {
            "type": "string",
            "format": "decimal",
            "title": "New Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "settled_debt_amount": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settled Debt Amount"
          },
          "remaining_debt": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Debt"
          },
          "settlement_transaction_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^crt_.+",
                "format": "hashid",
                "title": "HashedId[credit_transactions]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "crt_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settlement Transaction Id"
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "previous_balance",
          "new_balance"
        ],
        "title": "SponsorCreditResponse",
        "description": "Response model for sponsor credit."
      },
      "SshKeyCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "description": "Human-readable name for the key"
          },
          "public_key": {
            "type": "string",
            "title": "Public Key",
            "description": "OpenSSH format public key"
          }
        },
        "type": "object",
        "required": [
          "name",
          "public_key"
        ],
        "title": "SshKeyCreateRequest",
        "description": "Request model for creating an SSH key."
      },
      "SshKeyResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Key hashid"
          },
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "Owner user hashid"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Human-readable name"
          },
          "public_key": {
            "type": "string",
            "title": "Public Key",
            "description": "OpenSSH format public key"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint",
            "description": "SHA256 fingerprint"
          },
          "key_type": {
            "type": "string",
            "title": "Key Type",
            "description": "Algorithm (ed25519, rsa, etc)"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "description": "Origin: manual or github"
          },
          "key_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Metadata",
            "description": "Extra data like bit length"
          },
          "last_synced_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced At",
            "description": "Last GitHub sync timestamp"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "name",
          "public_key",
          "fingerprint",
          "key_type",
          "source",
          "created_at",
          "updated_at"
        ],
        "title": "SshKeyResponse",
        "description": "SSH key details returned by API."
      },
      "StatsResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DailyStats"
            },
            "type": "array",
            "title": "Data",
            "description": "List of daily metric snapshots"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "StatsResponse",
        "description": "Wrapper for daily stats list."
      },
      "StatusConnectionItem": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "team_balance": {
            "type": "string",
            "title": "Team Balance"
          },
          "redpill_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redpill Credits"
          },
          "credits_line": {
            "type": "number",
            "title": "Credits Line"
          },
          "needs_recharge": {
            "type": "boolean",
            "title": "Needs Recharge"
          },
          "can_recharge": {
            "type": "boolean",
            "title": "Can Recharge"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "last_checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked At"
          },
          "last_skip_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Skip Reason"
          }
        },
        "type": "object",
        "required": [
          "id",
          "external_id",
          "username",
          "team_name",
          "team_balance",
          "redpill_credits",
          "credits_line",
          "needs_recharge",
          "can_recharge",
          "error"
        ],
        "title": "StatusConnectionItem"
      },
      "StatusCount": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count",
            "default": 0
          },
          "total_gpus": {
            "type": "integer",
            "title": "Total Gpus",
            "default": 0
          }
        },
        "type": "object",
        "title": "StatusCount",
        "description": "Count and GPU total for a given status."
      },
      "StatusResponse": {
        "properties": {
          "total_connections": {
            "type": "integer",
            "title": "Total Connections"
          },
          "healthy": {
            "type": "integer",
            "title": "Healthy"
          },
          "needs_recharge": {
            "type": "integer",
            "title": "Needs Recharge"
          },
          "api_errors": {
            "type": "integer",
            "title": "Api Errors"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/StatusConnectionItem"
            },
            "type": "array",
            "title": "Connections"
          }
        },
        "type": "object",
        "required": [
          "total_connections",
          "healthy",
          "needs_recharge",
          "api_errors",
          "connections"
        ],
        "title": "StatusResponse"
      },
      "StepUpVerifyRequest": {
        "properties": {
          "current_password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Password"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "title": "StepUpVerifyRequest",
        "description": "Generic step-up verification request.\n\nAccepts either current_password (for users without 2FA) or totp_code (for users with 2FA).\nOn success, server will issue a short-lived cookie used by sensitive endpoints."
      },
      "StorageMetrics": {
        "properties": {
          "total_gb_hours": {
            "type": "string",
            "title": "Total Gb Hours",
            "description": "Total GB-hours"
          },
          "estimated_cost": {
            "type": "string",
            "format": "decimal",
            "title": "Estimated Cost",
            "description": "Estimated storage cost",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "total_gb_hours",
          "estimated_cost"
        ],
        "title": "StorageMetrics",
        "description": "Storage usage metrics."
      },
      "StuckCvmOperation": {
        "properties": {
          "cvm_id": {
            "type": "integer",
            "title": "Cvm Id",
            "description": "CVM database ID"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "VM UUID from teepod"
          },
          "cvm_name": {
            "type": "string",
            "title": "Cvm Name",
            "description": "CVM name"
          },
          "operation_type": {
            "type": "string",
            "title": "Operation Type",
            "description": "Operation type (create, stop, etc.)"
          },
          "started_at": {
            "type": "string",
            "title": "Started At",
            "description": "Operation start timestamp (ISO8601)"
          },
          "duration_minutes": {
            "type": "integer",
            "title": "Duration Minutes",
            "description": "Runtime in minutes"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Operation correlation ID"
          },
          "celery_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Celery Task Id",
            "description": "Associated Celery task ID"
          },
          "celery_task_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Celery Task Status",
            "description": "Celery task state"
          }
        },
        "type": "object",
        "required": [
          "cvm_id",
          "vm_uuid",
          "cvm_name",
          "operation_type",
          "started_at",
          "duration_minutes"
        ],
        "title": "StuckCvmOperation",
        "description": "CVM operation that exceeded expected duration."
      },
      "StuckTask": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id",
            "description": "Task ID"
          },
          "task_name": {
            "type": "string",
            "title": "Task Name",
            "description": "Task function name"
          },
          "worker": {
            "type": "string",
            "title": "Worker",
            "description": "Worker executing task"
          },
          "duration": {
            "type": "integer",
            "title": "Duration",
            "description": "Runtime in seconds"
          },
          "args": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Args",
            "description": "Task arguments"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Correlation ID for tracing"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "task_name",
          "worker",
          "duration"
        ],
        "title": "StuckTask",
        "description": "Task running longer than 10 minutes (potentially stuck)."
      },
      "SwitchGpuModeRequest": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "cc",
              "ppcie"
            ],
            "title": "Mode",
            "description": "Target mode: 'cc' or 'ppcie'"
          }
        },
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "SwitchGpuModeRequest",
        "description": "Request to switch GPU mode for all GPUs on a node."
      },
      "SwitchGpuModeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Whether switch completed"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id",
            "description": "Node database ID"
          },
          "node_name": {
            "type": "string",
            "title": "Node Name",
            "description": "Node display name"
          },
          "target_mode": {
            "type": "string",
            "title": "Target Mode",
            "description": "Requested mode"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count",
            "description": "Number of GPUs processed"
          },
          "gpus": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__admin__nodes__schemas__GpuModeInfoOut"
            },
            "type": "array",
            "title": "Gpus",
            "description": "GPU states after switch"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Error if failed"
          },
          "busy_gpus": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__admin__nodes__schemas__BusyGpuInfoOut"
            },
            "type": "array",
            "title": "Busy Gpus",
            "description": "GPUs that blocked switch"
          }
        },
        "type": "object",
        "required": [
          "success",
          "node_id",
          "node_name",
          "target_mode",
          "gpu_count"
        ],
        "title": "SwitchGpuModeResponse",
        "description": "GPU mode switch operation result."
      },
      "SwitchGpusModeRequest": {
        "properties": {
          "gpu_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "minItems": 1,
            "title": "Gpu Ids",
            "description": "GPU database IDs to switch (must all be on same node)"
          },
          "mode": {
            "type": "string",
            "enum": [
              "cc",
              "ppcie"
            ],
            "title": "Mode",
            "description": "Target mode: 'cc' for Confidential Computing, 'ppcie' for Protected PCIe"
          }
        },
        "type": "object",
        "required": [
          "gpu_ids",
          "mode"
        ],
        "title": "SwitchGpusModeRequest",
        "description": "Request to switch GPU mode for reserved GPUs."
      },
      "SwitchGpusModeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Whether mode switch completed"
          },
          "target_mode": {
            "type": "string",
            "title": "Target Mode",
            "description": "Requested mode ('cc' or 'ppcie')"
          },
          "gpu_count": {
            "type": "integer",
            "title": "Gpu Count",
            "description": "Number of GPUs affected"
          },
          "gpus": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__gpus__GpuModeInfoOut"
            },
            "type": "array",
            "title": "Gpus",
            "description": "Updated GPU modes"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Error details if switch failed"
          },
          "busy_gpus": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__gpus__BusyGpuInfoOut"
            },
            "type": "array",
            "title": "Busy Gpus",
            "description": "GPUs that prevented switch"
          }
        },
        "type": "object",
        "required": [
          "success",
          "target_mode",
          "gpu_count"
        ],
        "title": "SwitchGpusModeResponse",
        "description": "Result of GPU mode switch operation."
      },
      "SyncFromStripeRequest": {
        "properties": {
          "overwrite": {
            "type": "boolean",
            "title": "Overwrite",
            "description": "Overwrite existing items with source='stripe_sync'",
            "default": false
          }
        },
        "type": "object",
        "title": "SyncFromStripeRequest",
        "description": "Request to sync items from Stripe."
      },
      "SyncFromStripeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "synced_count": {
            "type": "integer",
            "title": "Synced Count"
          },
          "total_amount": {
            "type": "number",
            "title": "Total Amount"
          }
        },
        "type": "object",
        "required": [
          "success",
          "synced_count",
          "total_amount"
        ],
        "title": "SyncFromStripeResponse",
        "description": "Response for sync from Stripe operation."
      },
      "SyncHardwareResponse": {
        "properties": {
          "node_id": {
            "type": "integer",
            "title": "Node Id"
          },
          "changes": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "object",
            "title": "Changes"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "node_id",
          "changes",
          "message"
        ],
        "title": "SyncHardwareResponse",
        "description": "Response from hardware sync showing before/after values."
      },
      "SyncLogEntry": {
        "properties": {
          "sync_time": {
            "type": "string",
            "format": "date-time",
            "title": "Sync Time"
          },
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "error_message": {
            "type": "string",
            "title": "Error Message"
          },
          "duration_ms": {
            "type": "integer",
            "title": "Duration Ms"
          },
          "teepod_version": {
            "type": "string",
            "title": "Teepod Version"
          }
        },
        "type": "object",
        "required": [
          "sync_time",
          "success",
          "error_message",
          "duration_ms",
          "teepod_version"
        ],
        "title": "SyncLogEntry"
      },
      "SyncMetadataResponse": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "version_before": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version Before"
          },
          "version_after": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version After"
          },
          "gateway_updated": {
            "type": "boolean",
            "title": "Gateway Updated",
            "default": false
          },
          "gateway_changes": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "object",
            "title": "Gateway Changes"
          },
          "kms_synced": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Kms Synced"
          },
          "os_images_total": {
            "type": "integer",
            "title": "Os Images Total",
            "default": 0
          },
          "os_images_added": {
            "type": "integer",
            "title": "Os Images Added",
            "default": 0
          },
          "os_images_enabled": {
            "type": "integer",
            "title": "Os Images Enabled",
            "default": 0
          },
          "os_images_disabled": {
            "type": "integer",
            "title": "Os Images Disabled",
            "default": 0
          },
          "kms_os_images_synced": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Kms Os Images Synced"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors"
          }
        },
        "type": "object",
        "required": [
          "teepod_id"
        ],
        "title": "SyncMetadataResponse",
        "description": "Result of syncing teepod metadata from RPC."
      },
      "SyncedImageOut": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Image slug name"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Semantic version string"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image flag"
          },
          "os_image_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Id",
            "description": "Database ID if stored"
          }
        },
        "type": "object",
        "required": [
          "name",
          "version",
          "is_dev"
        ],
        "title": "SyncedImageOut",
        "description": "OS image sync result item."
      },
      "SystemInfo": {
        "properties": {
          "os_name": {
            "type": "string",
            "title": "Os Name"
          },
          "os_version": {
            "type": "string",
            "title": "Os Version"
          },
          "kernel_version": {
            "type": "string",
            "title": "Kernel Version"
          },
          "cpu_model": {
            "type": "string",
            "title": "Cpu Model"
          },
          "num_cpus": {
            "type": "integer",
            "title": "Num Cpus"
          },
          "total_memory": {
            "type": "integer",
            "title": "Total Memory"
          },
          "available_memory": {
            "type": "integer",
            "title": "Available Memory"
          },
          "used_memory": {
            "type": "integer",
            "title": "Used Memory"
          },
          "free_memory": {
            "type": "integer",
            "title": "Free Memory"
          },
          "total_swap": {
            "type": "integer",
            "title": "Total Swap"
          },
          "used_swap": {
            "type": "integer",
            "title": "Used Swap"
          },
          "free_swap": {
            "type": "integer",
            "title": "Free Swap"
          },
          "uptime": {
            "type": "integer",
            "title": "Uptime"
          },
          "loadavg_one": {
            "type": "integer",
            "title": "Loadavg One"
          },
          "loadavg_five": {
            "type": "integer",
            "title": "Loadavg Five"
          },
          "loadavg_fifteen": {
            "type": "integer",
            "title": "Loadavg Fifteen"
          },
          "disks": {
            "items": {
              "$ref": "#/components/schemas/DiskInfo"
            },
            "type": "array",
            "title": "Disks"
          }
        },
        "type": "object",
        "required": [
          "os_name",
          "os_version",
          "kernel_version",
          "cpu_model",
          "num_cpus",
          "total_memory",
          "available_memory",
          "used_memory",
          "free_memory",
          "total_swap",
          "used_swap",
          "free_swap",
          "uptime",
          "loadavg_one",
          "loadavg_five",
          "loadavg_fifteen",
          "disks"
        ],
        "title": "SystemInfo"
      },
      "TaskInfo": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id",
            "description": "Unique task identifier"
          },
          "task_name": {
            "type": "string",
            "title": "Task Name",
            "description": "Task function name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Task state (PENDING, ACTIVE, SUCCESS, FAILURE)"
          },
          "args": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Args",
            "description": "Positional arguments"
          },
          "kwargs_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kwargs Data",
            "description": "Keyword arguments"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "Task result if completed"
          },
          "traceback": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Traceback",
            "description": "Error traceback if failed"
          },
          "worker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker",
            "description": "Worker executing this task"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Correlation ID for tracing"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "task_name",
          "status"
        ],
        "title": "TaskInfo",
        "description": "Celery task details."
      },
      "TcbEvaluationInstance": {
        "properties": {
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "image_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Version"
          },
          "ppid": {
            "type": "string",
            "title": "Ppid",
            "default": ""
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id"
          },
          "evaluation_update": {
            "type": "string",
            "const": "early",
            "title": "Evaluation Update",
            "default": "early"
          },
          "evaluation_ok": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluation Ok"
          },
          "evaluation_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluation Status"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid",
          "name",
          "instance_id",
          "status",
          "image_version"
        ],
        "title": "TcbEvaluationInstance"
      },
      "TcbEvaluationResponse": {
        "properties": {
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "update": {
            "type": "string",
            "const": "early",
            "title": "Update",
            "default": "early"
          },
          "instances": {
            "items": {
              "$ref": "#/components/schemas/TcbEvaluationInstance"
            },
            "type": "array",
            "title": "Instances"
          }
        },
        "type": "object",
        "required": [
          "app_id",
          "instances"
        ],
        "title": "TcbEvaluationResponse"
      },
      "TcbInfo": {
        "properties": {
          "mrtd": {
            "type": "string",
            "title": "Mrtd"
          },
          "rootfs_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rootfs Hash"
          },
          "rtmr0": {
            "type": "string",
            "title": "Rtmr0"
          },
          "rtmr1": {
            "type": "string",
            "title": "Rtmr1"
          },
          "rtmr2": {
            "type": "string",
            "title": "Rtmr2"
          },
          "rtmr3": {
            "type": "string",
            "title": "Rtmr3"
          },
          "event_log": {
            "items": {
              "$ref": "#/components/schemas/EventLog"
            },
            "type": "array",
            "title": "Event Log"
          },
          "app_compose": {
            "type": "string",
            "title": "App Compose"
          }
        },
        "type": "object",
        "required": [
          "mrtd",
          "rtmr0",
          "rtmr1",
          "rtmr2",
          "rtmr3",
          "event_log",
          "app_compose"
        ],
        "title": "TcbInfo"
      },
      "TeamAccessOut": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Team ID"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name",
            "description": "Team name"
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug",
            "description": "Team slug"
          },
          "team_tier": {
            "type": "string",
            "title": "Team Tier",
            "description": "Team tier"
          },
          "added_at": {
            "type": "string",
            "format": "date-time",
            "title": "Added At",
            "description": "Access granted timestamp"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name",
          "team_tier",
          "added_at"
        ],
        "title": "TeamAccessOut",
        "description": "Team access record for GPU."
      },
      "TeamBase": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "trial_ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Ended At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "tier"
        ],
        "title": "TeamBase"
      },
      "TeamDetail": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "row_id": {
            "type": "integer",
            "title": "Row Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "active",
              "abandoned",
              "suspended"
            ],
            "title": "Billing Status"
          },
          "billing_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Email"
          },
          "hosted_wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hosted Wallet Address"
          },
          "creator": {
            "$ref": "#/components/schemas/CreatorInfo"
          },
          "members_count": {
            "type": "integer",
            "title": "Members Count"
          },
          "dstack_apps_count": {
            "type": "integer",
            "title": "Dstack Apps Count"
          },
          "running_cvms_count": {
            "type": "integer",
            "title": "Running Cvms Count"
          },
          "total_cvms_count": {
            "type": "integer",
            "title": "Total Cvms Count"
          },
          "teepods_count": {
            "type": "integer",
            "title": "Teepods Count"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "title": "Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "granted_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Granted Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "outstanding_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Outstanding Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "unpaid_transactions_count": {
            "type": "integer",
            "title": "Unpaid Transactions Count"
          },
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "stripe_default_payment_method_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Default Payment Method Id"
          },
          "credit_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credit Id"
          },
          "has_redpill": {
            "type": "boolean",
            "title": "Has Redpill",
            "default": false
          },
          "redpill_post_paid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redpill Post Paid"
          },
          "redpill_connection_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redpill Connection Id"
          },
          "flag_network_config_enabled": {
            "type": "boolean",
            "title": "Flag Network Config Enabled",
            "default": false
          },
          "flag_billing_v2_enabled": {
            "type": "boolean",
            "title": "Flag Billing V2 Enabled",
            "default": false
          },
          "billing_mode": {
            "type": "string",
            "title": "Billing Mode",
            "default": "prepaid"
          },
          "auto_topup_enabled": {
            "type": "boolean",
            "title": "Auto Topup Enabled",
            "default": false
          },
          "auto_topup_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Auto Topup Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "default": "0.000000",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "auto_topup_threshold": {
            "type": "string",
            "format": "decimal",
            "title": "Auto Topup Threshold",
            "description": "A monetary value with precise decimal arithmetic",
            "default": "0.000000",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "auto_topup_daily_spend": {
            "type": "string",
            "format": "decimal",
            "title": "Auto Topup Daily Spend",
            "description": "A monetary value with precise decimal arithmetic",
            "default": "0.000000",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "auto_topup_daily_spend_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Topup Daily Spend Date"
          },
          "last_auto_topup_failed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Auto Topup Failed At"
          },
          "post_paid_charge_cap": {
            "type": "string",
            "format": "decimal",
            "title": "Post Paid Charge Cap",
            "description": "A monetary value with precise decimal arithmetic",
            "default": "0.000000",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "post_paid_grace_deadline": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Paid Grace Deadline"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "profile": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProfileGetResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "members_preview": {
            "items": {
              "$ref": "#/components/schemas/MemberPreview"
            },
            "type": "array",
            "title": "Members Preview"
          },
          "dstack_apps_preview": {
            "items": {
              "$ref": "#/components/schemas/DstackAppPreview"
            },
            "type": "array",
            "title": "Dstack Apps Preview"
          },
          "cvms_preview": {
            "items": {
              "$ref": "#/components/schemas/CVMPreview"
            },
            "type": "array",
            "title": "Cvms Preview"
          }
        },
        "type": "object",
        "required": [
          "id",
          "row_id",
          "name",
          "slug",
          "tier",
          "billing_status",
          "billing_email",
          "hosted_wallet_address",
          "creator",
          "members_count",
          "dstack_apps_count",
          "running_cvms_count",
          "total_cvms_count",
          "teepods_count",
          "balance",
          "granted_balance",
          "outstanding_amount",
          "unpaid_transactions_count",
          "is_post_paid",
          "stripe_customer_id",
          "created_at",
          "members_preview",
          "dstack_apps_preview",
          "cvms_preview"
        ],
        "title": "TeamDetail",
        "description": "Comprehensive team information for detail view."
      },
      "TeamInfo": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Team database ID"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Team display name"
          }
        },
        "type": "object",
        "title": "TeamInfo",
        "description": "Team metadata for billing records."
      },
      "TeamListItem": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "row_id": {
            "type": "integer",
            "title": "Row Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "active",
              "abandoned",
              "suspended"
            ],
            "title": "Billing Status"
          },
          "creator": {
            "$ref": "#/components/schemas/CreatorInfo"
          },
          "members_count": {
            "type": "integer",
            "title": "Members Count"
          },
          "dstack_apps_count": {
            "type": "integer",
            "title": "Dstack Apps Count"
          },
          "running_cvms_count": {
            "type": "integer",
            "title": "Running Cvms Count"
          },
          "total_cvms_count": {
            "type": "integer",
            "title": "Total Cvms Count"
          },
          "teepods_count": {
            "type": "integer",
            "title": "Teepods Count"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "title": "Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "granted_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Granted Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "outstanding_amount": {
            "type": "string",
            "format": "decimal",
            "title": "Outstanding Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "ledger_balance": {
            "type": "string",
            "format": "decimal",
            "title": "Ledger Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "has_redpill": {
            "type": "boolean",
            "title": "Has Redpill",
            "default": false
          },
          "redpill_post_paid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redpill Post Paid"
          },
          "redpill_connection_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redpill Connection Id"
          },
          "flag_network_config_enabled": {
            "type": "boolean",
            "title": "Flag Network Config Enabled",
            "default": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "row_id",
          "name",
          "slug",
          "tier",
          "billing_status",
          "creator",
          "members_count",
          "dstack_apps_count",
          "running_cvms_count",
          "total_cvms_count",
          "teepods_count",
          "balance",
          "granted_balance",
          "outstanding_amount",
          "ledger_balance",
          "is_post_paid",
          "stripe_customer_id",
          "created_at"
        ],
        "title": "TeamListItem",
        "description": "Comprehensive team information for list view."
      },
      "TeamSearchResult": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "member_count": {
            "type": "integer",
            "title": "Member Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "creator_id": {
            "type": "integer",
            "title": "Creator Id"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "tier",
          "member_count",
          "created_at",
          "creator_id"
        ],
        "title": "TeamSearchResult",
        "description": "Team search result for admin operations."
      },
      "TeamTier": {
        "type": "string",
        "enum": [
          "PRO",
          "ENTERPRISE",
          "LEVEL_1",
          "LEVEL_2"
        ],
        "title": "TeamTier"
      },
      "TeamUpdate": {
        "properties": {
          "tier": {
            "$ref": "#/components/schemas/TeamTier"
          },
          "trial_ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Ended At"
          }
        },
        "type": "object",
        "required": [
          "tier"
        ],
        "title": "TeamUpdate"
      },
      "TeeType": {
        "type": "integer",
        "enum": [
          0,
          129
        ],
        "title": "TeeType",
        "description": "TEE type values used by Intel DCAP quote header."
      },
      "Teepod": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint"
          },
          "kms_url": {
            "type": "string",
            "title": "Kms Url"
          },
          "kms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Version"
          },
          "tproxy_url": {
            "type": "string",
            "title": "Tproxy Url"
          },
          "tproxy_base_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Base Domain"
          },
          "tproxy_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Port"
          },
          "tproxy_tappd_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Tappd Port"
          },
          "teepod_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Version"
          },
          "status": {
            "$ref": "#/components/schemas/TeepodStatus"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "last_ping_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Ping At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "endpoint",
          "kms_url",
          "tproxy_url",
          "status",
          "enabled",
          "created_at"
        ],
        "title": "Teepod"
      },
      "TeepodAvailableImagesResponse": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Teepod database ID"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name",
            "description": "Teepod display name"
          },
          "total_images": {
            "type": "integer",
            "title": "Total Images",
            "description": "Total images available"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/AvailableImageOut"
            },
            "type": "array",
            "title": "Images",
            "description": "Available images list"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if RPC failed"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "teepod_name",
          "total_images",
          "images"
        ],
        "title": "TeepodAvailableImagesResponse",
        "description": "Available OS images query result."
      },
      "TeepodConnectForm": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id"
          },
          "kms_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Endpoint"
          },
          "tproxy_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Endpoint"
          },
          "tproxy_base_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Base Domain"
          },
          "tproxy_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Port"
          },
          "tproxy_tappd_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Tappd Port"
          },
          "syslog_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Syslog Endpoint"
          },
          "kms_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Name"
          },
          "gateway_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Rpc Url"
          },
          "gateway_admin_rpc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Admin Rpc Url"
          },
          "gateway_domain_suffix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain Suffix"
          },
          "gateway_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Slug"
          },
          "connection_timeout": {
            "type": "number",
            "maximum": 300.0,
            "minimum": 1.0,
            "title": "Connection Timeout",
            "default": 30.0
          },
          "total_timeout": {
            "type": "number",
            "maximum": 600.0,
            "minimum": 10.0,
            "title": "Total Timeout",
            "default": 120.0
          }
        },
        "type": "object",
        "required": [
          "name",
          "endpoint"
        ],
        "title": "TeepodConnectForm"
      },
      "TeepodGpuCreate": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Teepod ID"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id",
            "description": "Node ID"
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "title": "Product Id",
            "description": "GPU product ID"
          },
          "slot": {
            "type": "string",
            "minLength": 1,
            "title": "Slot",
            "description": "PCI slot address"
          },
          "allocation_status": {
            "$ref": "#/components/schemas/GpuAllocationStatus",
            "description": "Initial status",
            "default": "available"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "node_id",
          "product_id",
          "slot"
        ],
        "title": "TeepodGpuCreate",
        "description": "Create GPU request."
      },
      "TeepodGpuDetail": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "GPU ID"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Parent teepod ID"
          },
          "node_id": {
            "type": "integer",
            "title": "Node Id",
            "description": "Host node ID"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "description": "GPU product identifier"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot address"
          },
          "allocation_status": {
            "$ref": "#/components/schemas/GpuAllocationStatus",
            "description": "Allocation status"
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "description": "Optimistic locking version"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "teepod": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuTeepodInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Teepod info"
          },
          "node": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuNodeInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Node info"
          },
          "reserved_team": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuReservedTeamInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserved team"
          },
          "current_allocation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuCurrentAllocation"
              },
              {
                "type": "null"
              }
            ],
            "description": "CVM allocation"
          },
          "device_state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuDeviceState"
              },
              {
                "type": "null"
              }
            ],
            "description": "Real-time device state"
          },
          "sync_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuSyncStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inventory sync status"
          }
        },
        "type": "object",
        "required": [
          "id",
          "teepod_id",
          "node_id",
          "product_id",
          "slot",
          "allocation_status",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "TeepodGpuDetail",
        "description": "GPU with full context and device state."
      },
      "TeepodGpuUpdate": {
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "GPU product ID"
          },
          "slot": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot",
            "description": "PCI slot address"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Node ID"
          },
          "teepod_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Id",
            "description": "Teepod ID"
          }
        },
        "type": "object",
        "title": "TeepodGpuUpdate",
        "description": "Update GPU request."
      },
      "TeepodImageInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev"
          }
        },
        "type": "object",
        "required": [
          "name",
          "version",
          "is_dev"
        ],
        "title": "TeepodImageInfo"
      },
      "TeepodInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "teepod_version_db": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Version Db"
          },
          "teepod_version_real": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Version Real"
          },
          "kms_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Url",
            "description": "KMS URL configured in VMM"
          },
          "kms_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Urls"
          },
          "available_os_images": {
            "items": {
              "$ref": "#/components/schemas/TeepodImageInfo"
            },
            "type": "array",
            "title": "Available Os Images"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "TeepodInfo"
      },
      "TeepodItem": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "added_at": {
            "type": "string",
            "format": "date-time",
            "title": "Added At"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "name",
          "region_identifier",
          "status",
          "added_at"
        ],
        "title": "TeepodItem",
        "description": "Teepod information for workspace teepods list."
      },
      "TeepodKmsRelationCreate": {
        "properties": {
          "kms_id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "KMS hashed ID to associate",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enable the relationship on creation",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "kms_id"
        ],
        "title": "TeepodKmsRelationCreate",
        "description": "Request to create teepod-KMS relationship."
      },
      "TeepodKmsRelationOut": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Teepod database ID"
          },
          "kms_id": {
            "type": "string",
            "pattern": "^kms_.+",
            "format": "hashid",
            "title": "HashedId[kms]",
            "description": "KMS hashed ID",
            "examples": [
              "kms_0123abcd"
            ]
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether this KMS is active for the teepod"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Relationship creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          },
          "kms_endpoint": {
            "type": "string",
            "title": "Kms Endpoint",
            "description": "KMS service endpoint URL"
          },
          "kms_version": {
            "type": "string",
            "title": "Kms Version",
            "description": "KMS protocol version"
          },
          "kms_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Slug",
            "description": "KMS identifier slug"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development mode flag"
          },
          "chain_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain Id",
            "description": "Blockchain chain ID"
          },
          "kms_contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Contract Address",
            "description": "On-chain KMS contract address"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "kms_id",
          "enabled",
          "created_at",
          "updated_at",
          "kms_endpoint",
          "kms_version",
          "is_dev"
        ],
        "title": "TeepodKmsRelationOut",
        "description": "Teepod-KMS relationship with KMS details."
      },
      "TeepodKmsRelationUpdate": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "New enabled state"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "TeepodKmsRelationUpdate",
        "description": "Request to update teepod-KMS relationship."
      },
      "TeepodMeta": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "TeepodMeta"
      },
      "TeepodOSImageRelationCreate": {
        "properties": {
          "os_image_id": {
            "type": "integer",
            "title": "Os Image Id",
            "description": "OS image database ID to associate"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enable the relationship on creation",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "os_image_id"
        ],
        "title": "TeepodOSImageRelationCreate",
        "description": "Request to create teepod-OS image relationship."
      },
      "TeepodOSImageRelationOut": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Teepod database ID"
          },
          "os_image_id": {
            "type": "integer",
            "title": "Os Image Id",
            "description": "OS image database ID"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether this image is active for the teepod"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Relationship creation timestamp"
          },
          "os_image_name": {
            "type": "string",
            "title": "Os Image Name",
            "description": "OS image display name"
          },
          "os_image_slug": {
            "type": "string",
            "title": "Os Image Slug",
            "description": "OS image identifier slug"
          },
          "os_image_version": {
            "type": "string",
            "title": "Os Image Version",
            "description": "Semantic version string"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash",
            "description": "Image content hash"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev",
            "description": "Development image flag"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "os_image_id",
          "enabled",
          "created_at",
          "os_image_name",
          "os_image_slug",
          "os_image_version",
          "is_dev"
        ],
        "title": "TeepodOSImageRelationOut",
        "description": "Teepod-OS image relationship with image details."
      },
      "TeepodOSImageRelationUpdate": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "New enabled state"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "TeepodOSImageRelationUpdate",
        "description": "Request to update teepod-OS image relationship."
      },
      "TeepodOSImageSyncResponse": {
        "properties": {
          "total_images": {
            "type": "integer",
            "title": "Total Images",
            "description": "Total images found on teepod"
          },
          "added_to_db": {
            "type": "integer",
            "title": "Added To Db",
            "description": "New images added to database"
          },
          "enabled_in_db": {
            "type": "integer",
            "title": "Enabled In Db",
            "description": "Images re-enabled"
          },
          "disabled_in_db": {
            "type": "integer",
            "title": "Disabled In Db",
            "description": "Images disabled (not on teepod)"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors",
            "description": "Error messages during sync"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Summary of sync operation"
          },
          "synced_images": {
            "items": {
              "$ref": "#/components/schemas/SyncedImageOut"
            },
            "type": "array",
            "title": "Synced Images",
            "description": "List of synced images"
          }
        },
        "type": "object",
        "required": [
          "total_images",
          "added_to_db",
          "enabled_in_db",
          "disabled_in_db",
          "errors",
          "message"
        ],
        "title": "TeepodOSImageSyncResponse",
        "description": "Result of OS image sync operation."
      },
      "TeepodOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Teepod ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Teepod name"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Teepod RPC endpoint"
          },
          "kms_url": {
            "type": "string",
            "title": "Kms Url",
            "description": "KMS endpoint URL"
          },
          "kms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Version",
            "description": "KMS software version"
          },
          "tproxy_url": {
            "type": "string",
            "title": "Tproxy Url",
            "description": "TProxy endpoint URL"
          },
          "tproxy_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Version",
            "description": "TProxy software version"
          },
          "tproxy_base_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Base Domain",
            "description": "Base domain for TProxy"
          },
          "tproxy_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Port",
            "description": "TProxy port"
          },
          "tproxy_tappd_port": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tproxy Tappd Port",
            "description": "TProxy tappd port"
          },
          "teepod_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Version",
            "description": "Teepod software version"
          },
          "max_cvm_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Cvm Number",
            "description": "Maximum concurrent CVMs"
          },
          "max_allocable_vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Allocable Vcpu",
            "description": "Maximum allocable vCPUs"
          },
          "max_allocable_memory_in_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Allocable Memory In Mb",
            "description": "Maximum allocable memory"
          },
          "max_disk_size_in_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Disk Size In Gb",
            "description": "Maximum disk size"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Teepod status"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether teepod accepts new CVMs"
          },
          "last_ping_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Ping At",
            "description": "Last health check timestamp"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Region code"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id",
            "description": "Physical node ID"
          },
          "node_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Name",
            "description": "Physical node name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "endpoint",
          "kms_url",
          "tproxy_url",
          "status",
          "enabled",
          "created_at"
        ],
        "title": "TeepodOut",
        "description": "Teepod with configuration and status."
      },
      "TeepodResourceUsage": {
        "properties": {
          "total_cvms": {
            "type": "integer",
            "title": "Total Cvms",
            "description": "Total CVMs on teepod",
            "default": 0
          },
          "running_cvms": {
            "type": "integer",
            "title": "Running Cvms",
            "description": "Currently running CVMs",
            "default": 0
          },
          "used_vcpu": {
            "type": "integer",
            "title": "Used Vcpu",
            "description": "Total allocated vCPUs",
            "default": 0
          },
          "used_memory_mb": {
            "type": "integer",
            "title": "Used Memory Mb",
            "description": "Total allocated memory in MB",
            "default": 0
          },
          "used_disk_gb": {
            "type": "integer",
            "title": "Used Disk Gb",
            "description": "Total allocated disk in GB",
            "default": 0
          },
          "running_vcpu": {
            "type": "integer",
            "title": "Running Vcpu",
            "description": "vCPUs used by running CVMs",
            "default": 0
          },
          "running_memory_mb": {
            "type": "integer",
            "title": "Running Memory Mb",
            "description": "Memory used by running CVMs in MB",
            "default": 0
          },
          "running_disk_gb": {
            "type": "integer",
            "title": "Running Disk Gb",
            "description": "Disk used by running CVMs in GB",
            "default": 0
          }
        },
        "type": "object",
        "title": "TeepodResourceUsage",
        "description": "Teepod resource usage aggregated from CVMs."
      },
      "TeepodStatus": {
        "type": "string",
        "enum": [
          "ONLINE",
          "OFFLINE",
          "MAINTENANCE"
        ],
        "title": "TeepodStatus"
      },
      "TeepodTeamAccessCreate": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Team database ID to grant access"
          }
        },
        "type": "object",
        "required": [
          "team_id"
        ],
        "title": "TeepodTeamAccessCreate",
        "description": "Request to grant team access to a teepod."
      },
      "TeepodTeamAccessOut": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id",
            "description": "Team database ID"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name",
            "description": "Team display name"
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug",
            "description": "Team URL slug"
          },
          "team_tier": {
            "type": "string",
            "title": "Team Tier",
            "description": "Team subscription tier"
          },
          "team_creator_id": {
            "type": "integer",
            "title": "Team Creator Id",
            "description": "Team creator user ID"
          },
          "member_count": {
            "type": "integer",
            "title": "Member Count",
            "description": "Number of team members"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Access grant timestamp"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name",
          "team_tier",
          "team_creator_id",
          "member_count",
          "created_at"
        ],
        "title": "TeepodTeamAccessOut",
        "description": "Team access record for a teepod."
      },
      "TeepodUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "node_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Node Id"
          }
        },
        "type": "object",
        "title": "TeepodUpdate"
      },
      "TeepodUptimeResponse": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "days": {
            "type": "integer",
            "title": "Days"
          },
          "total_checks": {
            "type": "integer",
            "title": "Total Checks"
          },
          "successful_checks": {
            "type": "integer",
            "title": "Successful Checks"
          },
          "uptime_percent": {
            "type": "number",
            "title": "Uptime Percent",
            "description": "0.0 - 100.0"
          },
          "avg_duration_ms": {
            "type": "number",
            "title": "Avg Duration Ms"
          },
          "current_streak_hours": {
            "type": "integer",
            "title": "Current Streak Hours",
            "description": "Consecutive hours online up to now"
          },
          "last_online_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Online At"
          },
          "last_offline_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Offline At"
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "days",
          "total_checks",
          "successful_checks",
          "uptime_percent",
          "avg_duration_ms",
          "current_streak_hours",
          "last_online_at",
          "last_offline_at"
        ],
        "title": "TeepodUptimeResponse",
        "description": "Uptime summary over a time window."
      },
      "TeepodWithStats": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Teepod ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Teepod name"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Teepod RPC endpoint"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Teepod status"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether teepod accepts new CVMs"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "teepod_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Version",
            "description": "Teepod software version"
          },
          "total_cvms": {
            "type": "integer",
            "title": "Total Cvms",
            "description": "Total CVMs on this teepod",
            "default": 0
          },
          "running_cvms": {
            "type": "integer",
            "title": "Running Cvms",
            "description": "Running CVMs on this teepod",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "endpoint",
          "status",
          "enabled",
          "created_at"
        ],
        "title": "TeepodWithStats",
        "description": "Teepod with CVM counts for capacity planning."
      },
      "TeescopeBatchRequest": {
        "properties": {
          "vm_uuids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 200,
            "title": "Vm Uuids",
            "description": "VM UUIDs to query (max 200)"
          }
        },
        "type": "object",
        "required": [
          "vm_uuids"
        ],
        "title": "TeescopeBatchRequest"
      },
      "TeescopeBatchResponse": {
        "properties": {
          "items": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CvmTeescopeInfo"
            },
            "type": "object",
            "title": "Items",
            "description": "Teescope data keyed by vm_uuid"
          }
        },
        "type": "object",
        "title": "TeescopeBatchResponse"
      },
      "TelegramConfigResponse": {
        "properties": {
          "chat_id": {
            "type": "string",
            "title": "Chat Id",
            "description": "DevOps chat ID or 'Not configured'"
          },
          "is_configured": {
            "type": "boolean",
            "title": "Is Configured",
            "description": "Both token and chat ID are set"
          },
          "has_token": {
            "type": "boolean",
            "title": "Has Token",
            "description": "Bot token is configured"
          }
        },
        "type": "object",
        "required": [
          "chat_id",
          "is_configured",
          "has_token"
        ],
        "title": "TelegramConfigResponse",
        "description": "Telegram bot configuration status."
      },
      "TierCapacity": {
        "properties": {
          "tier": {
            "$ref": "#/components/schemas/TeamTier"
          },
          "capacity": {
            "$ref": "#/components/schemas/ResourceThreshold"
          },
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__cvms__preflight__TeepodCapacity"
            },
            "type": "array",
            "title": "Nodes"
          },
          "kms_list": {
            "items": {
              "$ref": "#/components/schemas/KmsWithSupportedOSImage"
            },
            "type": "array",
            "title": "Kms List"
          },
          "gpu_availability": {
            "$ref": "#/components/schemas/GpuAvailability"
          }
        },
        "type": "object",
        "required": [
          "tier",
          "capacity",
          "nodes",
          "kms_list"
        ],
        "title": "TierCapacity"
      },
      "ToggleEnabledResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Node ID"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "New enabled state"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "enabled",
          "message"
        ],
        "title": "ToggleEnabledResponse",
        "description": "Response after toggling enabled state."
      },
      "ToggleMaintenanceRequest": {
        "properties": {
          "maintenance": {
            "type": "boolean",
            "title": "Maintenance",
            "description": "Enable or disable maintenance mode"
          }
        },
        "type": "object",
        "required": [
          "maintenance"
        ],
        "title": "ToggleMaintenanceRequest",
        "description": "Request to toggle maintenance mode."
      },
      "ToggleMaintenanceResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Node ID"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "New status"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "message"
        ],
        "title": "ToggleMaintenanceResponse",
        "description": "Response after toggling maintenance mode."
      },
      "TopupRequest": {
        "properties": {
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Amount",
            "description": "USD amount to add"
          }
        },
        "type": "object",
        "required": [
          "amount"
        ],
        "title": "TopupRequest",
        "description": "x402 experiment top-up request."
      },
      "TransferProjectRequest": {
        "properties": {
          "target_team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "Target workspace hash ID (wks_xxx)",
            "examples": [
              "wks_0123abcd"
            ]
          }
        },
        "type": "object",
        "required": [
          "target_team_id"
        ],
        "title": "TransferProjectRequest",
        "description": "Request to transfer a project to another workspace"
      },
      "TransferProjectResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "source_team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "target_team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "transferred_cvms_count": {
            "type": "integer",
            "title": "Transferred Cvms Count"
          }
        },
        "type": "object",
        "required": [
          "message",
          "project_id",
          "source_team_id",
          "target_team_id",
          "transferred_cvms_count"
        ],
        "title": "TransferProjectResponse",
        "description": "Response for project transfer"
      },
      "TwoFactorDisableRequest": {
        "properties": {
          "verification_code": {
            "type": "string",
            "title": "Verification Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "verification_code"
        ],
        "title": "TwoFactorDisableRequest"
      },
      "TwoFactorPageVerifyRequest": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "TwoFactorPageVerifyRequest"
      },
      "TwoFactorRegenerateRequest": {
        "properties": {
          "verification_code": {
            "type": "string",
            "title": "Verification Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "verification_code"
        ],
        "title": "TwoFactorRegenerateRequest"
      },
      "TwoFactorSetupRequest": {
        "properties": {
          "totp_code": {
            "type": "string",
            "title": "Totp Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "totp_code"
        ],
        "title": "TwoFactorSetupRequest"
      },
      "TwoFactorVerificationRequest": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "TwoFactorVerificationRequest"
      },
      "UnifiedKmsOut": {
        "properties": {
          "contracts": {
            "items": {
              "$ref": "#/components/schemas/KmsContractWithNodesOut"
            },
            "type": "array",
            "title": "Contracts",
            "description": "Contracts with nodes"
          },
          "legacy_nodes": {
            "items": {
              "$ref": "#/components/schemas/KmsNodeOut"
            },
            "type": "array",
            "title": "Legacy Nodes",
            "description": "Nodes without contract association"
          },
          "total_contracts": {
            "type": "integer",
            "title": "Total Contracts",
            "description": "Total contract count"
          },
          "total_nodes": {
            "type": "integer",
            "title": "Total Nodes",
            "description": "Total node count"
          }
        },
        "type": "object",
        "required": [
          "contracts",
          "legacy_nodes",
          "total_contracts",
          "total_nodes"
        ],
        "title": "UnifiedKmsOut",
        "description": "Unified view of KMS contracts and nodes."
      },
      "UpdateAllocationStatusRequest": {
        "properties": {
          "allocation_status": {
            "$ref": "#/components/schemas/GpuAllocationStatus",
            "description": "New status"
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "description": "Expected version for optimistic locking"
          }
        },
        "type": "object",
        "required": [
          "allocation_status",
          "version"
        ],
        "title": "UpdateAllocationStatusRequest",
        "description": "Update allocation status with optimistic locking."
      },
      "UpdateAttestationDataRequest": {
        "properties": {
          "fmspc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fmspc",
            "description": "FMSPC attestation identifier"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id",
            "description": "Hardware device identifier"
          },
          "ppid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppid",
            "description": "Platform Provisioning ID"
          }
        },
        "type": "object",
        "title": "UpdateAttestationDataRequest",
        "description": "Request to update node attestation data."
      },
      "UpdateAutoTopupRequest": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "amount": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string",
                "format": "decimal",
                "description": "A monetary value with precise decimal arithmetic",
                "examples": [
                  "19.99",
                  "123.456000"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "UpdateAutoTopupRequest"
      },
      "UpdateBillingSettingsRequest": {
        "properties": {
          "billing_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Email"
          }
        },
        "type": "object",
        "title": "UpdateBillingSettingsRequest"
      },
      "UpdateBillingStatusRequest": {
        "properties": {
          "billing_status": {
            "type": "string",
            "enum": [
              "active",
              "abandoned",
              "suspended"
            ],
            "title": "Billing Status"
          }
        },
        "type": "object",
        "required": [
          "billing_status"
        ],
        "title": "UpdateBillingStatusRequest",
        "description": "Request model for updating workspace billing policy status."
      },
      "UpdateBillingStatusResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "active",
              "abandoned",
              "suspended"
            ],
            "title": "Billing Status"
          }
        },
        "type": "object",
        "required": [
          "message",
          "billing_status"
        ],
        "title": "UpdateBillingStatusResponse"
      },
      "UpdateBillingV2Request": {
        "properties": {
          "flag_billing_v2_enabled": {
            "type": "boolean",
            "title": "Flag Billing V2 Enabled"
          }
        },
        "type": "object",
        "required": [
          "flag_billing_v2_enabled"
        ],
        "title": "UpdateBillingV2Request"
      },
      "UpdateConnectionRequest": {
        "properties": {
          "credits_line": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Credits Line"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^wks_.+",
                "format": "hashid",
                "title": "HashedId[teams]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "wks_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "is_post_paid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Post Paid"
          }
        },
        "type": "object",
        "title": "UpdateConnectionRequest"
      },
      "UpdateCvmRequest": {
        "properties": {
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File",
            "description": "Docker Compose YAML content"
          },
          "pre_launch_script": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script",
            "description": "Shell script executed before containers start"
          },
          "allowed_envs": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Envs",
            "description": "Allowed environment variable names (env_keys)"
          },
          "public_logs": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Logs",
            "description": "Expose container logs publicly"
          },
          "public_sysinfo": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Sysinfo",
            "description": "Expose system info publicly"
          },
          "public_tcbinfo": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Tcbinfo",
            "description": "Expose TCB attestation info publicly"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "Encrypted environment variables as hex string"
          },
          "user_config": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Config",
            "description": "User configuration string"
          },
          "gpus": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "GPU configuration"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu",
            "description": "Number of vCPUs"
          },
          "memory": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory",
            "description": "Memory in MB"
          },
          "disk_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Size",
            "description": "Disk size in MB"
          },
          "image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image",
            "description": "OS image name or slug from available-os-images"
          },
          "shutdown_timeout": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1200.0,
                "minimum": 10.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Shutdown Timeout",
            "description": "Timeout in seconds for graceful shutdown. null means no timeout."
          },
          "allow_force_stop": {
            "type": "boolean",
            "title": "Allow Force Stop",
            "description": "When true, falls back to hard stop if graceful shutdown times out. Use for zombie CVMs that are unresponsive to shutdown signals.",
            "default": false
          }
        },
        "type": "object",
        "title": "UpdateCvmRequest",
        "description": "PATCH request body — all fields optional, only set fields are applied."
      },
      "UpdateDraftInvoiceRequest": {
        "properties": {
          "invoice_type": {
            "type": "string",
            "enum": [
              "local",
              "stripe"
            ],
            "title": "Invoice Type",
            "description": "Invoice channel to use on finalize"
          }
        },
        "type": "object",
        "required": [
          "invoice_type"
        ],
        "title": "UpdateDraftInvoiceRequest",
        "description": "Request to update draft invoice properties before finalize."
      },
      "UpdateDraftInvoiceResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "invoice_id": {
            "type": "string",
            "format": "hashid",
            "title": "Invoice Id",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "0123abcd"
            ]
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "invoice_type": {
            "type": "string",
            "enum": [
              "local",
              "stripe"
            ],
            "title": "Invoice Type"
          }
        },
        "type": "object",
        "required": [
          "success",
          "invoice_id",
          "status",
          "invoice_type"
        ],
        "title": "UpdateDraftInvoiceResponse",
        "description": "Response for updating draft invoice properties."
      },
      "UpdateElizaRequest": {
        "properties": {
          "characterfile": {
            "title": "Characterfile",
            "description": "The characterfile to use for the a16z/eliza."
          },
          "env_keys": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Env Keys",
            "description": "The environment variables to use for the a16z/eliza."
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env",
            "description": "The encrypted environment variables."
          },
          "image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image",
            "description": "The image to use for the a16z/eliza. If not provided, it will use the latest image."
          }
        },
        "type": "object",
        "required": [
          "characterfile",
          "env_keys"
        ],
        "title": "UpdateElizaRequest"
      },
      "UpdateGpuModeRequest": {
        "properties": {
          "cc_mode": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(on|off|devtools)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cc Mode",
            "description": "CC mode: on, off, or devtools"
          },
          "ppcie_mode": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(on|off)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ppcie Mode",
            "description": "PPCIe mode: on/off"
          }
        },
        "type": "object",
        "title": "UpdateGpuModeRequest",
        "description": "Request to update GPU mode."
      },
      "UpdateGpuModeResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Operation success"
          },
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id",
            "description": "GPU ID"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot"
          },
          "previous_cc_mode": {
            "type": "string",
            "title": "Previous Cc Mode",
            "description": "Previous CC mode"
          },
          "previous_ppcie_mode": {
            "type": "string",
            "title": "Previous Ppcie Mode",
            "description": "Previous PPCIe mode"
          },
          "current_cc_mode": {
            "type": "string",
            "title": "Current Cc Mode",
            "description": "Current CC mode"
          },
          "current_ppcie_mode": {
            "type": "string",
            "title": "Current Ppcie Mode",
            "description": "Current PPCIe mode"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Error message if failed"
          }
        },
        "type": "object",
        "required": [
          "success",
          "gpu_id",
          "slot",
          "previous_cc_mode",
          "previous_ppcie_mode",
          "current_cc_mode",
          "current_ppcie_mode"
        ],
        "title": "UpdateGpuModeResponse",
        "description": "GPU mode update result."
      },
      "UpdateInstanceTypeRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Display name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description"
          },
          "vcpu": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Vcpu",
            "description": "vCPU count"
          },
          "memory_mb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 512.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Mb",
            "description": "Memory in MB"
          },
          "hourly_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hourly Rate",
            "description": "Hourly rate in USD"
          },
          "requires_gpu": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Gpu",
            "description": "Requires GPU"
          },
          "requires_gpu_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Gpu Count",
            "description": "GPU count"
          },
          "requires_gpu_cc_mode": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requires Gpu Cc Mode",
            "description": "Requires GPU CC mode"
          },
          "default_disk_size_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 20.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Disk Size Gb",
            "description": "Default disk size (GB)"
          },
          "public": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public",
            "description": "Publicly visible"
          },
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Family",
            "description": "Family (cpu, gpu)"
          },
          "extra_specs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Specs",
            "description": "Extended specs"
          },
          "display_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Order",
            "description": "Sort order"
          },
          "hugepages": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hugepages",
            "description": "Enable hugepages"
          },
          "pin_numa": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pin Numa",
            "description": "Enable NUMA pinning"
          }
        },
        "type": "object",
        "title": "UpdateInstanceTypeRequest",
        "description": "Update instance type request."
      },
      "UpdateInvoiceItemRequest": {
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost",
            "description": "Updated amount (positive or negative)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Updated description"
          },
          "instance_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Name",
            "description": "Updated instance name"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Updated instance type"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region",
            "description": "Updated region"
          }
        },
        "type": "object",
        "title": "UpdateInvoiceItemRequest",
        "description": "Request to update an invoice item."
      },
      "UpdateMaxCvmRequest": {
        "properties": {
          "max_cvm_number": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Max Cvm Number",
            "description": "Maximum CVM slots (TDX keyids)"
          }
        },
        "type": "object",
        "required": [
          "max_cvm_number"
        ],
        "title": "UpdateMaxCvmRequest",
        "description": "Request to update node CVM limit."
      },
      "UpdateMemberRoleRequest": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Role: member or admin"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "UpdateMemberRoleRequest",
        "description": "Request to update a member's role."
      },
      "UpdateNetworkConfigRequest": {
        "properties": {
          "kms_urls": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Urls"
          },
          "gateway_urls": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Urls"
          },
          "restart": {
            "type": "boolean",
            "title": "Restart",
            "description": "Restart the CVM after applying changes to reload configuration.",
            "default": false
          }
        },
        "type": "object",
        "title": "UpdateNetworkConfigRequest",
        "description": "Partial update for KMS/Gateway URLs. Only set fields are applied."
      },
      "UpdatePasswordRequest": {
        "properties": {
          "password": {
            "type": "string",
            "title": "Password"
          },
          "current_password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Password"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "password"
        ],
        "title": "UpdatePasswordRequest"
      },
      "UpdatePaymentModeRequest": {
        "properties": {
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid"
          }
        },
        "type": "object",
        "required": [
          "is_post_paid"
        ],
        "title": "UpdatePaymentModeRequest",
        "description": "Request model for updating payment mode."
      },
      "UpdatePortMappingsRequest": {
        "properties": {
          "ports": {
            "items": {
              "$ref": "#/components/schemas/PortMappingEntry"
            },
            "type": "array",
            "title": "Ports"
          }
        },
        "type": "object",
        "required": [
          "ports"
        ],
        "title": "UpdatePortMappingsRequest",
        "description": "Bulk-replace all port mappings for a CVM."
      },
      "UpdatePostPaidCapRequest": {
        "properties": {
          "charge_cap": {
            "type": "string",
            "format": "decimal",
            "title": "Charge Cap",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "charge_cap"
        ],
        "title": "UpdatePostPaidCapRequest"
      },
      "UpdatePostPaidRequest": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "UpdatePostPaidRequest"
      },
      "UpdateRegionRequest": {
        "properties": {
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Geographic region code"
          }
        },
        "type": "object",
        "title": "UpdateRegionRequest",
        "description": "Request to update node region."
      },
      "UpdateSlugRequest": {
        "properties": {
          "slug": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3,
            "pattern": "^[a-z0-9-]+$",
            "title": "Slug"
          }
        },
        "type": "object",
        "required": [
          "slug"
        ],
        "title": "UpdateSlugRequest",
        "description": "Request model for updating team slug."
      },
      "UpdateUsernameRequest": {
        "properties": {
          "username": {
            "type": "string",
            "title": "Username"
          },
          "current_password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Password"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "username"
        ],
        "title": "UpdateUsernameRequest"
      },
      "UsageAuditResponse": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "method": {
            "type": "string",
            "title": "Method"
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "title": "Period End"
          },
          "summary": {
            "$ref": "#/components/schemas/AuditSummary"
          },
          "cvm_details": {
            "items": {
              "$ref": "#/components/schemas/AuditCvmDetail"
            },
            "type": "array",
            "title": "Cvm Details"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name",
          "method",
          "period_start",
          "period_end",
          "summary",
          "cvm_details"
        ],
        "title": "UsageAuditResponse"
      },
      "UsageDataResponse": {
        "properties": {
          "team_id": {
            "type": "integer",
            "title": "Team Id"
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "period": {
            "$ref": "#/components/schemas/PeriodInfo"
          },
          "core_metrics": {
            "$ref": "#/components/schemas/CoreMetrics"
          },
          "daily_trends": {
            "items": {
              "$ref": "#/components/schemas/DailyTrend"
            },
            "type": "array",
            "title": "Daily Trends"
          },
          "instance_type_breakdown": {
            "items": {
              "$ref": "#/components/schemas/InstanceTypeBreakdown"
            },
            "type": "array",
            "title": "Instance Type Breakdown"
          },
          "cvm_details": {
            "items": {
              "$ref": "#/components/schemas/CVMDetail"
            },
            "type": "array",
            "title": "Cvm Details"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "team_name",
          "period",
          "core_metrics",
          "daily_trends",
          "instance_type_breakdown",
          "cvm_details"
        ],
        "title": "UsageDataResponse",
        "description": "Complete usage data response."
      },
      "User": {
        "properties": {
          "username": {
            "type": "string",
            "title": "Username"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "credit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__models__schemas__users__Credit"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "username",
          "id",
          "role",
          "created_at"
        ],
        "title": "User"
      },
      "UserCreate": {
        "properties": {
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "user"
          }
        },
        "type": "object",
        "required": [
          "username",
          "email",
          "password"
        ],
        "title": "UserCreate"
      },
      "UserInfo": {
        "properties": {
          "username": {
            "type": "string",
            "title": "Username"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "credit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__models__schemas__users__Credit"
              },
              {
                "type": "null"
              }
            ]
          },
          "hash_id": {
            "type": "string",
            "title": "Hash Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "account_verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Verified At"
          },
          "email_verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Verified At"
          },
          "cvm_count": {
            "type": "integer",
            "title": "Cvm Count",
            "default": 0
          },
          "teams": {
            "items": {
              "$ref": "#/components/schemas/TeamBase"
            },
            "type": "array",
            "title": "Teams",
            "default": []
          },
          "credits": {
            "type": "number",
            "title": "Credits",
            "readOnly": true
          },
          "balance": {
            "type": "number",
            "title": "Balance",
            "readOnly": true
          },
          "cvm_credits": {
            "type": "number",
            "title": "Cvm Credits",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "username",
          "id",
          "role",
          "created_at",
          "hash_id",
          "disabled",
          "credits",
          "balance",
          "cvm_credits"
        ],
        "title": "UserInfo"
      },
      "UserRef": {
        "properties": {
          "object_type": {
            "type": "string",
            "const": "user",
            "title": "Object Type",
            "description": "Fixed value 'user'",
            "default": "user"
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^usr_.+",
                "format": "hashid",
                "title": "HashedId[users]",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "usr_0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Hashed user ID"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username",
            "description": "Display username"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "description": "Gravatar or OAuth provider avatar URL"
          }
        },
        "type": "object",
        "title": "UserRef",
        "description": "Minimal user reference for embedding in responses."
      },
      "UserSchema": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "Hashed user ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "username": {
            "type": "string",
            "title": "Username",
            "description": "Username"
          }
        },
        "type": "object",
        "required": [
          "id",
          "username"
        ],
        "title": "UserSchema",
        "description": "Minimal user information for transaction context."
      },
      "UserUpdate": {
        "properties": {
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username"
          },
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          }
        },
        "type": "object",
        "title": "UserUpdate"
      },
      "VM": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "teepod": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeepodMeta"
              },
              {
                "type": "null"
              }
            ]
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "app_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Url"
          },
          "base_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Image"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory": {
            "type": "integer",
            "title": "Memory"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size"
          },
          "manifest_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manifest Version"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "runner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runner"
          },
          "docker_compose_file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose File"
          },
          "features": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Features"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "encrypted_env_pubkey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env Pubkey"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "teepod_id",
          "app_id",
          "vcpu",
          "memory",
          "disk_size",
          "created_at"
        ],
        "title": "VM"
      },
      "VMCreateWithTeepod": {
        "properties": {
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "maxLength": 20,
            "minLength": 4,
            "title": "Name"
          },
          "image": {
            "type": "string",
            "title": "Image"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory": {
            "type": "integer",
            "title": "Memory"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size"
          },
          "compose_manifest": {
            "$ref": "#/components/schemas/ComposeManifest"
          },
          "ports": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PortMapping"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ports"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env"
          },
          "app_id_salt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id Salt"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "listed": {
            "type": "boolean",
            "title": "Listed",
            "default": false
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "env_keys": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Env Keys"
          }
        },
        "type": "object",
        "required": [
          "name",
          "image",
          "vcpu",
          "memory",
          "disk_size",
          "compose_manifest",
          "teepod_id"
        ],
        "title": "VMCreateWithTeepod"
      },
      "ValidateEmailRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "ValidateEmailRequest",
        "description": "Request to validate an email address."
      },
      "ValidateEmailResponse": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "is_valid": {
            "type": "boolean",
            "title": "Is Valid"
          },
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "local_part": {
            "type": "string",
            "title": "Local Part"
          },
          "rejection_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejection Reason"
          },
          "reacherhq_report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CheckEmailResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "email",
          "is_valid",
          "domain",
          "local_part"
        ],
        "title": "ValidateEmailResponse",
        "description": "Email validation result with rejection details."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VerificationAttemptOut": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug",
            "description": "Workspace slug from team"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email",
            "description": "Email of the verifying user"
          },
          "payment_method_id": {
            "type": "string",
            "title": "Payment Method Id",
            "description": "Stripe payment method ID"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "pending, verified, failed, or cancelled"
          },
          "is_duplicate": {
            "type": "boolean",
            "title": "Is Duplicate",
            "description": "Whether this attempt was flagged as duplicate"
          },
          "last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last4",
            "description": "Last 4 digits of the card"
          },
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand",
            "description": "Card brand (visa, mastercard, etc.)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "team_id",
          "payment_method_id",
          "status",
          "is_duplicate",
          "created_at"
        ],
        "title": "VerificationAttemptOut",
        "description": "Single Stripe card verification attempt."
      },
      "VerificationResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Quote checksum identifier"
          },
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Verification passed"
          },
          "proof_of_cloud": {
            "type": "boolean",
            "title": "Proof Of Cloud",
            "description": "Quote from Phala Cloud TEE"
          },
          "quote": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Quote"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parsed quote structure"
          },
          "checksum": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum",
            "description": "SHA256 of quote bytes"
          },
          "can_download": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Can Download",
            "description": "Raw quote downloadable"
          },
          "uploaded_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uploaded At",
            "description": "ISO8601 upload timestamp"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At",
            "description": "ISO8601 timestamp when verified was computed"
          },
          "quote_collateral": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QuoteCollateralV3"
              },
              {
                "type": "null"
              }
            ],
            "description": "TCB collateral data"
          },
          "node_provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeProvider"
              },
              {
                "type": "null"
              }
            ],
            "description": "Node provider info"
          }
        },
        "type": "object",
        "required": [
          "id",
          "success",
          "proof_of_cloud"
        ],
        "title": "VerificationResponse",
        "description": "Quote verification result."
      },
      "VerifyAndLinkOAuthRequest": {
        "properties": {
          "link_token": {
            "type": "string",
            "title": "Link Token"
          },
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "totp_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Totp Code"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "link_token"
        ],
        "title": "VerifyAndLinkOAuthRequest",
        "description": "Request to verify password/2FA and link OAuth account during Link-on-Login flow."
      },
      "VmConfiguration": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "image": {
            "type": "string",
            "title": "Image"
          },
          "compose_file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppComposeV2"
              },
              {
                "type": "null"
              }
            ]
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory": {
            "type": "integer",
            "title": "Memory"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size"
          },
          "ports": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PortMapping"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ports"
          },
          "encrypted_env": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "user_config": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Config"
          },
          "hugepages": {
            "type": "boolean",
            "title": "Hugepages",
            "default": false
          },
          "pin_numa": {
            "type": "boolean",
            "title": "Pin Numa",
            "default": false
          },
          "gpus": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GpuConfig"
              },
              {
                "type": "null"
              }
            ],
            "default": {
              "gpus": [],
              "attach_mode": "listed"
            }
          },
          "kms_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms Urls",
            "default": []
          },
          "gateway_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Gateway Urls",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "name",
          "image",
          "vcpu",
          "memory",
          "disk_size"
        ],
        "title": "VmConfiguration",
        "description": "Mapping from Teepod RPC's VmConfiguration."
      },
      "VmInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "uptime": {
            "type": "string",
            "title": "Uptime"
          },
          "app_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Url"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VmConfiguration"
              },
              {
                "type": "null"
              }
            ]
          },
          "exited_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exited At"
          },
          "boot_progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boot Progress"
          },
          "boot_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boot Error"
          },
          "shutdown_progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shutdown Progress"
          },
          "image_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Version"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/GuestEvent"
            },
            "type": "array",
            "title": "Events"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "uptime",
          "app_id"
        ],
        "title": "VmInfo",
        "description": "Mapping from Teepod RPC's VmInfo."
      },
      "VoidBatchItemRequest": {
        "properties": {
          "invoice_id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          }
        },
        "type": "object",
        "required": [
          "invoice_id"
        ],
        "title": "VoidBatchItemRequest"
      },
      "VoidBatchItemResult": {
        "properties": {
          "invoice_id": {
            "type": "string",
            "pattern": "^in_.+",
            "format": "hashid",
            "title": "HashedId[invoices]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "in_0123abcd"
            ]
          },
          "ok": {
            "type": "boolean",
            "title": "Ok"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "invoice_id",
          "ok"
        ],
        "title": "VoidBatchItemResult"
      },
      "VoidBatchRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VoidBatchItemRequest"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "VoidBatchRequest"
      },
      "VoidBatchResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "succeeded": {
            "type": "integer",
            "title": "Succeeded"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/VoidBatchItemResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "total",
          "succeeded",
          "failed",
          "results"
        ],
        "title": "VoidBatchResponse"
      },
      "WebhookCreateRequest": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Events"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          }
        },
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreateRequest"
      },
      "WebhookDeliveryResponse": {
        "properties": {
          "snowflake_id": {
            "type": "integer",
            "title": "Snowflake Id"
          },
          "event_id": {
            "type": "string",
            "title": "Event Id"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "attempts": {
            "type": "integer",
            "title": "Attempts"
          },
          "request_url": {
            "type": "string",
            "title": "Request Url"
          },
          "response_status": {
            "type": "integer",
            "title": "Response Status"
          },
          "error_message": {
            "type": "string",
            "title": "Error Message"
          },
          "duration_ms": {
            "type": "integer",
            "title": "Duration Ms",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "original_event_id": {
            "type": "string",
            "title": "Original Event Id",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "snowflake_id",
          "event_id",
          "event_type",
          "status",
          "attempts",
          "request_url",
          "response_status",
          "error_message",
          "created_at"
        ],
        "title": "WebhookDeliveryResponse"
      },
      "WebhookResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Events"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "events",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookResponse"
      },
      "WebhookStatsResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "success_count": {
            "type": "integer",
            "title": "Success Count"
          },
          "failed_count": {
            "type": "integer",
            "title": "Failed Count"
          },
          "success_rate": {
            "type": "number",
            "title": "Success Rate"
          },
          "avg_duration_ms": {
            "type": "integer",
            "title": "Avg Duration Ms"
          },
          "max_duration_ms": {
            "type": "integer",
            "title": "Max Duration Ms"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          }
        },
        "type": "object",
        "required": [
          "total",
          "success_count",
          "failed_count",
          "success_rate",
          "avg_duration_ms",
          "max_duration_ms"
        ],
        "title": "WebhookStatsResponse"
      },
      "WebhookUpdateRequest": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "type": "object",
        "title": "WebhookUpdateRequest"
      },
      "WindowReorderRequest": {
        "properties": {
          "ordered_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Ordered Ids",
            "description": "IDs in new order"
          },
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Family",
            "description": "Family filter for reordering"
          }
        },
        "type": "object",
        "required": [
          "ordered_ids"
        ],
        "title": "WindowReorderRequest",
        "description": "Reorder instance types request."
      },
      "WorkerInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Worker hostname@pid"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Worker status"
          },
          "active_tasks": {
            "type": "integer",
            "title": "Active Tasks",
            "description": "Currently executing tasks"
          },
          "processed_tasks": {
            "type": "integer",
            "title": "Processed Tasks",
            "description": "Total completed tasks"
          },
          "queues": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Queues",
            "description": "Queues this worker consumes"
          }
        },
        "type": "object",
        "required": [
          "name",
          "status",
          "active_tasks",
          "processed_tasks",
          "queues"
        ],
        "title": "WorkerInfo",
        "description": "Celery worker information."
      },
      "WorkspaceQuotas": {
        "properties": {
          "vm_slots": {
            "$ref": "#/components/schemas/QuotaMetric"
          },
          "vcpu": {
            "$ref": "#/components/schemas/QuotaMetric"
          },
          "memory_mb": {
            "$ref": "#/components/schemas/QuotaMetric"
          },
          "disk_gb": {
            "$ref": "#/components/schemas/QuotaMetric"
          }
        },
        "type": "object",
        "required": [
          "vm_slots",
          "vcpu",
          "memory_mb",
          "disk_gb"
        ],
        "title": "WorkspaceQuotas"
      },
      "WorkspaceQuotasResponse": {
        "properties": {
          "team_slug": {
            "type": "string",
            "title": "Team Slug"
          },
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "quotas": {
            "$ref": "#/components/schemas/WorkspaceQuotas"
          },
          "reserved_nodes": {
            "$ref": "#/components/schemas/QuotaMetric"
          },
          "reserved_gpu": {
            "$ref": "#/components/schemas/WorkspaceReservedGpuQuota"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "title": "As Of"
          }
        },
        "type": "object",
        "required": [
          "team_slug",
          "tier",
          "quotas",
          "reserved_nodes",
          "reserved_gpu",
          "as_of"
        ],
        "title": "WorkspaceQuotasResponse"
      },
      "WorkspaceRef": {
        "properties": {
          "object_type": {
            "type": "string",
            "const": "workspace",
            "title": "Object Type",
            "description": "Fixed value 'workspace'",
            "default": "workspace"
          },
          "id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "Hashed workspace ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Workspace display name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "URL-safe workspace identifier"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url",
            "description": "Workspace avatar URL from profile"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "WorkspaceRef",
        "description": "Minimal workspace reference for embedding in responses."
      },
      "WorkspaceReservedGpuQuota": {
        "properties": {
          "gpus": {
            "$ref": "#/components/schemas/QuotaMetric"
          },
          "in_use": {
            "type": "integer",
            "title": "In Use",
            "default": 0
          },
          "misconfigured": {
            "type": "integer",
            "title": "Misconfigured",
            "description": "Reserved GPU records for this workspace that are NOT on its reserved nodes",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "gpus"
        ],
        "title": "WorkspaceReservedGpuQuota"
      },
      "WorkspaceResolveResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Canonical workspace hash ID (wks_xxx)"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "WorkspaceResolveResponse"
      },
      "WorkspaceResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "Workspace ID (hashid)",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Workspace display name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug",
            "description": "URL-friendly identifier"
          },
          "tier": {
            "type": "string",
            "title": "Tier",
            "description": "Billing tier (free, pro, enterprise)"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "description": "User's role in workspace (owner, admin, member)"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Whether this workspace is the user's default"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Workspace creation timestamp"
          },
          "confidential_models_enabled": {
            "type": "boolean",
            "title": "Confidential Models Enabled",
            "description": "Whether Confidential Models (Redpill) is enabled",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "tier",
          "role",
          "is_default",
          "created_at"
        ],
        "title": "WorkspaceResponse",
        "description": "Workspace details with user role."
      },
      "WorkspaceUsageItem": {
        "properties": {
          "connection_id": {
            "type": "integer",
            "title": "Connection Id"
          },
          "team_id": {
            "type": "string",
            "pattern": "^wks_.+",
            "format": "hashid",
            "title": "HashedId[teams]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "wks_0123abcd"
            ]
          },
          "team_name": {
            "type": "string",
            "title": "Team Name"
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "is_post_paid": {
            "type": "boolean",
            "title": "Is Post Paid",
            "default": false
          },
          "total_requests": {
            "type": "integer",
            "title": "Total Requests",
            "default": 0
          },
          "total_input_tokens": {
            "type": "integer",
            "title": "Total Input Tokens",
            "default": 0
          },
          "total_output_tokens": {
            "type": "integer",
            "title": "Total Output Tokens",
            "default": 0
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens",
            "default": 0
          },
          "total_cost_usd": {
            "type": "number",
            "title": "Total Cost Usd",
            "default": 0.0
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period Start"
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "connection_id",
          "team_id",
          "team_name",
          "user_id",
          "username",
          "external_id"
        ],
        "title": "WorkspaceUsageItem"
      },
      "WorkspaceUsageListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceUsageItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "WorkspaceUsageListResponse"
      },
      "WorkspacesListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceResponse"
            },
            "type": "array",
            "title": "Data",
            "description": "Workspace records"
          },
          "pagination": {
            "$ref": "#/components/schemas/teehouse__api__routes__workspace__PaginationMetadata",
            "description": "Pagination info"
          }
        },
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "title": "WorkspacesListResponse",
        "description": "Paginated list of user workspaces."
      },
      "WrappedChangeEmailRequest": {
        "properties": {
          "request": {
            "$ref": "#/components/schemas/ChangeEmailPayload"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "request"
        ],
        "title": "WrappedChangeEmailRequest",
        "description": "Wrapped request format from frontend API route"
      },
      "WrappedEmailVerificationRequest": {
        "properties": {
          "request": {
            "$ref": "#/components/schemas/EmailVerificationPayload"
          },
          "site_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site Key"
          }
        },
        "type": "object",
        "required": [
          "request"
        ],
        "title": "WrappedEmailVerificationRequest",
        "description": "Wrapped request format from frontend API route"
      },
      "WriteOffDebtRequest": {
        "properties": {
          "amount": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string"
              }
            ],
            "title": "Amount",
            "description": "Write-off amount (must be positive)"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "title": "Reason",
            "description": "Reason for write-off (required for audit)"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional custom description (defaults to 'Debt write-off')"
          }
        },
        "type": "object",
        "required": [
          "amount",
          "reason"
        ],
        "title": "WriteOffDebtRequest",
        "description": "Request model for debt write-off."
      },
      "WriteOffDebtResponse": {
        "properties": {
          "transaction_id": {
            "type": "string",
            "pattern": "^crt_.+",
            "format": "hashid",
            "title": "HashedId[credit_transactions]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crt_0123abcd"
            ]
          },
          "amount": {
            "type": "string",
            "format": "decimal",
            "title": "Amount",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "previous_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "Previous Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "new_outstanding": {
            "type": "string",
            "format": "decimal",
            "title": "New Outstanding",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "previous_outstanding",
          "new_outstanding"
        ],
        "title": "WriteOffDebtResponse",
        "description": "Response model for debt write-off."
      },
      "ZombieWorkerInfo": {
        "properties": {
          "queue_name": {
            "type": "string",
            "title": "Queue Name",
            "description": "Affected queue"
          },
          "issue_type": {
            "type": "string",
            "title": "Issue Type",
            "description": "no_celery_response or stuck_task"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Human-readable issue description"
          },
          "rabbitmq_consumers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rabbitmq Consumers",
            "description": "RabbitMQ consumer count"
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Id",
            "description": "Stuck task ID if applicable"
          },
          "task_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Name",
            "description": "Stuck task name if applicable"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds",
            "description": "Task runtime in seconds"
          }
        },
        "type": "object",
        "required": [
          "queue_name",
          "issue_type",
          "description"
        ],
        "title": "ZombieWorkerInfo",
        "description": "Worker that has RabbitMQ connection but does not respond to Celery."
      },
      "teehouse__api__routes__admin__credits__PaginatedCreditTransactions": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ExtendedCreditTransaction"
            },
            "type": "array",
            "title": "Items",
            "description": "Transaction list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching records"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Records per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total pages"
          },
          "total_amount": {
            "type": "number",
            "title": "Total Amount",
            "description": "Sum of transaction amounts"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages",
          "total_amount"
        ],
        "title": "PaginatedCreditTransactions",
        "description": "Paginated credit transactions response."
      },
      "teehouse__api__routes__admin__cvms__OrderByField": {
        "type": "string",
        "enum": [
          "created_at",
          "vcpu",
          "memory",
          "disk_size"
        ],
        "title": "OrderByField",
        "description": "Fields for CVM ordering in list queries."
      },
      "teehouse__api__routes__admin__invoices__PaginatedInvoices": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InvoiceWithRelations"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PaginatedInvoices"
      },
      "teehouse__api__routes__admin__nodes__schemas__BusyGpuInfoOut": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "GPU PCIe slot identifier"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "VM using this GPU"
          },
          "vfio_pids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Vfio Pids",
            "description": "Processes holding VFIO"
          }
        },
        "type": "object",
        "required": [
          "slot"
        ],
        "title": "BusyGpuInfoOut",
        "description": "GPU that blocked mode switch due to active usage."
      },
      "teehouse__api__routes__admin__nodes__schemas__GpuModeInfoOut": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "GPU PCIe slot identifier"
          },
          "cc_mode": {
            "type": "string",
            "title": "Cc Mode",
            "description": "Confidential Computing mode state"
          },
          "ppcie_mode": {
            "type": "string",
            "title": "Ppcie Mode",
            "description": "Protected PCIe mode state"
          }
        },
        "type": "object",
        "required": [
          "slot",
          "cc_mode",
          "ppcie_mode"
        ],
        "title": "GpuModeInfoOut",
        "description": "GPU mode state after switch."
      },
      "teehouse__api__routes__admin__nodes__schemas__NodeResourceUsage": {
        "properties": {
          "used_vcpu": {
            "type": "number",
            "title": "Used Vcpu",
            "description": "Allocated vCPUs"
          },
          "used_memory_mb": {
            "type": "number",
            "title": "Used Memory Mb",
            "description": "Allocated memory in MB"
          },
          "used_disk_gb": {
            "type": "number",
            "title": "Used Disk Gb",
            "description": "Allocated disk in GB"
          },
          "used_cvm_slots": {
            "type": "integer",
            "title": "Used Cvm Slots",
            "description": "Occupied CVM slots"
          },
          "available_vcpu": {
            "type": "number",
            "title": "Available Vcpu",
            "description": "Remaining vCPUs"
          },
          "available_memory_mb": {
            "type": "number",
            "title": "Available Memory Mb",
            "description": "Remaining memory in MB"
          },
          "available_disk_gb": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Available Disk Gb",
            "description": "Remaining disk in GB"
          },
          "available_cvm_slots": {
            "type": "integer",
            "title": "Available Cvm Slots",
            "description": "Available CVM slots"
          },
          "vcpu_utilization_percent": {
            "type": "number",
            "title": "Vcpu Utilization Percent",
            "description": "vCPU utilization percentage"
          },
          "memory_utilization_percent": {
            "type": "number",
            "title": "Memory Utilization Percent",
            "description": "Memory utilization percentage"
          },
          "disk_utilization_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Utilization Percent",
            "description": "Disk utilization percentage"
          },
          "slot_utilization_percent": {
            "type": "number",
            "title": "Slot Utilization Percent",
            "description": "CVM slot utilization percentage"
          }
        },
        "type": "object",
        "required": [
          "used_vcpu",
          "used_memory_mb",
          "used_disk_gb",
          "used_cvm_slots",
          "available_vcpu",
          "available_memory_mb",
          "available_disk_gb",
          "available_cvm_slots",
          "vcpu_utilization_percent",
          "memory_utilization_percent",
          "disk_utilization_percent",
          "slot_utilization_percent"
        ],
        "title": "NodeResourceUsage",
        "description": "Node resource utilization statistics."
      },
      "teehouse__api__routes__admin__nodes__schemas__TeepodCapacity": {
        "properties": {
          "max_cvm_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Cvm Number",
            "description": "Maximum CVM slots"
          },
          "max_allocable_vcpu": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Allocable Vcpu",
            "description": "Maximum allocable vCPUs"
          },
          "max_allocable_memory_in_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Allocable Memory In Mb",
            "description": "Maximum allocable memory in MB"
          },
          "max_disk_size_in_gb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Disk Size In Gb",
            "description": "Maximum disk capacity in GB"
          }
        },
        "type": "object",
        "title": "TeepodCapacity",
        "description": "Teepod capacity derived from underlying Node."
      },
      "teehouse__api__routes__admin__physical_nodes__NodeResourceUsage": {
        "properties": {
          "used_vcpu": {
            "type": "number",
            "title": "Used Vcpu",
            "description": "Allocated vCPU (running at full, others at 5%)"
          },
          "used_memory_mb": {
            "type": "number",
            "title": "Used Memory Mb",
            "description": "Allocated memory in MB"
          },
          "used_disk_gb": {
            "type": "number",
            "title": "Used Disk Gb",
            "description": "Allocated disk in GB"
          },
          "used_cvm_slots": {
            "type": "integer",
            "title": "Used Cvm Slots",
            "description": "TDX key IDs consumed by running CVMs"
          },
          "available_vcpu": {
            "type": "number",
            "title": "Available Vcpu",
            "description": "Remaining allocable vCPU"
          },
          "available_memory_mb": {
            "type": "number",
            "title": "Available Memory Mb",
            "description": "Remaining memory in MB"
          },
          "available_disk_gb": {
            "type": "number",
            "title": "Available Disk Gb",
            "description": "Remaining disk in GB"
          },
          "available_cvm_slots": {
            "type": "integer",
            "title": "Available Cvm Slots",
            "description": "Remaining TDX key IDs"
          },
          "vcpu_utilization_percent": {
            "type": "number",
            "title": "Vcpu Utilization Percent",
            "description": "vCPU usage percentage"
          },
          "memory_utilization_percent": {
            "type": "number",
            "title": "Memory Utilization Percent",
            "description": "Memory usage percentage"
          },
          "disk_utilization_percent": {
            "type": "number",
            "title": "Disk Utilization Percent",
            "description": "Disk usage percentage"
          },
          "slot_utilization_percent": {
            "type": "number",
            "title": "Slot Utilization Percent",
            "description": "TDX slot usage percentage"
          }
        },
        "type": "object",
        "required": [
          "used_vcpu",
          "used_memory_mb",
          "used_disk_gb",
          "used_cvm_slots",
          "available_vcpu",
          "available_memory_mb",
          "available_disk_gb",
          "available_cvm_slots",
          "vcpu_utilization_percent",
          "memory_utilization_percent",
          "disk_utilization_percent",
          "slot_utilization_percent"
        ],
        "title": "NodeResourceUsage",
        "description": "Node resource usage calculated from running CVMs."
      },
      "teehouse__api__routes__admin__users__OrderByField": {
        "type": "string",
        "enum": [
          "created_at"
        ],
        "title": "OrderByField",
        "description": "Valid fields for ordering users."
      },
      "teehouse__api__routes__admin__workspaces__BillingSummaryResponse": {
        "properties": {
          "promotion_redemptions_total": {
            "type": "string",
            "format": "decimal",
            "title": "Promotion Redemptions Total",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "promotion_redemptions_count": {
            "type": "integer",
            "title": "Promotion Redemptions Count"
          },
          "paid_orders_total": {
            "type": "string",
            "format": "decimal",
            "title": "Paid Orders Total",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          },
          "paid_orders_count": {
            "type": "integer",
            "title": "Paid Orders Count"
          },
          "monthly_transactions": {
            "items": {
              "$ref": "#/components/schemas/MonthlyTransactionSummaryItem"
            },
            "type": "array",
            "title": "Monthly Transactions"
          },
          "monthly_usages": {
            "items": {
              "$ref": "#/components/schemas/MonthlyUsageSummaryItem"
            },
            "type": "array",
            "title": "Monthly Usages"
          },
          "monthly_invoices": {
            "items": {
              "$ref": "#/components/schemas/MonthlyInvoiceSummaryItem"
            },
            "type": "array",
            "title": "Monthly Invoices"
          }
        },
        "type": "object",
        "required": [
          "promotion_redemptions_total",
          "promotion_redemptions_count",
          "paid_orders_total",
          "paid_orders_count",
          "monthly_transactions",
          "monthly_usages",
          "monthly_invoices"
        ],
        "title": "BillingSummaryResponse",
        "description": "Billing summary for reconciliation."
      },
      "teehouse__api__routes__admin__workspaces__DailyUsageResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DailyUsageItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "DailyUsageResponse",
        "description": "Daily usage response with list of daily items."
      },
      "teehouse__api__routes__admin__workspaces__PaginatedCreditTransactions": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditTransactionItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedCreditTransactions",
        "description": "Paginated response for credit transactions list."
      },
      "teehouse__api__routes__admin__workspaces__PaginatedInvoices": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InvoiceItem"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedInvoices",
        "description": "Paginated response for invoices list."
      },
      "teehouse__api__routes__admin__workspaces__PaginatedTeamMembers": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__admin__workspaces__TeamMemberInfo"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedTeamMembers",
        "description": "Paginated response for team members list."
      },
      "teehouse__api__routes__admin__workspaces__TeamMemberInfo": {
        "properties": {
          "user_id": {
            "type": "string",
            "pattern": "^usr_.+",
            "format": "hashid",
            "title": "HashedId[users]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "usr_0123abcd"
            ]
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "title": "Joined At"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "username",
          "email",
          "role",
          "joined_at"
        ],
        "title": "TeamMemberInfo",
        "description": "Team member information."
      },
      "teehouse__api__routes__apps__schemas__InstanceEventResponse": {
        "properties": {
          "message_id": {
            "type": "string",
            "title": "Message Id",
            "description": "Unique event identifier"
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Request correlation ID"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Event type: created, started, stopped, etc."
          },
          "operation_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Type",
            "description": "Operation that triggered the event"
          },
          "target_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target State",
            "description": "Intended state after operation"
          },
          "operation_payload": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Payload",
            "description": "JSON operation parameters"
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By",
            "description": "User ID who triggered the event"
          },
          "instance_id": {
            "type": "string",
            "title": "Instance Id",
            "description": "CVM instance UUID"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "Event timestamp (ISO 8601)"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority",
            "description": "Event priority level"
          },
          "instance_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Name",
            "description": "CVM display name"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State",
            "description": "CVM state at event time"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type identifier"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Project database ID"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id",
            "description": "Team database ID"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id",
            "description": "Owner user ID"
          }
        },
        "type": "object",
        "required": [
          "message_id",
          "correlation_id",
          "event_type",
          "operation_type",
          "target_state",
          "operation_payload",
          "triggered_by",
          "instance_id",
          "timestamp",
          "priority",
          "instance_name",
          "state",
          "instance_type",
          "project_id",
          "team_id",
          "user_id"
        ],
        "title": "InstanceEventResponse",
        "description": "CVM instance lifecycle event."
      },
      "teehouse__api__routes__apps__v20251028__schemas__CvmBasicInfo": {
        "properties": {
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "default": ""
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu"
          },
          "memory": {
            "type": "integer",
            "title": "Memory"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          },
          "kms_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Type"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type"
          },
          "listed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Listed"
          },
          "base_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Image"
          },
          "kms_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Slug"
          },
          "kms_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kms Id"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "machine_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MachineInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid",
          "app_id",
          "status",
          "vcpu",
          "memory",
          "disk_size",
          "teepod_id",
          "teepod_name",
          "region_identifier",
          "kms_type",
          "instance_type"
        ],
        "title": "CvmBasicInfo"
      },
      "teehouse__api__routes__apps__v20251028__schemas__DstackAppFullResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "app_provision_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Provision Type"
          },
          "app_icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Icon Url"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "kms_type": {
            "type": "string",
            "title": "Kms Type"
          },
          "profile": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProfileGetResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_cvm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__api__routes__apps__v20251028__schemas__CvmBasicInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "cvms": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__apps__v20251028__schemas__CvmBasicInfo"
            },
            "type": "array",
            "title": "Cvms"
          },
          "cvm_count": {
            "type": "integer",
            "title": "Cvm Count",
            "default": 0
          },
          "team_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Slug"
          },
          "team_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "app_id",
          "created_at",
          "kms_type"
        ],
        "title": "DstackAppFullResponse"
      },
      "teehouse__api__routes__apps__v20251028__schemas__DstackAppListResponse": {
        "properties": {
          "dstack_apps": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/teehouse__api__routes__apps__v20251028__schemas__DstackAppFullResponse"
                },
                {
                  "$ref": "#/components/schemas/DstackAppMinimalResponse"
                }
              ]
            },
            "type": "array",
            "title": "Dstack Apps"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "total_pages": {
            "type": "integer",
            "title": "Total Pages"
          }
        },
        "type": "object",
        "required": [
          "dstack_apps",
          "page",
          "page_size",
          "total",
          "total_pages"
        ],
        "title": "DstackAppListResponse"
      },
      "teehouse__api__routes__apps__v20260121__schemas__DstackAppFullResponse": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^prj_.+",
            "format": "hashid",
            "title": "HashedId[projects]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "prj_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_id": {
            "type": "string",
            "title": "App Id"
          },
          "app_provision_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Provision Type"
          },
          "app_icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Icon Url"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "kms_type": {
            "type": "string",
            "title": "Kms Type"
          },
          "profile": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProfileGetResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_cvm": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/teehouse__api__routes__cvms__v20260121__schemas__CVMInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "cvms": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__cvms__v20260121__schemas__CVMInfo"
            },
            "type": "array",
            "title": "Cvms"
          },
          "cvm_count": {
            "type": "integer",
            "title": "Cvm Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "app_id",
          "created_at",
          "kms_type"
        ],
        "title": "DstackAppFullResponse"
      },
      "teehouse__api__routes__apps__v20260121__schemas__DstackAppListResponse": {
        "properties": {
          "dstack_apps": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/teehouse__api__routes__apps__v20260121__schemas__DstackAppFullResponse"
                },
                {
                  "$ref": "#/components/schemas/DstackAppMinimalResponse"
                }
              ]
            },
            "type": "array",
            "title": "Dstack Apps"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "total_pages": {
            "type": "integer",
            "title": "Total Pages"
          }
        },
        "type": "object",
        "required": [
          "dstack_apps",
          "page",
          "page_size",
          "total",
          "total_pages"
        ],
        "title": "DstackAppListResponse"
      },
      "teehouse__api__routes__billing___common__PaginationMetadata": {
        "properties": {
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "description": "True if more results exist after this page"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Cursor for fetching next page"
          }
        },
        "type": "object",
        "required": [
          "has_more"
        ],
        "title": "PaginationMetadata",
        "description": "Cursor-based pagination metadata."
      },
      "teehouse__api__routes__billing__credits__PaginatedCreditTransactions": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditTransaction"
            },
            "type": "array",
            "title": "Items",
            "description": "Transaction records"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total matching transactions"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total pages"
          },
          "total_amount": {
            "type": "number",
            "title": "Total Amount",
            "description": "Sum of amounts for matching transactions"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages",
          "total_amount"
        ],
        "title": "PaginatedCreditTransactions"
      },
      "teehouse__api__routes__billing__usage__BillingSummaryResponse": {
        "properties": {
          "monthly_total": {
            "type": "number",
            "title": "Monthly Total",
            "description": "Total USD cost for current calendar month"
          },
          "seven_days_total": {
            "type": "number",
            "title": "Seven Days Total",
            "description": "Total USD cost for last 7 days"
          },
          "seven_days_usage": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__billing__usage__DailyUsageResponse"
            },
            "type": "array",
            "title": "Seven Days Usage",
            "description": "Daily breakdown for last 7 days"
          },
          "recent_instance_spending": {
            "items": {
              "$ref": "#/components/schemas/InstanceSpendingResponse"
            },
            "type": "array",
            "title": "Recent Instance Spending",
            "description": "Per-instance totals for last 7 days"
          }
        },
        "type": "object",
        "required": [
          "monthly_total",
          "seven_days_total"
        ],
        "title": "BillingSummaryResponse",
        "description": "Billing summary with totals and breakdowns."
      },
      "teehouse__api__routes__billing__usage__CVMInfo": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "CVM display name"
          },
          "vm_uuid": {
            "type": "string",
            "title": "Vm Uuid",
            "description": "CVM UUID (36-character string)"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id",
            "description": "40-character hex app ID"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At",
            "description": "Deletion timestamp if removed"
          }
        },
        "type": "object",
        "required": [
          "vm_uuid"
        ],
        "title": "CVMInfo",
        "description": "CVM metadata for billing records."
      },
      "teehouse__api__routes__billing__usage__DailyUsageResponse": {
        "properties": {
          "day": {
            "type": "string",
            "title": "Day",
            "description": "Date in YYYY-MM-DD format"
          },
          "total_cost": {
            "type": "number",
            "title": "Total Cost",
            "description": "Total USD cost for the day"
          },
          "instances": {
            "items": {
              "$ref": "#/components/schemas/InstanceSpendingResponse"
            },
            "type": "array",
            "title": "Instances",
            "description": "Per-instance cost breakdown"
          }
        },
        "type": "object",
        "required": [
          "day",
          "total_cost"
        ],
        "title": "DailyUsageResponse",
        "description": "Daily usage summary with per-instance breakdown."
      },
      "teehouse__api__routes__cvms__management__CvmBasicInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Internal CVM database ID"
          },
          "teepod_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Teepod Id",
            "description": "Node ID (admin only)"
          },
          "teepod": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CvmNode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Node metadata"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "RFC 1123 compliant CVM name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current status: running, stopped, starting, etc."
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress",
            "description": "True if an operation is currently executing",
            "default": false
          },
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "Unique application identifier"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "VM instance UUID on the node"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id",
            "description": "Public instance identifier"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu",
            "description": "Allocated vCPU count"
          },
          "memory": {
            "type": "integer",
            "title": "Memory",
            "description": "Allocated memory in MB"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size",
            "description": "Allocated disk size in GB"
          },
          "base_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Image",
            "description": "OS image name"
          },
          "encrypted_env_pubkey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Env Pubkey",
            "description": "Public key for encrypting env vars"
          },
          "listed": {
            "type": "boolean",
            "title": "Listed",
            "description": "True if publicly listed",
            "default": false
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "hashid",
                "description": "A hashed identifier that maps to an internal database ID",
                "examples": [
                  "0123abcd"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Associated project ID"
          },
          "project_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Type",
            "description": "Project provision type"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type identifier"
          },
          "public_sysinfo": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Sysinfo",
            "description": "Expose system info publicly"
          },
          "public_logs": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Logs",
            "description": "Expose logs publicly"
          },
          "dapp_dashboard_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dapp Dashboard Url",
            "description": "DApp dashboard URL if applicable"
          },
          "syslog_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Syslog Endpoint",
            "description": "Syslog streaming endpoint"
          },
          "kms_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KMSInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "KMS configuration"
          },
          "contract_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Address",
            "description": "On-chain contract address"
          },
          "deployer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployer Address",
            "description": "Deployer wallet address"
          },
          "scheduled_delete_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled Delete At",
            "description": "Auto-delete timestamp (UTC)"
          },
          "public_urls": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CvmNetworkUrls"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Urls",
            "description": "Exposed service URLs"
          },
          "gateway_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Domain",
            "description": "Gateway base domain"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "app_id",
          "vcpu",
          "memory",
          "disk_size"
        ],
        "title": "CvmBasicInfo",
        "description": "Detailed CVM information returned by GET /cvms/{cvm_id}."
      },
      "teehouse__api__routes__cvms__patch_compose_file__AvailableOSImage": {
        "properties": {
          "version": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "type": "array",
                "maxItems": 4,
                "minItems": 4
              },
              {
                "prefixItems": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "type": "array",
                "maxItems": 3,
                "minItems": 3
              }
            ],
            "title": "Version",
            "description": "Semantic version as tuple (major, minor, patch[, build])"
          },
          "prod": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OSImageVariant"
              },
              {
                "type": "null"
              }
            ],
            "description": "Production build (stable)"
          },
          "dev": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OSImageVariant"
              },
              {
                "type": "null"
              }
            ],
            "description": "Development build (testing)"
          }
        },
        "type": "object",
        "required": [
          "version"
        ],
        "title": "AvailableOSImage",
        "description": "OS image version with production and development variants."
      },
      "teehouse__api__routes__cvms__preflight__AvailableOSImage": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "is_dev": {
            "type": "boolean",
            "title": "Is Dev"
          },
          "version": {
            "anyOf": [
              {
                "prefixItems": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "type": "array",
                "maxItems": 4,
                "minItems": 4
              },
              {
                "prefixItems": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "type": "array",
                "maxItems": 3,
                "minItems": 3
              }
            ],
            "title": "Version"
          },
          "os_image_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Image Hash"
          },
          "requires_gpu": {
            "type": "boolean",
            "title": "Requires Gpu",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug",
          "is_dev",
          "version"
        ],
        "title": "AvailableOSImage"
      },
      "teehouse__api__routes__cvms__preflight__TeepodCapacity": {
        "properties": {
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "listed": {
            "type": "boolean",
            "title": "Listed"
          },
          "resource_score": {
            "type": "number",
            "title": "Resource Score"
          },
          "remaining_vcpu": {
            "type": "number",
            "title": "Remaining Vcpu"
          },
          "remaining_memory": {
            "type": "number",
            "title": "Remaining Memory"
          },
          "remaining_cvm_slots": {
            "type": "integer",
            "title": "Remaining Cvm Slots"
          },
          "remaining_disk": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Disk"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__cvms__preflight__AvailableOSImage"
            },
            "type": "array",
            "title": "Images"
          },
          "dedicated_for_team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dedicated For Team Id"
          },
          "support_onchain_kms": {
            "type": "boolean",
            "title": "Support Onchain Kms",
            "default": false
          },
          "fmspc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fmspc"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier"
          },
          "default_kms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Kms"
          },
          "kms_list": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Kms List",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "teepod_id",
          "name",
          "listed",
          "resource_score",
          "remaining_vcpu",
          "remaining_memory",
          "remaining_cvm_slots",
          "images"
        ],
        "title": "TeepodCapacity",
        "description": "Represents a teepod (remain) capacity"
      },
      "teehouse__api__routes__cvms__v20260121__schemas__CVMInfo": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^cvm_.+",
            "format": "hashid",
            "title": "HashedId[cvms]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "cvm_0123abcd"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "App Id"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid"
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id"
          },
          "resource": {
            "$ref": "#/components/schemas/CVMResourceInfo"
          },
          "node_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NodeRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "os": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CVMOSInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "kms_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KmsType"
              },
              {
                "type": "null"
              }
            ]
          },
          "kms_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CVMKmsInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "in_progress": {
            "type": "boolean",
            "title": "In Progress",
            "default": false
          },
          "progress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CVMProgressInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compose Hash"
          },
          "docker_compose_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docker Compose Hash"
          },
          "pre_launch_script_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Launch Script Hash"
          },
          "gateway": {
            "$ref": "#/components/schemas/CVMGatewayInfo"
          },
          "logs": {
            "$ref": "#/components/schemas/CVMLogUrls"
          },
          "services": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Services"
          },
          "endpoints": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CvmNetworkUrls"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoints"
          },
          "public_logs": {
            "type": "boolean",
            "title": "Public Logs",
            "default": false
          },
          "public_sysinfo": {
            "type": "boolean",
            "title": "Public Sysinfo",
            "default": false
          },
          "public_tcbinfo": {
            "type": "boolean",
            "title": "Public Tcbinfo",
            "default": true
          },
          "gateway_enabled": {
            "type": "boolean",
            "title": "Gateway Enabled",
            "default": false
          },
          "secure_time": {
            "type": "boolean",
            "title": "Secure Time",
            "default": false
          },
          "storage_fs": {
            "type": "string",
            "title": "Storage Fs",
            "default": "zfs"
          },
          "workspace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkspaceRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "creator": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deleted At"
          },
          "listed": {
            "type": "boolean",
            "title": "Listed",
            "default": false
          },
          "project_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Type"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "resource",
          "status",
          "gateway"
        ],
        "title": "CVMInfo"
      },
      "teehouse__api__routes__gpus__BusyGpuInfoOut": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id",
            "description": "GPU database ID"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot address"
          },
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "UUID of VM using this GPU"
          },
          "vfio_pids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Vfio Pids",
            "description": "PIDs with VFIO access to this GPU"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "slot"
        ],
        "title": "BusyGpuInfoOut",
        "description": "GPU currently in use by a VM or process."
      },
      "teehouse__api__routes__gpus__GpuModeInfoOut": {
        "properties": {
          "gpu_id": {
            "type": "integer",
            "title": "Gpu Id",
            "description": "GPU database ID"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "PCI slot address (e.g., '0000:41:00.0')"
          },
          "cc_mode": {
            "type": "string",
            "title": "Cc Mode",
            "description": "Confidential Computing mode status"
          },
          "ppcie_mode": {
            "type": "string",
            "title": "Ppcie Mode",
            "description": "Protected PCIe mode status"
          }
        },
        "type": "object",
        "required": [
          "gpu_id",
          "slot",
          "cc_mode",
          "ppcie_mode"
        ],
        "title": "GpuModeInfoOut",
        "description": "GPU mode information after switch operation."
      },
      "teehouse__api__routes__instance_events__InstanceEventResponse": {
        "properties": {
          "event_type": {
            "type": "string",
            "title": "Event Type",
            "description": "Event type without .start/.end suffix (e.g., 'instance.create')"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "'pending' if only start event exists, 'completed' if end event received"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State",
            "description": "Instance state at event completion"
          },
          "instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Type",
            "description": "Instance type at event time"
          },
          "old_instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Old Instance Type",
            "description": "Previous instance type (resize events only)"
          },
          "new_instance_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "New Instance Type",
            "description": "New instance type (resize events only)"
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration",
            "description": "Milliseconds between start and end events"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Event timestamp (end time if completed, start time if pending)"
          }
        },
        "type": "object",
        "required": [
          "event_type",
          "status",
          "timestamp"
        ],
        "title": "InstanceEventResponse",
        "description": "CVM lifecycle event with timing info."
      },
      "teehouse__api__routes__projects__CvmBasicInfo": {
        "properties": {
          "vm_uuid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vm Uuid",
            "description": "CVM UUID from hypervisor"
          },
          "app_id": {
            "type": "string",
            "title": "App Id",
            "description": "Application ID (40-char hex)"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "CVM display name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Database status (may lag behind actual state)"
          },
          "vcpu": {
            "type": "integer",
            "title": "Vcpu",
            "description": "Allocated vCPU count"
          },
          "memory": {
            "type": "integer",
            "title": "Memory",
            "description": "Allocated memory in MB"
          },
          "disk_size": {
            "type": "integer",
            "title": "Disk Size",
            "description": "Disk size in GB"
          },
          "teepod_id": {
            "type": "integer",
            "title": "Teepod Id",
            "description": "Host teepod ID"
          },
          "teepod_name": {
            "type": "string",
            "title": "Teepod Name",
            "description": "Host teepod name"
          },
          "region_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region Identifier",
            "description": "Region code (e.g., 'us-west-1')"
          }
        },
        "type": "object",
        "required": [
          "app_id",
          "name",
          "status",
          "vcpu",
          "memory",
          "disk_size",
          "teepod_id",
          "teepod_name"
        ],
        "title": "CvmBasicInfo",
        "description": "CVM summary from database (not real-time status)."
      },
      "teehouse__api__routes__workspace__PaginationMetadata": {
        "properties": {
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "description": "Whether more items exist"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Cursor for next page"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total",
            "description": "Total item count (if available)"
          }
        },
        "type": "object",
        "required": [
          "has_more"
        ],
        "title": "PaginationMetadata",
        "description": "Pagination state for list responses."
      },
      "teehouse__api__routes__workspace_members__PaginatedTeamMembers": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/teehouse__api__routes__workspace_members__TeamMemberInfo"
            },
            "type": "array",
            "title": "Items",
            "description": "Member list"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total member count"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Items per page"
          },
          "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total page count"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "PaginatedTeamMembers",
        "description": "Paginated list of workspace members."
      },
      "teehouse__api__routes__workspace_members__TeamMemberInfo": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "User hashid"
          },
          "username": {
            "type": "string",
            "title": "Username",
            "description": "Username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email (if visible)"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Role: OWNER, ADMIN, or MEMBER"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "title": "Joined At",
            "description": "Join timestamp"
          },
          "is_creator": {
            "type": "boolean",
            "title": "Is Creator",
            "description": "Whether user created workspace"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "username",
          "role",
          "joined_at",
          "is_creator"
        ],
        "title": "TeamMemberInfo",
        "description": "Workspace member details."
      },
      "teehouse__models__schemas__credits__Credit": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^crd_.+",
            "format": "hashid",
            "title": "HashedId[credits]",
            "description": "A hashed identifier that maps to an internal database ID",
            "examples": [
              "crd_0123abcd"
            ]
          },
          "user_id": {
            "type": "integer",
            "title": "User Id"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "title": "Balance",
            "description": "A monetary value with precise decimal arithmetic",
            "examples": [
              "19.99",
              "123.456000"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "balance"
        ],
        "title": "Credit"
      },
      "teehouse__models__schemas__users__Credit": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "balance": {
            "type": "number",
            "title": "Balance"
          },
          "granted_balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Granted Balance"
          }
        },
        "type": "object",
        "required": [
          "id",
          "balance"
        ],
        "title": "Credit"
      }
    },
    "securitySchemes": {
      "OAuth2AuthorizationCodeBearer": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "scopes": {},
            "authorizationUrl": "",
            "tokenUrl": "token"
          }
        }
      },
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "tags": [
    {
      "name": "CVMs",
      "description": "Confidential Virtual Machine (CVM) lifecycle management on Phala Network"
    },
    {
      "name": "Apps",
      "description": "App template management and CVM deployment from app blueprints"
    },
    {
      "name": "Webhooks",
      "description": "Manage webhook endpoints and monitor delivery history"
    },
    {
      "name": "SSH Keys",
      "description": "SSH public key management for CVM access"
    },
    {
      "name": "KMS",
      "description": "Key Management Service — key derivation, on-chain anchoring, and inspection"
    },
    {
      "name": "Instance Types",
      "description": "Available hardware configurations for CVM deployment"
    },
    {
      "name": "Attestations",
      "description": "Remote attestation and TEE verification endpoints"
    }
  ]
}
