{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "DeepLake managed service API for vector storage, file management, and authentication",
        "title": "DeepLake API",
        "termsOfService": "https://www.activeloop.ai/terms",
        "contact": {
            "name": "API Support",
            "url": "https://www.activeloop.ai/support",
            "email": "support@activeloop.ai"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "version": "1.0"
    },
    "host": "",
    "basePath": "/",
    "paths": {
        "/api/org/{id}/storage/name": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves a managed credential by organization and name, returns metadata with unscoped temporary credentials",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Get storage credential by name (controlplane-compatible)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization / workspace ID (org resolved from token or X-Activeloop-Org-Id header)",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential name",
                        "name": "query",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageByNameResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/api/org/{org_id}/ds/{ds_name}/creds": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Controlplane-compatible endpoint used by the C++ client when opening",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Get scoped credentials for a dataset (controlplane-compatible)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization / workspace ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Dataset / table name",
                        "name": "ds_name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Access mode: r, w, or rw (default: r)",
                        "name": "mode",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_tablesapi.tableCredsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/orgs/{org_id}/repositories": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns summaries of all repositories for the organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Repositories"
                ],
                "summary": "List repositories",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_repositories.ListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Links a managed credential to a specific bucket path",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Repositories"
                ],
                "summary": "Create a repository",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Repository to create",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_repositories.CreateRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_repositories.Repository"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Duplicate name",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/orgs/{org_id}/repositories/default": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the default repository for the organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Repositories"
                ],
                "summary": "Get default repository",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_repositories.RepositorySummary"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "No default set",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Marks a repository as the default for the organization",
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "Repositories"
                ],
                "summary": "Set default repository",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Repository to set as default",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_repositories.SetDefaultRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Default set"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/orgs/{org_id}/repositories/{id}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Permanently deletes a repository",
                "tags": [
                    "Repositories"
                ],
                "summary": "Delete a repository",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Repository ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Deleted"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/auth/device/code": {
            "post": {
                "description": "Initiates OAuth 2.0 Device Authorization flow. Returns a code for the user to enter in browser.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Authentication"
                ],
                "summary": "Request device code for CLI authentication",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.DeviceCodeResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "503": {
                        "description": "Device flow not configured",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/auth/device/token": {
            "post": {
                "description": "Poll for access token after user completes authentication in browser. Call this repeatedly until success or error.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Authentication"
                ],
                "summary": "Poll for access token",
                "parameters": [
                    {
                        "description": "Device code from initial request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.DeviceTokenRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.DeviceTokenResponse"
                        }
                    },
                    "400": {
                        "description": "authorization_pending, slow_down, expired_token, or access_denied",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.DeviceFlowErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "503": {
                        "description": "Device flow not configured",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/account": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the billing account, tier features, and default region for the authenticated user's organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get billing account",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillingAccountResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/auto-topup": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the org's automatic balance reload threshold and target.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get auto top-up settings",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.AutoTopUpConfig"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates or updates the org's automatic balance reload threshold and target.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Set auto top-up settings",
                "parameters": [
                    {
                        "description": "Auto top-up settings",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_billingapi.setAutoTopUpRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.AutoTopUpConfig"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Delete auto top-up settings",
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/budget": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the org's monthly spend cap + alert thresholds.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get budget",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BudgetConfig"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates or updates the org's monthly spend cap + alert thresholds.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Set budget",
                "parameters": [
                    {
                        "description": "Budget configuration",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_billingapi.setBudgetRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BudgetConfig"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Delete budget",
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/budget/alerts": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get budget alerts",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Limit results (default 20, max 100)",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset for pagination",
                        "name": "offset",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BudgetAlertsResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/estimate": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns an estimated bill for the current billing period",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get bill estimate",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillEstimateResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/portal": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a Stripe billing portal session for managing subscription",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Create billing portal session",
                "parameters": [
                    {
                        "type": "string",
                        "description": "URL to return to after portal session",
                        "name": "return_url",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.PortalSessionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/regions": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns available billing regions with their pricing",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get billing regions",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.RegionsResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/seats": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns billable seat count, monthly cost, and member breakdown",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get seat usage",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.SeatsResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/seats/cancel": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Cancels the per-seat plan at the end of the current billing period",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Cancel seat subscription",
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/seats/subscribe": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a Stripe subscription Checkout session for the seat plan",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Start seat subscription",
                "parameters": [
                    {
                        "type": "string",
                        "description": "URL to return to on success",
                        "name": "success_url",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "URL to return to on cancel",
                        "name": "cancel_url",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.CheckoutSessionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/summary": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Single-round-trip payload powering the usage page hero strip.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get billing summary (hero strip)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter (compute is org-scoped via pod_uptime; storage/transfer support workspace scoping)",
                        "name": "workspace_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Set to 'previous' to include period-over-period delta",
                        "name": "compare",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillingSummaryResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/tier": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Changes the subscription tier (basic/scale/enterprise) for the authenticated user's organization",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Update subscription tier",
                "parameters": [
                    {
                        "description": "Tier update request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TierUpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillingAccountResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/top-up": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a Stripe checkout session for adding funds to the organization's prepaid balance",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Top up balance",
                "parameters": [
                    {
                        "description": "Top-up request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TopUpRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.CheckoutSessionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/traces-usage": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns stored traces used vs the seat-pooled quota",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get trace usage",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TracesUsageResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/transactions": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns balance transaction history for the authenticated user's organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get transactions",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Limit results (default 20, max 100)",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset for pagination",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Inclusive start date (YYYY-MM-DD); filters created_at \u003e= start_date",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Inclusive end date (YYYY-MM-DD); filters created_at \u003c end_date + 1 day",
                        "name": "end_date",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.CreditTransactionResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/by-table": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns top tables by cost (and their query count + GPU hours) within the period.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get per-table usage",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter; when omitted, aggregates across the org",
                        "name": "workspace_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Maximum number of tables to return (default 10, max 100)",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.UsageByTableResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/compute": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns GPU compute usage for the authenticated user's organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get compute usage",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter; when omitted, returns org-wide usage",
                        "name": "workspace_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeUsageResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/compute/by-pod": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns top pods by cost with hours, sessions, tier, and region within the period.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get per-pod compute usage",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter (pod_uptime is typically org-scoped, so workspace filter usually returns empty)",
                        "name": "workspace_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Maximum number of pods to return (default 20, max 200)",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.UsageByPodResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/compute/series": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns DATE_TRUNC-bucketed pod-hours + cost over the period, optionally grouped.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get compute time-series",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "day or hour (default day)",
                        "name": "granularity",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional grouping: pod | tier | region",
                        "name": "group_by",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter; pod_uptime is org-scoped so usually returns empty when set",
                        "name": "workspace_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/queries/series": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Per-bucket count of query sessions (session_type='query') over a period.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get queries time-series",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter",
                        "name": "workspace_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Bucket size: day (default) or hour",
                        "name": "granularity",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.QueriesSeriesResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/rows/series": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Per-bucket count of rows inserted (day/hour) over a period, from the pg_deeplake log-derived counter.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get rows-inserted time-series",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Bucket size: day (default) or hour",
                        "name": "granularity",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.RowsSeriesResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/storage": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns storage usage for the authenticated user's organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get storage usage",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter; when omitted, returns org-wide usage",
                        "name": "workspace_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Set to 'day' to populate `series` with a per-day breakdown",
                        "name": "granularity",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.StorageUsageResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/usage/transfer": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns data transfer (egress/ingestion) usage for the authenticated user's organization",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get transfer usage",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Optional workspace filter; when omitted, returns org-wide usage",
                        "name": "workspace_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Set to 'day' to populate `series` with a per-day breakdown",
                        "name": "granularity",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TransferUsageResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/billing/webhooks/stripe": {
            "post": {
                "description": "Receives and processes Stripe webhook events",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Handle Stripe webhook",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/db-credentials": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns connection info for the organization's database. Password not included.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Database Credentials"
                ],
                "summary": "Get database credentials",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgdb.CredentialInfoResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Admin access required",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "No credentials exist",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "503": {
                        "description": "DLPG not configured",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/db-credentials/rotate": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates credentials if none exist, otherwise rotates the password. Returns password once.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Database Credentials"
                ],
                "summary": "Create or rotate database credentials",
                "responses": {
                    "200": {
                        "description": "Rotated existing credentials",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgdb.RotateCredentialResponse"
                        }
                    },
                    "201": {
                        "description": "Created new credentials",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgdb.RotateCredentialResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Admin access required",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "503": {
                        "description": "DLPG not configured",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/health": {
            "get": {
                "description": "Returns the health status of the API",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Health"
                ],
                "summary": "Health check",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/me": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns information about the currently authenticated user including organization IDs",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get current user",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.UserProfileResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Updates editable profile fields for the authenticated user. Send phone_number in E.164 format including the country prefix (e.g. +16505551234); send an empty string to clear it.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Update current user",
                "parameters": [
                    {
                        "description": "Profile fields to update",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.UpdateProfileRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.UserProfileResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/me/hivemind-stats": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns cumulative org-wide and per-caller hivemind activity counts (sessions, memory recalls, memory bytes) across every org the caller belongs to. Data is pre-aggregated by the daily rollup; the endpoint sums in-database with no per-request session scans.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Hivemind"
                ],
                "summary": "Get my hivemind activity stats",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_usersapi.HivemindStatsResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/me/notifications": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns active (non-dismissed, non-expired) notifications targeting the authenticated user, including org-wide notifications for orgs they belong to.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Notifications"
                ],
                "summary": "List my notifications",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_notifications.ListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/me/notifications/{id}/dismiss": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Marks a notification as dismissed. The caller must have visibility (direct user_id target or org-wide on an org they belong to). Idempotent.",
                "tags": [
                    "Notifications"
                ],
                "summary": "Dismiss a notification",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Notification ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "List user's organizations",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.Organization"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Create organization",
                "parameters": [
                    {
                        "description": "Create organization request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.CreateOrganizationRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.OrganizationResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Get organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.OrganizationResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Update organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update organization request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.UpdateOrganizationRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.OrganizationResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Delete organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Organization name for confirmation",
                        "name": "confirm",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credential": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Sets the default managed credential for an organization. Workspaces without their own credential fall back to this.",
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Set org default credential",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Link credential request",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.LinkCredentialRequest"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Removes the default credential from an organization",
                "tags": [
                    "Organizations"
                ],
                "summary": "Remove org default credential",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns summaries of all credentials for the organization (no secrets)",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "List managed storage credentials",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.ListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Registers cloud storage credentials (S3, GCS, Azure) encrypted at rest",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Create a managed storage credential",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Credential to create",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CreateRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CreateResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Duplicate name",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials/{cred_id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the credential record with state-machine fields. Frontend polls this during Azure federated onboarding to drive the multi-step UI.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Get a managed credential by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CredentialDetail"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Permanently deletes a stored credential",
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Delete a managed credential",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Deleted"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials/{cred_id}/creds": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Re-encrypts and stores new credential values",
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Update credential values",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "New credential values",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.UpdateCredsRequest"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Updated"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials/{cred_id}/generate": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Produces short-lived, scoped credentials from a stored credential.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Generate temporary credentials",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Generation parameters",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.GenerateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.GeneratedCredentials"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials/{cred_id}/save-unverified": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Only valid when the access probe has been running for \u003e5 minutes and hasn't succeeded. Moves the credential to unverified_saved; /creds calls will still try to generate and auto-promote to verified on success.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Save an Azure credential without access verification (escape hatch)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.ManagedCredential"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Not in access_pending state",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials/{cred_id}/storage": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Records the customer's storage account + container details, transitions state to access_pending, and kicks off a 5-minute background probe that verifies the service principal's blob-service access.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Submit Azure storage details and start the access probe (azure_federated only)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Storage account details",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_credsapi.SubmitAzureStorageRequestBody"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.ManagedCredential"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Invalid state transition",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/credentials/{cred_id}/tenant": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Records the customer's Azure tenant ID and starts polling for the service principal to appear. Customer must have run `az ad sp create --id \u003cAPP_ID\u003e` first.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Managed Credentials"
                ],
                "summary": "Submit Azure tenant ID to start SP polling (azure_federated only)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Credential ID",
                        "name": "cred_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tenant ID",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_credsapi.SubmitAzureTenantRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.ManagedCredential"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "Invalid state transition",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/leave": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Leave organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/members": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "List organization members",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.MembersResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/members/invite": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Invite member to organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Invite member request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.InviteMemberRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/members/pending/{inviteId}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Cancel a pending organization invite",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Pending invite ID",
                        "name": "inviteId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/members/{memberId}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Remove member from organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Member ID",
                        "name": "memberId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/permissions": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Update member permissions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update permissions request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.UpdatePermissionsRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/strict-mode": {
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Toggle the organization's strict_mode flag. Only org admins may change this.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations"
                ],
                "summary": "Update organization strict mode",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Strict mode request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.UpdateStrictModeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.OrganizationResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{id}/workspaces/type": {
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Organizations",
                    "Workspaces"
                ],
                "summary": "Update type for all workspaces in an organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update workspaces type request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.UpdateWorkspacesTypeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{org_id}/workload-identities": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Membership-gated. Returns all registered workload identities, newest first.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workload Identities"
                ],
                "summary": "List workload identities for an organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.ListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Admin-only. Records the public identifying fields of a cloud-native identity (today: Azure SP — `azure_client_id` + `azure_tenant_id`) so the workload behind it can authenticate to deeplake-api by presenting a cloud-signed OIDC token. Mirrors controlplane's POST /machine.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workload Identities"
                ],
                "summary": "Register a workload identity for an organization",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Workload identity",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.RegisterRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentity"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "409": {
                        "description": "name taken or cloud identity already registered",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/organizations/{org_id}/workload-identities/{id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Membership-gated. The path's org_id must match the identity's owning org; mismatch returns 404 (no leaking which orgs an ID belongs to).",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workload Identities"
                ],
                "summary": "Get a single workload identity",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Workload Identity ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentity"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Admin-only. Hard delete — the next OIDC token from the underlying workload will fail auth lookup and 401.",
                "tags": [
                    "Workload Identities"
                ],
                "summary": "Delete a workload identity",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Workload Identity ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/ready": {
            "get": {
                "description": "Returns the readiness status of the API (checks database connectivity)",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Health"
                ],
                "summary": "Readiness check",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "503": {
                        "description": "Service Unavailable",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/users/me/tokens": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns all API tokens for the authenticated user. Optionally filter by organization.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Tokens"
                ],
                "summary": "List API tokens",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by organization ID",
                        "name": "organization_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of tokens",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_auth.APIToken"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a new API token for the authenticated user. The token can be scoped to a specific organization.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Tokens"
                ],
                "summary": "Create API token",
                "parameters": [
                    {
                        "description": "Token creation request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_auth.CreateTokenRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Token created successfully",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_auth.CreateTokenResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/users/me/tokens/{id}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Revokes an API token by ID. The token will be immediately invalidated.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Tokens"
                ],
                "summary": "Delete API token",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Token ID (UUID)",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Token deleted successfully",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid token ID",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/workspace-types": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "List available workspace types",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceTypesResponse"
                        }
                    }
                }
            }
        },
        "/workspaces": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "List workspaces",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID (optional if API token includes org_id)",
                        "name": "X-Activeloop-Org-Id",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspacesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Create workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Organization ID (optional if API token includes org_id)",
                        "name": "X-Activeloop-Org-Id",
                        "in": "header"
                    },
                    {
                        "description": "Create workspace request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.CreateWorkspaceRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/workspaces/{id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Get workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Delete workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Update workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update workspace request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.UpdateWorkspaceRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/workspaces/{id}/credential": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Associates a managed credential with a workspace for storage path resolution",
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Link credential to workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Link credential request",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.LinkCredentialRequest"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Removes the credential association from a workspace",
                "tags": [
                    "Workspaces"
                ],
                "summary": "Unlink credential from workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/workspaces/{id}/credentials/generate": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Resolves the workspace storage path, then generates path-scoped temporary credentials",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Generate scoped temporary credentials for a workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Generation parameters (path is optional, auto-resolved from workspace)",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.GenerateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.GeneratedCredentials"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/workspaces/{id}/permissions": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Update workspace permissions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update permissions request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.UpdateWorkspacePermissionsRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/workspaces/{id}/storage-path": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the resolved storage path for the workspace (from linked credential or default)",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Get workspace storage path",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.StoragePathResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/workspaces/{id}/users": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Get workspace users",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceUsersResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Add user to workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Add user request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.AddUserRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/workspaces/{id}/users/{user_id}": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Update user access",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update user access request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.UpdateUserAccessRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "tags": [
                    "Workspaces"
                ],
                "summary": "Remove user from workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/files": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns a paginated list of files with optional filters",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "files"
                ],
                "summary": "List files in workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Filter by status",
                        "name": "status",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Limit (default 20, max 100)",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset (default 0)",
                        "name": "offset",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of files",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_files.ListFilesResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID or query parameters",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Uploads a file to the workspace with optional metadata",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "files"
                ],
                "summary": "Upload a file to workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "File to upload",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "JSON metadata for the file",
                        "name": "metadata",
                        "in": "formData"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "File uploaded successfully",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_files.File"
                        }
                    },
                    "400": {
                        "description": "Invalid request (bad workspace ID, invalid file, or validation error)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "413": {
                        "description": "File too large",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/files/{file_id}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns metadata for a specific file",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "files"
                ],
                "summary": "Get file metadata",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "File ID (UUID)",
                        "name": "file_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "File metadata",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_files.File"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID or file ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "File not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Deletes a file from the workspace (soft delete + storage removal)",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "files"
                ],
                "summary": "Delete a file",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "File ID (UUID)",
                        "name": "file_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "File deleted successfully",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_files.DeleteFileResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID or file ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "File not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/files/{file_id}/content": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Streams the file content for download",
                "produces": [
                    "application/octet-stream"
                ],
                "tags": [
                    "files"
                ],
                "summary": "Download file content",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "File ID (UUID)",
                        "name": "file_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "File content",
                        "schema": {
                            "type": "file"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID or file ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "File not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/files/{file_id}/thumbnails": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the list of available thumbnail dimensions for a file",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "files"
                ],
                "summary": "Get available thumbnail dimensions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "File ID (UUID)",
                        "name": "file_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of available dimensions",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID or file ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/files/{file_id}/thumbnails/{dimension}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the thumbnail image at the specified dimension",
                "produces": [
                    "image/jpeg"
                ],
                "tags": [
                    "files"
                ],
                "summary": "Get thumbnail image",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "File ID (UUID)",
                        "name": "file_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Thumbnail dimension (e.g., 64x64, 128x128, 256x256)",
                        "name": "dimension",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Thumbnail image",
                        "schema": {
                            "type": "file"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID, file ID, or dimension",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Thumbnail not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/table-stats": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns row count, estimated size, and query count for each table in the workspace. Separated from ListTables because stats require expensive DuckDB queries.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Get per-table statistics",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Per-table statistics",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableStatsEntry"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Workspace schema not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns a list of all tables in the workspace with metadata including table name, schema, column count, row count, and size.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "List all tables in workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of tables with metadata",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableMetadata"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Workspace schema not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a new table with the deeplake access method using the provided schema. The table schema is specified as a map of column names to column definitions.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Create a new table in workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Table creation request with name and schema",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.CreateTableRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Table created successfully with schema details",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableSchema"
                        }
                    },
                    "400": {
                        "description": "Invalid request (bad workspace ID, invalid body, or invalid table schema)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Workspace schema not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error - table creation failed",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/query": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Executes a SQL query on workspace tables with optional parameterized queries. Supports SELECT, INSERT, UPDATE, DELETE operations with parameter binding for security. Supports MessagePack responses (Accept: application/msgpack) for efficient binary data transfer.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Execute SQL query on workspace tables",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Query request with SQL and optional parameters",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.ExecuteQueryRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Query executed successfully",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.QueryResult"
                        }
                    },
                    "400": {
                        "description": "Invalid request (bad workspace ID, invalid body, empty query, or invalid query)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error - query execution failed",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/query/batch": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Executes a SQL query with multiple parameter sets for bulk operations. Useful for bulk INSERT, UPDATE, or DELETE operations with different parameter sets. Supports MessagePack responses (Accept: application/msgpack) for efficient binary data transfer.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Execute batch SQL query on workspace tables",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Batch query request with SQL and parameter sets",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.ExecuteBatchQueryRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Batch query executed successfully",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.BatchQueryResult"
                        }
                    },
                    "400": {
                        "description": "Invalid request (bad workspace ID, invalid body, empty query/batch, or invalid query)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error - batch query execution failed",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/{table_name}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns detailed schema information for a specific table including all columns with their data types, nullability, defaults, and constraints.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Get detailed schema for a table",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Table name",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Table schema with column details",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableSchema"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID or missing table name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Table not found or workspace schema not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Permanently deletes a table from the workspace. This operation cannot be undone.",
                "tags": [
                    "tables"
                ],
                "summary": "Drop a table from workspace",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Table name to drop",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Table dropped successfully (no content)"
                    },
                    "400": {
                        "description": "Invalid workspace ID or missing table name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Table not found or workspace schema not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error - table drop failed",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/{table_name}/creds": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns temporary credentials scoped to the table's storage path,",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Get scoped credentials for a specific table (dataset)",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Table (dataset) name",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Access mode: r, w, or rw (default: r)",
                        "name": "mode",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/internal_httpapi_tablesapi.tableCredsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/{table_name}/exploration-queries": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Uses AI to generate interesting exploratory queries based on table schema and sample data",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Generate exploratory SQL queries for a table",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Table name",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Exploration queries",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_querysuggestion.ExplorationResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Table not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/{table_name}/images": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Updates a row with image data and auto-generated 128x128 thumbnail",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables",
                    "files"
                ],
                "summary": "Upload an image to an existing table row",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Existing table name",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "Image file to upload",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Target column name for the image",
                        "name": "column",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Row identifier value",
                        "name": "row_id",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Column to match row_id against (default: id)",
                        "name": "id_column",
                        "in": "formData"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Image uploaded successfully",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Invalid request (missing params, column not found)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Table or row not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "413": {
                        "description": "File too large",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/{table_name}/query-suggestion": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Uses AI to generate a SQL query suggestion from a natural language question",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Suggest SQL query from natural language",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Table name",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Query suggestion request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_querysuggestion.SuggestQueryRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Query suggestion",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_querysuggestion.SuggestQueryResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Table not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tables/{table_name}/stats": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns column-level statistics from PostgreSQL's pg_stats view, with optional computed aggregates for numeric columns.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tables"
                ],
                "summary": "Get column-level statistics for a table",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Workspace ID (UUID)",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Table name",
                        "name": "table_name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Comma-separated column names to filter (default: all columns)",
                        "name": "columns",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "If true, compute min/max/avg/stddev for numeric columns (default: false)",
                        "name": "include_aggregates",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Table statistics with column details",
                        "schema": {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableStatistics"
                        }
                    },
                    "400": {
                        "description": "Invalid workspace ID, missing table name, or invalid column filter",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - missing or invalid authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "403": {
                        "description": "Access denied - user does not have access to this workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Table not found or workspace schema not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "github_com_activeloopai_deeplake-api_internal_auth.APIToken": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "expires_at": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "last_used_at": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "string"
                },
                "token_preview": {
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_auth.APITokenResponse": {
            "type": "object",
            "properties": {
                "duration": {
                    "description": "Duration in seconds",
                    "type": "integer"
                },
                "expiration": {
                    "description": "Unix timestamp for compatibility",
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "string"
                },
                "token": {
                    "description": "The actual JWT token (only returned on creation)",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_auth.CreateTokenRequest": {
            "type": "object",
            "required": [
                "duration",
                "name"
            ],
            "properties": {
                "duration": {
                    "description": "Duration in seconds",
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "string"
                },
                "temporary": {
                    "type": "boolean"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_auth.CreateTokenResponse": {
            "type": "object",
            "properties": {
                "token": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_auth.APITokenResponse"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.AccountStatus": {
            "type": "string",
            "enum": [
                "active",
                "past_due",
                "canceled",
                "paused"
            ],
            "x-enum-varnames": [
                "StatusActive",
                "StatusPastDue",
                "StatusCanceled",
                "StatusPaused"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_billing.AutoTopUpConfig": {
            "type": "object",
            "properties": {
                "consecutive_failures": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "enabled": {
                    "type": "boolean"
                },
                "has_payment_method": {
                    "type": "boolean"
                },
                "id": {
                    "type": "string"
                },
                "last_attempt_at": {
                    "type": "string"
                },
                "last_charge_at": {
                    "type": "string"
                },
                "last_charge_cents": {
                    "type": "integer"
                },
                "last_failure_at": {
                    "type": "string"
                },
                "last_failure_reason": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "target_cents": {
                    "type": "integer"
                },
                "threshold_cents": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BillEstimateResponse": {
            "type": "object",
            "properties": {
                "compute_cost_cents": {
                    "type": "integer"
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "projected_monthly_cents": {
                    "type": "integer"
                },
                "storage_cost_cents": {
                    "type": "integer"
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "total_cost_dollars": {
                    "type": "number"
                },
                "transfer_cost_cents": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BillableSeat": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "role": {
                    "description": "\"admin\" | \"write\"",
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                },
                "via": {
                    "description": "\"org\" | \"workspace\"",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BillingAccount": {
            "type": "object",
            "properties": {
                "balance_cents": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "current_period_end": {
                    "type": "string"
                },
                "default_region_id": {
                    "type": "string"
                },
                "features": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "grant_expires_at": {
                    "type": "string"
                },
                "grant_remaining_cents": {
                    "description": "GrantRemainingCents is the still-unspent portion of an expiring signup\ngrant. Spending draws it down first; it is zero for accounts without an\nexpiring grant. GrantExpiresAt is when the unspent remainder is clawed\nback (nil = no expiring grant).",
                    "type": "integer"
                },
                "id": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "plan": {
                    "description": "Seat-based plan fields. Plan is \"payg\" (prepaid/usage, the default) or\n\"seat\" (recurring $99/seat/month). SeatQuantity mirrors the Stripe\nsubscription quantity (= billable seat count). SubscriptionStatus and\nCurrentPeriodEnd are synced from Stripe webhooks. They are zero/empty for\nevery PAYG account, so existing orgs are unaffected.",
                    "type": "string"
                },
                "seat_quantity": {
                    "type": "integer"
                },
                "status": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.AccountStatus"
                },
                "stripe_customer_id": {
                    "type": "string"
                },
                "stripe_subscription_id": {
                    "type": "string"
                },
                "subscription_status": {
                    "type": "string"
                },
                "tier": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.SubscriptionTier"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BillingAccountResponse": {
            "type": "object",
            "properties": {
                "account": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillingAccount"
                },
                "default_region": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillingRegion"
                },
                "features": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TierFeatures"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BillingRegion": {
            "type": "object",
            "properties": {
                "compute_basic_price_cents_per_gpu_hour": {
                    "type": "integer"
                },
                "compute_enterprise_price_cents_per_gpu_hour": {
                    "type": "integer"
                },
                "compute_scale_price_cents_per_gpu_hour": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "egress_price_cents_per_gb": {
                    "type": "number"
                },
                "id": {
                    "type": "string"
                },
                "ingestion_price_cents_per_gb": {
                    "type": "number"
                },
                "is_active": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "storage_price_cents_per_tb_month": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BillingSummaryResponse": {
            "type": "object",
            "properties": {
                "balance_cents": {
                    "type": "integer"
                },
                "comparison": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.SummaryComparison"
                },
                "compute": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.SummaryCompute"
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "projected_end_of_period_cents": {
                    "type": "integer"
                },
                "storage_cost_cents": {
                    "type": "integer"
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "transfer_cost_cents": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BudgetAlert": {
            "type": "object",
            "properties": {
                "budget_id": {
                    "type": "string"
                },
                "fired_at": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "spend_cents": {
                    "type": "integer"
                },
                "threshold_pct": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BudgetAlertsResponse": {
            "type": "object",
            "properties": {
                "alerts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BudgetAlert"
                    }
                },
                "total_count": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.BudgetConfig": {
            "type": "object",
            "properties": {
                "alert_threshold_pcts": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "created_at": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "monthly_limit_cents": {
                    "type": "integer"
                },
                "org_id": {
                    "type": "string"
                },
                "paused_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.CheckoutSessionResponse": {
            "type": "object",
            "properties": {
                "session_id": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGranularity": {
            "type": "string",
            "enum": [
                "day",
                "hour"
            ],
            "x-enum-varnames": [
                "ComputeGranularityDay",
                "ComputeGranularityHour"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGroupBy": {
            "type": "string",
            "enum": [
                "",
                "pod",
                "tier",
                "region"
            ],
            "x-enum-varnames": [
                "ComputeGroupByNone",
                "ComputeGroupByPod",
                "ComputeGroupByTier",
                "ComputeGroupByRegion"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGroupValue": {
            "type": "object",
            "properties": {
                "cost_cents": {
                    "type": "integer"
                },
                "hours": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesPoint": {
            "type": "object",
            "properties": {
                "bucket_start": {
                    "type": "string"
                },
                "by_group": {
                    "type": "object",
                    "additionalProperties": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGroupValue"
                    }
                },
                "cost_cents": {
                    "type": "integer"
                },
                "hours": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesResponse": {
            "type": "object",
            "properties": {
                "granularity": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGranularity"
                },
                "group_by": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGroupBy"
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "series": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesPoint"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeTierBreakdown": {
            "type": "object",
            "properties": {
                "cost_cents": {
                    "type": "integer"
                },
                "hours": {
                    "type": "number"
                },
                "tier": {
                    "type": "string"
                },
                "unit_price_cents": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.ComputeUsageResponse": {
            "type": "object",
            "properties": {
                "by_session_type": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "number",
                        "format": "float64"
                    }
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "sessions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.GPUComputeSession"
                    }
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "total_gpu_hours": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.CreditTransaction": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "integer"
                },
                "balance_after": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "idempotency_key": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "stripe_payment_intent_id": {
                    "type": "string"
                },
                "transaction_type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TransactionType"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.CreditTransactionResponse": {
            "type": "object",
            "properties": {
                "total_count": {
                    "type": "integer"
                },
                "transactions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.CreditTransaction"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.DataTransferEvent": {
            "type": "object",
            "properties": {
                "bytes_transferred": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "destination_region": {
                    "type": "string"
                },
                "gb_transferred": {
                    "type": "number"
                },
                "id": {
                    "type": "string"
                },
                "idempotency_key": {
                    "type": "string"
                },
                "metadata": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "org_id": {
                    "type": "string"
                },
                "price_cents_per_gb": {
                    "type": "number"
                },
                "region_id": {
                    "type": "string"
                },
                "source_region": {
                    "type": "string"
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "transfer_type": {
                    "description": "egress, ingestion",
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.GPUComputeSession": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "duration_seconds": {
                    "type": "number"
                },
                "ended_at": {
                    "type": "string"
                },
                "gpu_hours": {
                    "type": "number"
                },
                "gpu_units": {
                    "type": "number"
                },
                "id": {
                    "type": "string"
                },
                "metadata": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "org_id": {
                    "type": "string"
                },
                "price_cents_per_gpu_hour": {
                    "type": "integer"
                },
                "region_id": {
                    "type": "string"
                },
                "session_type": {
                    "description": "query, embedding, ingestion",
                    "type": "string"
                },
                "started_at": {
                    "type": "string"
                },
                "status": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.GPUSessionStatus"
                },
                "tier": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.SubscriptionTier"
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.GPUSessionStatus": {
            "type": "string",
            "enum": [
                "active",
                "completed",
                "failed",
                "timed_out"
            ],
            "x-enum-varnames": [
                "GPUSessionActive",
                "GPUSessionCompleted",
                "GPUSessionFailed",
                "GPUSessionTimedOut"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_billing.PortalSessionResponse": {
            "type": "object",
            "properties": {
                "url": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.QueriesSeriesPoint": {
            "type": "object",
            "properties": {
                "bucket_start": {
                    "type": "string"
                },
                "queries": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.QueriesSeriesResponse": {
            "type": "object",
            "properties": {
                "granularity": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGranularity"
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "series": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.QueriesSeriesPoint"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.RegionsResponse": {
            "type": "object",
            "properties": {
                "default_region": {
                    "type": "string"
                },
                "regions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillingRegion"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.RowsSeriesPoint": {
            "type": "object",
            "properties": {
                "bucket_start": {
                    "type": "string"
                },
                "rows": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.RowsSeriesResponse": {
            "type": "object",
            "properties": {
                "granularity": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeSeriesGranularity"
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "series": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.RowsSeriesPoint"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.SeatsResponse": {
            "type": "object",
            "properties": {
                "billable_members": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.BillableSeat"
                    }
                },
                "free_members_count": {
                    "type": "integer"
                },
                "monthly_cost_cents": {
                    "type": "integer"
                },
                "plan": {
                    "description": "\"payg\" | \"seat\"",
                    "type": "string"
                },
                "price_cents_per_seat": {
                    "type": "integer"
                },
                "seat_count": {
                    "type": "integer"
                },
                "subscription_status": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.StorageSeriesPoint": {
            "type": "object",
            "properties": {
                "daily_cost_cents": {
                    "type": "integer"
                },
                "row_count": {
                    "description": "RowCount is the stored-row (\"traces\") count on that day, summed across the\norg's tables. Point-in-time stock, not a daily flow — drives the rows chart.",
                    "type": "integer"
                },
                "snapshot_date": {
                    "type": "string"
                },
                "storage_tb": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.StorageSnapshot": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "daily_cost_cents": {
                    "type": "integer"
                },
                "file_count": {
                    "type": "integer"
                },
                "id": {
                    "type": "string"
                },
                "metadata": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "org_id": {
                    "type": "string"
                },
                "price_cents_per_tb_month": {
                    "type": "integer"
                },
                "region_id": {
                    "type": "string"
                },
                "row_count": {
                    "description": "RowCount is the total rows (\"stored traces\") across the org's deeplake\ntables — the seat-plan quota meter. 0 for snapshots taken before the\nrow-count rollup, or where deeplake_vacuum_status is unavailable.",
                    "type": "integer"
                },
                "snapshot_date": {
                    "type": "string"
                },
                "storage_bytes": {
                    "type": "integer"
                },
                "storage_gb": {
                    "type": "number"
                },
                "storage_tb": {
                    "type": "number"
                },
                "table_count": {
                    "type": "integer"
                },
                "workspace_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.StorageUsageResponse": {
            "type": "object",
            "properties": {
                "average_storage_tb": {
                    "type": "number"
                },
                "by_workspace": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "number",
                        "format": "float64"
                    }
                },
                "current_storage_gb": {
                    "type": "number"
                },
                "current_storage_tb": {
                    "type": "number"
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "series": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.StorageSeriesPoint"
                    }
                },
                "snapshots": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.StorageSnapshot"
                    }
                },
                "total_cost_cents": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.SubscriptionTier": {
            "type": "string",
            "enum": [
                "basic",
                "scale",
                "enterprise"
            ],
            "x-enum-varnames": [
                "TierBasic",
                "TierScale",
                "TierEnterprise"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_billing.SummaryComparison": {
            "type": "object",
            "properties": {
                "compute_cost_previous": {
                    "type": "integer"
                },
                "delta_pct": {
                    "type": "number"
                },
                "total_cost_previous": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.SummaryCompute": {
            "type": "object",
            "properties": {
                "by_tier": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.ComputeTierBreakdown"
                    }
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "total_pod_hours": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TierFeatures": {
            "type": "object",
            "properties": {
                "availability_zones": {
                    "type": "integer"
                },
                "cmek": {
                    "description": "Customer-Managed Encryption Keys",
                    "type": "boolean"
                },
                "custom_cloud_credentials": {
                    "description": "CustomCloudCredentials gates registering customer-owned cloud storage\n(custom cloud / BYOC) and its credentials. Paid tiers only.",
                    "type": "boolean"
                },
                "custom_integrations": {
                    "type": "boolean"
                },
                "named_engineer": {
                    "type": "boolean"
                },
                "private_networking": {
                    "type": "boolean"
                },
                "saml_sso": {
                    "type": "boolean"
                },
                "storage_limit_gb": {
                    "description": "-1 for unlimited",
                    "type": "integer"
                },
                "support_response_time": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TierUpdateRequest": {
            "type": "object",
            "properties": {
                "tier": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.SubscriptionTier"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TopUpRequest": {
            "type": "object",
            "properties": {
                "allow_promotion_codes": {
                    "type": "boolean"
                },
                "amount_cents": {
                    "type": "integer"
                },
                "cancel_url": {
                    "type": "string"
                },
                "success_url": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TracesUsageResponse": {
            "type": "object",
            "properties": {
                "as_of": {
                    "description": "snapshot date (YYYY-MM-DD)",
                    "type": "string"
                },
                "over_quota": {
                    "type": "boolean"
                },
                "pct_used": {
                    "type": "number"
                },
                "per_seat_query_quota": {
                    "type": "integer"
                },
                "per_seat_quota": {
                    "type": "integer"
                },
                "query_over_quota": {
                    "type": "boolean"
                },
                "query_pct_used": {
                    "type": "number"
                },
                "quota_queries": {
                    "type": "integer"
                },
                "quota_traces": {
                    "type": "integer"
                },
                "seat_count": {
                    "type": "integer"
                },
                "used_queries": {
                    "description": "Query usage this calendar month vs the pooled query quota.",
                    "type": "integer"
                },
                "used_traces": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TransactionType": {
            "type": "string",
            "enum": [
                "usage",
                "top_up",
                "refund",
                "adjustment",
                "initial_grant",
                "grant_expiry",
                "referral_bonus",
                "referral_reversal"
            ],
            "x-enum-varnames": [
                "TransactionUsage",
                "TransactionTopUp",
                "TransactionRefund",
                "TransactionAdjustment",
                "TransactionInitialGrant",
                "TransactionGrantExpiry",
                "TransactionReferralBonus",
                "TransactionReferralReversal"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TransferSeriesPoint": {
            "type": "object",
            "properties": {
                "bucket_start": {
                    "type": "string"
                },
                "cost_cents": {
                    "type": "integer"
                },
                "total_gb": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.TransferUsageResponse": {
            "type": "object",
            "properties": {
                "by_transfer_type": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "number",
                        "format": "float64"
                    }
                },
                "events": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.DataTransferEvent"
                    }
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                },
                "series": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.TransferSeriesPoint"
                    }
                },
                "total_cost_cents": {
                    "type": "integer"
                },
                "total_egress_gb": {
                    "type": "number"
                },
                "total_ingestion_gb": {
                    "type": "number"
                },
                "total_inter_region_gb": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.UsageByPodEntry": {
            "type": "object",
            "properties": {
                "cost_cents": {
                    "type": "integer"
                },
                "hours": {
                    "type": "number"
                },
                "pod_name": {
                    "type": "string"
                },
                "region": {
                    "type": "string"
                },
                "sessions": {
                    "type": "integer"
                },
                "tier": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.UsageByPodResponse": {
            "type": "object",
            "properties": {
                "entries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.UsageByPodEntry"
                    }
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.UsageByTableEntry": {
            "type": "object",
            "properties": {
                "cost_cents": {
                    "type": "integer"
                },
                "gpu_hours": {
                    "type": "number"
                },
                "query_count": {
                    "type": "integer"
                },
                "table_name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_billing.UsageByTableResponse": {
            "type": "object",
            "properties": {
                "entries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_billing.UsageByTableEntry"
                    }
                },
                "period_end": {
                    "type": "string"
                },
                "period_start": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.CreateRequest": {
            "type": "object",
            "properties": {
                "base_path": {
                    "type": "string"
                },
                "creds": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                },
                "storage_type": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.CreateResponse": {
            "type": "object",
            "properties": {
                "app_id": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "install_command": {
                    "type": "string"
                },
                "service_account_email": {
                    "description": "ServiceAccountEmail is populated for gcs_federated creds. It is the\nper-credential GCP service account the api-server provisioned; the\ncustomer must grant this SA bucket access for the credential to work.",
                    "type": "string"
                },
                "state": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CredentialState"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.CredentialDetail": {
            "type": "object",
            "properties": {
                "azure": {
                    "description": "Azure federated extras (nil for other storage types).",
                    "allOf": [
                        {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CredentialDetailAzure"
                        }
                    ]
                },
                "base_path": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "last_error_action": {
                    "type": "string"
                },
                "last_error_provider_error": {
                    "description": "LastErrorProviderError is the raw cloud-provider error text (e.g., the\nAzure ErrorCode). Useful for support/debugging when the user-friendly\nmessage is too generic — e.g., a 404 surfaces here as \"ContainerNotFound\"\nvs \"AccountNotFound\", which disambiguates two scenarios that look\nidentical in the friendly fields.",
                    "type": "string"
                },
                "last_error_reason": {
                    "type": "string"
                },
                "last_error_user_message": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "poll_deadline_at": {
                    "type": "string"
                },
                "state": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CredentialState"
                },
                "state_updated_at": {
                    "type": "string"
                },
                "storage_type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageType"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.CredentialDetailAzure": {
            "type": "object",
            "properties": {
                "app_id": {
                    "type": "string"
                },
                "container_name": {
                    "type": "string"
                },
                "install_command": {
                    "type": "string"
                },
                "resource_group": {
                    "type": "string"
                },
                "sp_object_id": {
                    "description": "SPObjectID is the customer-tenant service-principal's object ID,\ncaptured by the SP-poll worker once the customer has run\n`az ad sp create --id \u003cAPP_ID\u003e`. Populated from sp_verified onwards;\nnil while in draft / sp_pending. Surfaced so the wizard can render\nthe role-assignment step inline — the role grant needs the SP\nobject ID + storage scope, and we don't want the customer to copy\nit manually out of `az ad sp create` output.",
                    "type": "string"
                },
                "storage_account": {
                    "type": "string"
                },
                "subscription_id": {
                    "type": "string"
                },
                "tenant_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.CredentialState": {
            "type": "string",
            "enum": [
                "draft",
                "sp_pending",
                "sp_verified",
                "access_pending",
                "unverified_saved",
                "verified"
            ],
            "x-enum-varnames": [
                "StateDraft",
                "StateSPPending",
                "StateSPVerified",
                "StateAccessPending",
                "StateUnverifiedSaved",
                "StateVerified"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.CredentialSummary": {
            "type": "object",
            "properties": {
                "base_path": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "is_org_default": {
                    "type": "boolean"
                },
                "linked_workspaces": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                },
                "storage_type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageType"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.GenerateRequest": {
            "type": "object",
            "properties": {
                "expiration": {
                    "description": "seconds, default 3600",
                    "type": "integer"
                },
                "mode": {
                    "description": "\"read\", \"write\", \"readwrite\"",
                    "type": "string"
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.GeneratedCredentials": {
            "type": "object",
            "properties": {
                "creds": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "expiration": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.ListResponse": {
            "type": "object",
            "properties": {
                "credentials": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CredentialSummary"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.ManagedCredential": {
            "type": "object",
            "properties": {
                "base_path": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "string"
                },
                "encrypted_creds": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "id": {
                    "type": "string"
                },
                "last_error_action": {
                    "type": "string"
                },
                "last_error_reason": {
                    "type": "string"
                },
                "last_error_user_message": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "poll_deadline_at": {
                    "type": "string"
                },
                "salt": {
                    "type": "string"
                },
                "state": {
                    "description": "State-machine fields. For S3/GCS credentials, State is StateVerified and\nthe error fields are nil. Only azure_federated exercises the full machine.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.CredentialState"
                        }
                    ]
                },
                "state_updated_at": {
                    "type": "string"
                },
                "storage_type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageType"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.StorageByNameResponse": {
            "type": "object",
            "properties": {
                "base_path": {
                    "type": "string"
                },
                "creds": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "date_created": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "organization": {
                    "type": "string"
                },
                "repo_type": {
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageType"
                },
                "user": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.StorageType": {
            "type": "string",
            "enum": [
                "s3",
                "s3:role",
                "gcs",
                "gcs_federated",
                "azure",
                "azure_federated"
            ],
            "x-enum-varnames": [
                "StorageTypeS3",
                "StorageTypeS3Role",
                "StorageTypeGCS",
                "StorageTypeGCSFederated",
                "StorageTypeAzure",
                "StorageTypeAzureFederated"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_credentials.UpdateCredsRequest": {
            "type": "object",
            "properties": {
                "creds": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_files.DeleteFileResponse": {
            "type": "object",
            "properties": {
                "deleted": {
                    "type": "boolean"
                },
                "id": {
                    "type": "string"
                },
                "object": {
                    "description": "Always \"file\"",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_files.File": {
            "type": "object",
            "properties": {
                "bytes": {
                    "type": "integer"
                },
                "created_at": {
                    "description": "Unix timestamp",
                    "type": "integer"
                },
                "expires_at": {
                    "description": "Nullable Unix timestamp",
                    "type": "integer"
                },
                "filename": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "metadata": {
                    "description": "Always include, empty map if none",
                    "type": "object",
                    "additionalProperties": {}
                },
                "mime_type": {
                    "type": "string"
                },
                "object": {
                    "description": "Always \"file\"",
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "purpose": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_files.FilePurpose"
                },
                "status": {
                    "type": "string"
                },
                "status_details": {
                    "description": "Always include, null if empty",
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_files.FilePurpose": {
            "type": "string",
            "enum": [
                "batch",
                "batch_output",
                "vision",
                "user_data",
                "evals"
            ],
            "x-enum-varnames": [
                "FilePurposeBatch",
                "FilePurposeBatchOutput",
                "FilePurposeVision",
                "FilePurposeUserData",
                "FilePurposeEvals"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_files.ListFilesResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_files.File"
                    }
                },
                "object": {
                    "description": "Always \"list\"",
                    "type": "string"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_httpapi_httpx.ErrorResponse": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "detail": {
                    "description": "Additional context (e.g. JSON parse error specifics)",
                    "type": "string"
                },
                "error": {
                    "type": "string"
                },
                "request_id": {
                    "type": "string"
                },
                "verification": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_httpapi_httpx.VerificationFailure"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_httpapi_httpx.VerificationFailure": {
            "type": "object",
            "properties": {
                "action": {
                    "type": "string"
                },
                "provider_error": {
                    "type": "string"
                },
                "reason": {
                    "type": "string"
                },
                "user_message": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_identities.ListResponse": {
            "type": "object",
            "properties": {
                "workload_identities": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentity"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_identities.RegisterRequest": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "workload_identity_data": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentityData"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentity": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentityType"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentityData": {
            "type": "object",
            "properties": {
                "type": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentityType"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_identities.WorkloadIdentityType": {
            "type": "string",
            "enum": [
                "azure",
                "aws",
                "gcs"
            ],
            "x-enum-varnames": [
                "WorkloadIdentityTypeAzure",
                "WorkloadIdentityTypeAWS",
                "WorkloadIdentityTypeGCS"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_notifications.ListResponse": {
            "type": "object",
            "properties": {
                "notifications": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_notifications.Notification"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_notifications.Notification": {
            "type": "object",
            "properties": {
                "body": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "dedup_key": {
                    "type": "string"
                },
                "dismissed_at": {
                    "type": "string"
                },
                "expires_at": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "severity": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_notifications.Severity"
                },
                "target_org_id": {
                    "type": "string"
                },
                "target_user_id": {
                    "type": "string"
                },
                "targets": {
                    "description": "Targets controls which consumers (hivemind, ui, email, slack, ...)\nreceive this notification. ListForUser filters with `$target =\nANY(targets)`. See migration 22 for design rationale.",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_notifications.Severity": {
            "type": "string",
            "enum": [
                "info",
                "warn",
                "error"
            ],
            "x-enum-varnames": [
                "SeverityInfo",
                "SeverityWarn",
                "SeverityError"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_orgdb.CredentialInfoResponse": {
            "type": "object",
            "properties": {
                "database": {
                    "type": "string"
                },
                "host": {
                    "type": "string"
                },
                "port": {
                    "type": "integer"
                },
                "ssl_mode": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgdb.RotateCredentialResponse": {
            "type": "object",
            "properties": {
                "database": {
                    "type": "string"
                },
                "host": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "password": {
                    "description": "#nosec G117 -- intentionally returned to user after credential rotation",
                    "type": "string"
                },
                "port": {
                    "type": "integer"
                },
                "ssl_mode": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.CreateOrganizationRequest": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "Organization ID (3-50 chars, alphanumeric with hyphens/underscores)",
                    "type": "string"
                },
                "name": {
                    "description": "Display name (defaults to ID if not provided)",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.InviteMemberRequest": {
            "type": "object",
            "properties": {
                "access_mode": {
                    "description": "READ, WRITE, or ADMIN; defaults to READ when Workspaces is set",
                    "type": "string"
                },
                "username": {
                    "description": "Username or email",
                    "type": "string"
                },
                "workspaces": {
                    "description": "optional per-workspace grants",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.WorkspaceGrant"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.Member": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "is_creator": {
                    "description": "true for the org creator",
                    "type": "boolean"
                },
                "membership_type": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "role": {
                    "description": "admin, writer, viewer",
                    "type": "string"
                },
                "status": {
                    "description": "\"active\" or \"pending\"",
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.MembersResponse": {
            "type": "object",
            "properties": {
                "members": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.Member"
                    }
                },
                "total_count": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.Organization": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "creator": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "strict_mode": {
                    "type": "boolean"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.OrganizationResponse": {
            "type": "object",
            "properties": {
                "member_count": {
                    "type": "integer"
                },
                "organization": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_orgs.Organization"
                },
                "pending_invites_count": {
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.UpdateOrganizationRequest": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.UpdatePermissionsRequest": {
            "type": "object",
            "properties": {
                "permissions": {
                    "description": "Permissions maps user IDs to their access levels.\nKeys are user UUIDs, values are: \"read\", \"write\", or \"admin\" (case-insensitive)",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "example": {
                        "\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"": "\"admin\"}",
                        "{\"550e8400-e29b-41d4-a716-446655440000\"": "\"read\""
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.UpdateStrictModeRequest": {
            "type": "object",
            "properties": {
                "strict_mode": {
                    "type": "boolean"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_orgs.WorkspaceGrant": {
            "type": "object",
            "properties": {
                "role": {
                    "description": "viewer, writer, admin",
                    "type": "string"
                },
                "workspace_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_querysuggestion.ExplorationQuery": {
            "type": "object",
            "properties": {
                "label": {
                    "type": "string"
                },
                "sql": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_querysuggestion.ExplorationResponse": {
            "type": "object",
            "properties": {
                "queries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_querysuggestion.ExplorationQuery"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_querysuggestion.SuggestQueryRequest": {
            "type": "object",
            "properties": {
                "human_query": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_querysuggestion.SuggestQueryResponse": {
            "type": "object",
            "properties": {
                "query": {
                    "type": "string"
                },
                "response": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_repositories.CreateRequest": {
            "type": "object",
            "properties": {
                "bucket_path": {
                    "type": "string"
                },
                "make_default": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "storage_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_repositories.ListResponse": {
            "type": "object",
            "properties": {
                "repositories": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_repositories.RepositorySummary"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_repositories.Repository": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "dtype": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageType"
                },
                "id": {
                    "type": "string"
                },
                "is_default": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "storage_id": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_repositories.RepositorySummary": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "dtype": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_credentials.StorageType"
                },
                "id": {
                    "type": "string"
                },
                "is_default": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "storage_id": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_repositories.SetDefaultRequest": {
            "type": "object",
            "properties": {
                "repository_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.BatchQueryResult": {
            "type": "object",
            "properties": {
                "affected_rows": {
                    "type": "integer"
                },
                "execution_time_ms": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.ColumnAggregates": {
            "type": "object",
            "properties": {
                "avg": {
                    "type": "number"
                },
                "max": {
                    "type": "number"
                },
                "min": {
                    "type": "number"
                },
                "stddev": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.ColumnStatistics": {
            "type": "object",
            "properties": {
                "aggregates": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.ColumnAggregates"
                },
                "column_name": {
                    "type": "string"
                },
                "correlation": {
                    "type": "number"
                },
                "data_type": {
                    "type": "string"
                },
                "histogram_bounds": {
                    "type": "array",
                    "items": {}
                },
                "most_common_freqs": {
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "most_common_vals": {
                    "type": "array",
                    "items": {}
                },
                "n_distinct": {
                    "type": "number"
                },
                "null_frac": {
                    "type": "number"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.CreateTableRequest": {
            "type": "object",
            "properties": {
                "columns": {
                    "description": "Optional: explicit column order. If not provided, columns are sorted alphabetically",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "table_name": {
                    "type": "string"
                },
                "table_schema": {
                    "description": "column_name -\u003e column_definition",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.ExecuteBatchQueryRequest": {
            "type": "object",
            "properties": {
                "params_batch": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {}
                    }
                },
                "query": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.ExecuteQueryRequest": {
            "type": "object",
            "properties": {
                "params": {
                    "type": "array",
                    "items": {}
                },
                "query": {
                    "type": "string"
                },
                "timeout_ms": {
                    "description": "optional query timeout in milliseconds (max 300000)",
                    "type": "integer"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.QueryResult": {
            "type": "object",
            "properties": {
                "columns": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "execution_time_ms": {
                    "type": "number"
                },
                "row_count": {
                    "type": "integer"
                },
                "rows": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {}
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.TableColumn": {
            "type": "object",
            "properties": {
                "default": {
                    "description": "Nullable",
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "nullable": {
                    "type": "boolean"
                },
                "type": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.TableMetadata": {
            "type": "object",
            "properties": {
                "columns": {
                    "description": "Empty array for list response",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableColumn"
                    }
                },
                "num_queries": {
                    "description": "Omitted from list endpoint; available via /tables/stats",
                    "type": "integer"
                },
                "row_count": {
                    "description": "Nullable, omitted from list endpoint",
                    "type": "integer"
                },
                "size_mb": {
                    "description": "Nullable, in megabytes, omitted from list endpoint",
                    "type": "number"
                },
                "table_name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.TableSchema": {
            "type": "object",
            "properties": {
                "columns": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.TableColumn"
                    }
                },
                "row_count": {
                    "description": "Nullable",
                    "type": "integer"
                },
                "table_name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.TableStatistics": {
            "type": "object",
            "properties": {
                "columns": {
                    "type": "object",
                    "additionalProperties": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_tables.ColumnStatistics"
                    }
                },
                "stats_available": {
                    "type": "boolean"
                },
                "table_name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_tables.TableStatsEntry": {
            "type": "object",
            "properties": {
                "num_queries": {
                    "type": "integer"
                },
                "row_count": {
                    "type": "integer"
                },
                "size_mb": {
                    "type": "number"
                },
                "table_name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.AddUserRequest": {
            "type": "object",
            "properties": {
                "access": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceAccessMode"
                },
                "user": {
                    "description": "Username, email, or user ID",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.CreateWorkspaceRequest": {
            "type": "object",
            "properties": {
                "credential_id": {
                    "description": "Optional managed credential to bind at creation; pins workspace storage to that credential's base_path. Must belong to the same org.",
                    "type": "string"
                },
                "id": {
                    "description": "Workspace ID (1-36 chars, alphanumeric with hyphens/underscores)",
                    "type": "string"
                },
                "name": {
                    "description": "Display name (defaults to ID if not provided)",
                    "type": "string"
                },
                "type": {
                    "description": "Workspace type ID (defaults to \"generic\" if not provided)",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.LinkCredentialRequest": {
            "type": "object",
            "properties": {
                "credential_id": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.StoragePathResponse": {
            "type": "object",
            "properties": {
                "credential_id": {
                    "description": "The resolved credential ID (uuid.Nil when source is \"default\")",
                    "type": "string"
                },
                "source": {
                    "description": "\"workspace_credential\", \"org_credential\", or \"default\"",
                    "type": "string"
                },
                "storage_path": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.UpdateUserAccessRequest": {
            "type": "object",
            "properties": {
                "access": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceAccessMode"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.UpdateWorkspacePermissionsRequest": {
            "type": "object",
            "properties": {
                "permissions": {
                    "description": "Permissions maps user IDs to their access levels.\nKeys are user UUIDs, values are: \"viewer\", \"writer\", \"admin\", or \"blocked\"\nUse \"blocked\" to revoke a user's workspace access (even if they have org access)\nUse \"none\" or empty string to remove all direct access (user falls back to org-level access)",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    },
                    "example": {
                        "\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"": "\"blocked\"}",
                        "{\"550e8400-e29b-41d4-a716-446655440000\"": "\"viewer\""
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.UpdateWorkspaceRequest": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "Display name (required)",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.UpdateWorkspacesTypeRequest": {
            "type": "object",
            "properties": {
                "type": {
                    "description": "Workspace type: agentic_loops, physical_ai, generative_media, or generic",
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.Workspace": {
            "type": "object",
            "properties": {
                "access_level": {
                    "description": "Response-only fields (populated when fetching with user permissions)",
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "creator_id": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceAccessMode": {
            "type": "string",
            "enum": [
                "viewer",
                "writer",
                "admin"
            ],
            "x-enum-varnames": [
                "AccessModeViewer",
                "AccessModeWriter",
                "AccessModeAdmin"
            ]
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceResponse": {
            "type": "object",
            "properties": {
                "workspace": {
                    "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.Workspace"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceType": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceTypesResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceType"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceUser": {
            "type": "object",
            "properties": {
                "access": {
                    "description": "viewer, writer, admin",
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "is_creator": {
                    "description": "true for the workspace creator",
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "user_id": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceUsersResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.WorkspaceUser"
                    }
                }
            }
        },
        "github_com_activeloopai_deeplake-api_internal_workspaces.WorkspacesResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/github_com_activeloopai_deeplake-api_internal_workspaces.Workspace"
                    }
                }
            }
        },
        "internal_httpapi_billingapi.setAutoTopUpRequest": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean"
                },
                "target_cents": {
                    "type": "integer"
                },
                "threshold_cents": {
                    "type": "integer"
                }
            }
        },
        "internal_httpapi_billingapi.setBudgetRequest": {
            "type": "object",
            "properties": {
                "alert_threshold_pcts": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "monthly_limit_cents": {
                    "type": "integer"
                },
                "paused": {
                    "type": "boolean"
                }
            }
        },
        "internal_httpapi_credsapi.SubmitAzureStorageRequestBody": {
            "type": "object",
            "properties": {
                "container_name": {
                    "description": "optional; empty = account-wide scope",
                    "type": "string"
                },
                "resource_group": {
                    "type": "string"
                },
                "storage_account": {
                    "type": "string"
                },
                "subscription_id": {
                    "type": "string"
                }
            }
        },
        "internal_httpapi_credsapi.SubmitAzureTenantRequest": {
            "type": "object",
            "properties": {
                "tenant_id": {
                    "type": "string"
                }
            }
        },
        "internal_httpapi_tablesapi.tableCredsResponse": {
            "type": "object",
            "properties": {
                "creds": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "mode": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "repo_type": {
                    "type": "string"
                }
            }
        },
        "internal_httpapi_usersapi.DeviceCodeResponse": {
            "description": "Device code response for CLI authentication",
            "type": "object",
            "properties": {
                "device_code": {
                    "description": "DeviceCode is used when polling for the token (keep secret)",
                    "type": "string"
                },
                "expires_in": {
                    "description": "ExpiresIn is the lifetime of the device code in seconds",
                    "type": "integer"
                },
                "interval": {
                    "description": "Interval is the minimum polling interval in seconds",
                    "type": "integer"
                },
                "user_code": {
                    "description": "UserCode is displayed to the user to enter in browser",
                    "type": "string"
                },
                "verification_uri": {
                    "description": "VerificationURI is the URL the user should visit",
                    "type": "string"
                },
                "verification_uri_complete": {
                    "description": "VerificationURIComplete is the full URL with code pre-filled",
                    "type": "string"
                }
            }
        },
        "internal_httpapi_usersapi.DeviceFlowErrorResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "description": "Error code: \"authorization_pending\", \"slow_down\", \"expired_token\", \"access_denied\"",
                    "type": "string"
                },
                "error_description": {
                    "description": "ErrorDescription provides more detail about the error",
                    "type": "string"
                }
            }
        },
        "internal_httpapi_usersapi.DeviceTokenRequest": {
            "type": "object",
            "properties": {
                "device_code": {
                    "description": "DeviceCode from the initial device code response",
                    "type": "string"
                }
            }
        },
        "internal_httpapi_usersapi.DeviceTokenResponse": {
            "description": "Token response after successful device authentication",
            "type": "object",
            "properties": {
                "access_token": {
                    "description": "AccessToken is the JWT access token",
                    "type": "string"
                },
                "expires_in": {
                    "description": "ExpiresIn is the lifetime of the access token in seconds",
                    "type": "integer"
                },
                "refresh_token": {
                    "description": "RefreshToken for obtaining new access tokens (if offline_access scope was granted)",
                    "type": "string"
                },
                "token_type": {
                    "description": "TokenType is always \"Bearer\"",
                    "type": "string"
                }
            }
        },
        "internal_httpapi_usersapi.HivemindStatsResponse": {
            "type": "object",
            "properties": {
                "org": {
                    "$ref": "#/definitions/internal_httpapi_usersapi.HivemindStatsScope"
                },
                "user": {
                    "$ref": "#/definitions/internal_httpapi_usersapi.HivemindStatsScope"
                }
            }
        },
        "internal_httpapi_usersapi.HivemindStatsScope": {
            "type": "object",
            "properties": {
                "memory_recall_count": {
                    "type": "integer"
                },
                "memory_search_bytes": {
                    "type": "integer"
                },
                "sessions_count": {
                    "type": "integer"
                }
            }
        },
        "internal_httpapi_usersapi.UpdateProfileRequest": {
            "type": "object",
            "properties": {
                "phone_number": {
                    "type": "string"
                }
            }
        },
        "internal_httpapi_usersapi.UserProfileResponse": {
            "type": "object",
            "properties": {
                "date_joined": {
                    "description": "Unix timestamp",
                    "type": "integer"
                },
                "display_name": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "onboarding_completed_at": {
                    "description": "Unix timestamp, nil if not completed",
                    "type": "integer"
                },
                "organizations": {
                    "description": "Array of org IDs (matches neohorizon)",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "phone_number": {
                    "description": "E.164 phone number incl. country prefix; nil when unset",
                    "type": "string"
                },
                "referred_from_orgs": {
                    "description": "Org IDs from accepted invites (only on first request after signup)",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "signup_flow": {
                    "description": "Product entry point the user signed up through (e.g. \"hivemind\"); nil when un-tagged",
                    "type": "string"
                },
                "verified": {
                    "type": "boolean"
                }
            }
        }
    },
    "securityDefinitions": {
        "BearerAuth": {
            "description": "Type \"Bearer\" followed by a space and JWT token (OIDC) or API token.",
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}