{
  "openapi": "3.1.0",
  "info": {
    "title": "Groundbox API",
    "version": "1.0.0",
    "description": "GitHub Actions runners and Linux sandboxes for AI agents, by API.\n\nAuth: `Authorization: Bearer gbx_...` with an API key from the dashboard (or `groundbox signup` for an agent). Each key has scopes; each operation lists the one it needs under `x-required-scope`. A key without it gets 403 `missing_scope`.\n\nScopes: `sandboxes:read`, `sandboxes:write`, `schedules:read`, `schedules:write`, `ci:read`, `ci:write`, `builds:read`, `builds:write`, `registry:pull`, `registry:push`, `billing:read`, `account:read`, `cache:read`, `cache:write`, `storage:read`, `storage:write`, `secrets:read`, `secrets:write`, `secrets:use`.\n\nErrors: every non-2xx answer is `{\"error\": {\"code\", \"message\", \"request_id\", \"details\"}}`. Codes: `bad_request`, `unauthorized`, `key_pending_claim`, `forbidden`, `github_org_restricted`, `missing_scope`, `not_found`, `conflict`, `idempotency_key_reused`, `insufficient_balance`, `spend_cap_reached`, `paid_plan_required`, `trial_limit`, `trial_credit_exhausted`, `concurrency_limit`, `team_held`, `team_suspended`, `no_capacity`, `not_available`, `rate_limited`, `busy`, `upgrade_required`, `timeout`, `internal`.\n\nRetries: calls that make something take an `Idempotency-Key` header. A replay answers with `Idempotent-Replayed: true`.\n\nLists: pass `limit` and `cursor`; the answer's `next_cursor` is null on the last page.\n\nDocs: https://groundbox.dev/docs/api"
  },
  "servers": [
    {
      "url": "https://api.groundbox.dev/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Sandboxes",
      "description": "Start, list, change, pause, stop and delete sandboxes."
    },
    {
      "name": "Commands",
      "description": "Run commands in a sandbox, in one call or in the background, and read their output."
    },
    {
      "name": "Files",
      "description": "Read, write, list and delete files in a sandbox."
    },
    {
      "name": "Snapshots",
      "description": "Save points, rewind, forks and snapshots kept beyond their sandbox."
    },
    {
      "name": "Templates",
      "description": "Build a sandbox's disk once and start sandboxes from it."
    },
    {
      "name": "Volumes",
      "description": "Disks that outlive sandboxes."
    },
    {
      "name": "Secrets",
      "description": "Team secrets, given to sandboxes by name. Values are write-only."
    },
    {
      "name": "Agent computers",
      "description": "Computer-use actions, live view links and human handoff on desktop sandboxes."
    },
    {
      "name": "Previews",
      "description": "A port in a sandbox at an HTTPS address, and custom domains for it."
    },
    {
      "name": "Schedules",
      "description": "Run a command in a fresh sandbox on a cron schedule."
    },
    {
      "name": "CI",
      "description": "Runs, jobs, logs, insights, auto size and test results for GitHub Actions on Groundbox."
    },
    {
      "name": "Tune-ups",
      "description": "An agent proposes one pull request that makes a repository's CI faster."
    },
    {
      "name": "Builds",
      "description": "Remote Docker builders, builds and the build cache."
    },
    {
      "name": "Registry",
      "description": "The team's private container image registry."
    },
    {
      "name": "Storage",
      "description": "S3-compatible buckets, objects and access keys."
    },
    {
      "name": "Account",
      "description": "The team's account, balance, ledger and feedback."
    },
    {
      "name": "Sign-up",
      "description": "Keys for agents and devices. These take no key."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/sandboxes": {
      "post": {
        "operationId": "createSandbox",
        "summary": "Create a sandbox",
        "description": "Starts a Linux VM. Billed by the second until it stops. Give `template`, `image` or `snapshot_id` to start from one.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retries with the same key answer with what the first request made, and make nothing new. The same key with a different request is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSandboxRequestInput"
              },
              "example": {
                "cpus": 2,
                "timeout_minutes": 10
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listSandboxes",
        "summary": "List sandboxes",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          },
          {
            "name": "live",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              ]
            }
          },
          {
            "name": "metadata",
            "in": "query",
            "required": false,
            "schema": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "additionalProperties": {
                "type": "string",
                "maxLength": 512
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSandboxesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}": {
      "get": {
        "operationId": "getSandbox",
        "summary": "Get a sandbox",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "patch": {
        "operationId": "updateSandbox",
        "summary": "Update a sandbox",
        "description": "Change its timeout, metadata or egress allowlist.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSandboxRequestInput"
              },
              "example": {
                "timeout_minutes": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteSandbox",
        "summary": "Delete a sandbox",
        "description": "Stops it and deletes its disk. Cannot be undone.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/exec": {
      "post": {
        "operationId": "exec",
        "summary": "Run a command",
        "description": "Runs it and answers when it exits, with its output and exit code.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecRequestInput"
              },
              "example": {
                "cmd": "uname -a && nproc"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/exec/stream": {
      "get": {
        "operationId": "execStream",
        "summary": "Run a command over a WebSocket",
        "description": "Output as it comes, stdin and terminal resize. Use the SDK or the CLI.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols: the connection is now a WebSocket."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/commands": {
      "get": {
        "operationId": "listCommands",
        "summary": "List commands",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "running",
                "exited",
                "lost"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCommandsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "operationId": "startCommand",
        "summary": "Start a command in the background",
        "description": "Answers at once with the command's id. Read its output with `GET .../commands/{exec_id}/output`.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCommandRequestInput"
              },
              "example": {
                "cmd": "sleep 60"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxCommand"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/commands/{exec_id}": {
      "get": {
        "operationId": "getCommand",
        "summary": "Get a command",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exec_id",
            "in": "path",
            "required": true,
            "description": "The command's id, from the list of commands.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxCommand"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/commands/{exec_id}/output": {
      "get": {
        "operationId": "getCommandOutput",
        "summary": "Read a command's output",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exec_id",
            "in": "path",
            "required": true,
            "description": "The command's id, from the list of commands.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "seq",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "encoding",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "utf8",
                "base64"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandOutputResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/commands/{exec_id}/kill": {
      "post": {
        "operationId": "killCommand",
        "summary": "Kill a command",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exec_id",
            "in": "path",
            "required": true,
            "description": "The command's id, from the list of commands.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KillCommandRequestInput"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxCommand"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/files": {
      "put": {
        "operationId": "writeFile",
        "summary": "Write a file",
        "description": "The body is the file's bytes.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "format": "starts_with",
              "pattern": "^\\/.*"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteFileResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "readFiles",
        "summary": "Read a file or list a folder",
        "description": "With `path`, the file's bytes. With `dir`, the folder's entries as JSON. Pass exactly one.\n\nScope: `sandboxes:read`.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "format": "starts_with",
              "pattern": "^\\/.*"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "format": "starts_with",
              "pattern": "^\\/.*"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file's bytes (`path`), or the folder's entries (`dir`).",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFilesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteFile",
        "summary": "Delete a file or folder",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "format": "starts_with",
              "pattern": "^\\/.*"
            }
          },
          {
            "name": "recursive",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteFileResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/files/mkdir": {
      "post": {
        "operationId": "makeDir",
        "summary": "Make a folder",
        "description": "Makes the parents it needs. A folder already there is fine (`created: false`).\n\nScope: `sandboxes:write`.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "format": "starts_with",
              "pattern": "^\\/.*"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MakeDirResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/files/stat": {
      "get": {
        "operationId": "statFile",
        "summary": "Get a file's details",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Files"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "format": "starts_with",
              "pattern": "^\\/.*"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileEntry"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/pause": {
      "post": {
        "operationId": "pauseSandbox",
        "summary": "Pause a sandbox",
        "description": "Keeps its memory and disk. Billed for storage only while paused. The body may be left out.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/resume": {
      "post": {
        "operationId": "resumeSandbox",
        "summary": "Resume a paused sandbox",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/stop": {
      "post": {
        "operationId": "stopSandbox",
        "summary": "Stop a sandbox",
        "description": "Shuts it down and keeps its disk: status `shut_down`, storage only.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/start": {
      "post": {
        "operationId": "startSandbox",
        "summary": "Start a stopped sandbox",
        "description": "Boots it again from its kept disk: same id, a fresh VM.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sandbox"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/fork": {
      "post": {
        "operationId": "forkSandbox",
        "summary": "Fork a sandbox",
        "description": "A copy of the running VM. With `count`, `snapshot_id` or `size` the answer is a fork group.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retries with the same key answer with what the first request made, and make nothing new. The same key with a different request is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForkSandboxRequestInput"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForkSandboxResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/timeline": {
      "get": {
        "operationId": "getTimeline",
        "summary": "Get a sandbox's timeline",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTimeline"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "operationId": "setTimeline",
        "summary": "Set automatic save points",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTimelineRequestInput"
              },
              "example": {
                "interval_s": 60,
                "keep": 10
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTimeline"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/snapshots": {
      "post": {
        "operationId": "createSnapshot",
        "summary": "Make a save point now",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSnapshotRequestInput"
              },
              "example": {
                "label": "deps installed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelinePoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/snapshots/{snapshot_id}": {
      "delete": {
        "operationId": "deleteSavePoint",
        "summary": "Delete a save point",
        "description": "409 while a fork group is being restored from it.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "snapshot_id",
            "in": "path",
            "required": true,
            "description": "The save point's id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTimeline"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/restore": {
      "post": {
        "operationId": "restoreSandbox",
        "summary": "Rewind to a save point",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreSandboxRequestInput"
              },
              "example": {
                "snapshot_id": "snp_..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoreSandboxResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/snapshots": {
      "post": {
        "operationId": "keepSnapshot",
        "summary": "Keep a snapshot",
        "description": "Keeps a moment of a sandbox beyond the sandbox. Billed per GB-month until deleted. Waits up to a minute; then answers with status `creating`.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retries with the same key answer with what the first request made, and make nothing new. The same key with a different request is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeepSnapshotRequestInput"
              },
              "example": {
                "sandbox_id": "sbx_...",
                "label": "deps installed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listSnapshots",
        "summary": "List snapshots",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "sandbox_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^sbx_[A-Za-z0-9]{8,40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSnapshotsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/snapshots/{id}": {
      "get": {
        "operationId": "getSnapshot",
        "summary": "Get a snapshot",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteSnapshot",
        "summary": "Delete a snapshot",
        "description": "Sandboxes already started from it go on. 409 while one is still starting from it.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/fork-groups/{id}": {
      "get": {
        "operationId": "getForkGroup",
        "summary": "Get a fork group",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForkGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteForkGroup",
        "summary": "Delete a fork group",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Snapshots"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForkGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/usage": {
      "get": {
        "operationId": "getSandboxUsage",
        "summary": "Get a sandbox's usage and cost",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxUsage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/templates": {
      "post": {
        "operationId": "createTemplate",
        "summary": "Create a template",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retries with the same key answer with what the first request made, and make nothing new. The same key with a different request is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateRequestInput"
              },
              "example": {
                "name": "python-ml",
                "image": "python:3.12-slim",
                "pip": [
                  "numpy",
                  "pandas"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listTemplates",
        "summary": "List templates",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "include_hidden",
            "in": "query",
            "required": false,
            "schema": {
              "default": "false",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTemplatesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/templates/{id}": {
      "get": {
        "operationId": "getTemplate",
        "summary": "Get a template",
        "description": "`{id}` is the id or the name.\n\nScope: `sandboxes:read`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteTemplate",
        "summary": "Delete a template",
        "description": "Its versions stop at once; sandboxes running from it go on.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/templates/{id}/builds": {
      "post": {
        "operationId": "buildTemplate",
        "summary": "Build a new version",
        "description": "An empty body builds the newest version's spec again, with fresh packages.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retries with the same key answer with what the first request made, and make nothing new. The same key with a different request is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateBuildSpecInput"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateBuild"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listTemplateBuilds",
        "summary": "List a template's versions",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTemplateBuildsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/templates/{id}/builds/{version}/logs": {
      "get": {
        "operationId": "getTemplateLogs",
        "summary": "Read a version's build log",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "description": "The template version.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "default": -1,
              "type": "integer",
              "minimum": -1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "wait_s",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateLogsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/templates/default": {
      "get": {
        "operationId": "getDefaultTemplate",
        "summary": "Get the default template",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "operationId": "setDefaultTemplate",
        "summary": "Set the default template",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Templates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultTemplateRequestInput"
              },
              "example": {
                "template": "python-ml"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultTemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/domains": {
      "post": {
        "operationId": "createDomain",
        "summary": "Claim a custom domain",
        "description": "Answers with the two DNS records to add.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomDomainRequestInput"
              },
              "example": {
                "domain": "app.example.com"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDomain"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listDomains",
        "summary": "List custom domains",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCustomDomainsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/domains/{domain}": {
      "get": {
        "operationId": "getDomain",
        "summary": "Get a custom domain",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "The domain, like app.example.com.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDomain"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "patch": {
        "operationId": "updateDomain",
        "summary": "Attach a domain to a preview",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "The domain, like app.example.com.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomDomainRequestInput"
              },
              "example": {
                "preview": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDomain"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteDomain",
        "summary": "Remove a custom domain",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "The domain, like app.example.com.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/domains/{domain}/verify": {
      "post": {
        "operationId": "verifyDomain",
        "summary": "Check a domain's DNS records",
        "description": "Verified: the certificate is asked for. Not yet: 200 with `dns[].ok` saying which record is missing.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "The domain, like app.example.com.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDomain"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/tcp/{port}": {
      "get": {
        "operationId": "tcpTunnel",
        "summary": "Open a TCP tunnel to a port",
        "description": "A WebSocket. Binary messages are the connection's bytes, each way. For a database, SSH or anything that is not HTTP. `groundbox sandbox tcp` uses it.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Sandboxes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "description": "The port in the sandbox.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols: the connection is now a WebSocket."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/secrets/{name}": {
      "put": {
        "operationId": "setSecret",
        "summary": "Set a secret",
        "description": "Sets a team secret or replaces its value. The value is write-only.\n\nScope: `secrets:write`.",
        "tags": [
          "Secrets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "secrets:write",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSecretRequestInput"
              },
              "example": {
                "value": "s3cr3t"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Secret"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteSecret",
        "summary": "Delete a secret",
        "description": "Sandboxes that use it fail their next command with 409 until it is set again.\n\nScope: `secrets:write`.",
        "tags": [
          "Secrets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "secrets:write",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/secrets": {
      "get": {
        "operationId": "listSecrets",
        "summary": "List secrets",
        "description": "Names and dates. Never values.\n\nScope: `secrets:read`.",
        "tags": [
          "Secrets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "secrets:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSecretsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/volumes": {
      "post": {
        "operationId": "createVolume",
        "summary": "Create a volume",
        "description": "Billed per GB-month for its whole size until it is deleted.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Volumes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Retries with the same key answer with what the first request made, and make nothing new. The same key with a different request is a 409.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVolumeRequestInput"
              },
              "example": {
                "name": "data",
                "size_gb": 10
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Volume"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listVolumes",
        "summary": "List volumes",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Volumes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListVolumesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/volumes/{id}": {
      "get": {
        "operationId": "getVolume",
        "summary": "Get a volume",
        "description": "`{id}` is the id or the name.\n\nScope: `sandboxes:read`.",
        "tags": [
          "Volumes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Volume"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteVolume",
        "summary": "Delete a volume",
        "description": "409 while it is attached to a sandbox that is not stopped. The data cannot be had back.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Volumes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Volume"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/computer": {
      "post": {
        "operationId": "computerAction",
        "summary": "Do a computer-use action",
        "description": "One action on a desktop sandbox, in the shape computer-use models emit. 409 (`human_in_control`) while a person has control; 429 past the per-desktop rate.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComputerActionInput"
              },
              "example": {
                "action": "screenshot"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputerActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/handoff": {
      "get": {
        "operationId": "getHandoff",
        "summary": "Get the handoff state",
        "description": "With `after` (a version) and `wait_s`, waits up to 25 seconds for a change.\n\nScope: `sandboxes:read`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "wait_s",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandoffState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "operationId": "requestHandoff",
        "summary": "Ask a person to take control",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestHandoffRequestInput"
              },
              "example": {
                "reason": "Sign in and pass the 2FA prompt"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandoffState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/handoff/cancel": {
      "post": {
        "operationId": "cancelHandoff",
        "summary": "Withdraw a handoff request",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandoffState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/handoff/take": {
      "post": {
        "operationId": "takeControl",
        "summary": "Take control",
        "description": "A person takes control, from your own app's button. The body may be left out.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TakeControlRequestInput"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandoffState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/handoff/return": {
      "post": {
        "operationId": "returnControl",
        "summary": "Give control back",
        "description": "The person is done: the agent resumes. The body may be left out.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnControlRequestInput"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandoffState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/desktop/links": {
      "post": {
        "operationId": "createDesktopLink",
        "summary": "Create a live view link",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDesktopLinkRequestInput"
              },
              "example": {
                "control": false,
                "expires_in_minutes": 60
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDesktopLinkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listDesktopLinks",
        "summary": "List live view links",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDesktopLinksResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/desktop/links/{link_id}": {
      "delete": {
        "operationId": "revokeDesktopLink",
        "summary": "Revoke a live view link",
        "description": "Open viewers are cut off at once.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Agent computers"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "link_id",
            "in": "path",
            "required": true,
            "description": "The live view link's id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DesktopLink"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/previews": {
      "post": {
        "operationId": "createPreview",
        "summary": "Expose a port",
        "description": "A port in the sandbox at an HTTPS URL. Private unless `public: true`. 201 when made, 200 when the port has one already.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePreviewRequestInput"
              },
              "example": {
                "port": 3000
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPreview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listPreviews",
        "summary": "List a sandbox's previews",
        "description": "Scope: `sandboxes:read`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPreviewsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandboxes/{id}/previews/{port}": {
      "patch": {
        "operationId": "updatePreview",
        "summary": "Update a preview",
        "description": "Scope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "description": "The port in the sandbox.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePreviewRequestInput"
              },
              "example": {
                "public": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxPreview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deletePreview",
        "summary": "Remove a preview",
        "description": "Its URL stops working.\n\nScope: `sandboxes:write`.",
        "tags": [
          "Previews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "sandboxes:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "description": "The port in the sandbox.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/previews/report": {
      "post": {
        "operationId": "reportPreview",
        "summary": "Report a preview",
        "description": "Anyone may report a preview for phishing or malware. No key.\n\nNo key.",
        "tags": [
          "Previews"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewReportRequestInput"
              },
              "example": {
                "url": "https://example-3000.preview.example",
                "reason": "phishing"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/schedules": {
      "post": {
        "operationId": "createSchedule",
        "summary": "Create a schedule",
        "description": "Each run starts a sandbox and is billed.\n\nScope: `schedules:write`.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "schedules:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleRequestInput"
              },
              "example": {
                "cron": "0 3 * * *",
                "timezone": "UTC",
                "cmd": "./run-evals.sh",
                "sandbox": {
                  "cpus": 2
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listSchedules",
        "summary": "List schedules",
        "description": "Scope: `schedules:read`.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "schedules:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSchedulesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/schedules/{id}": {
      "delete": {
        "operationId": "deleteSchedule",
        "summary": "Delete a schedule",
        "description": "Scope: `schedules:write`.",
        "tags": [
          "Schedules"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "schedules:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/account": {
      "get": {
        "operationId": "getAccount",
        "summary": "Get the account",
        "description": "The team, its plan, balance and spend cap.\n\nScope: `account:read`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "account:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/signup": {
      "post": {
        "operationId": "signup",
        "summary": "Sign up an agent",
        "description": "A key for an agent, with free credit and no card. The answer has `api_key`, `claim_url` and `message_for_human`.\n\nNo key.",
        "tags": [
          "Sign-up"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupRequestInput"
              },
              "example": {
                "agent_name": "my-agent"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/runs": {
      "get": {
        "operationId": "listCiRuns",
        "summary": "List CI runs",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sha",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "held",
                "assigned",
                "running",
                "completed",
                "canceled"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCiRunsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/jobs/{id}/logs": {
      "get": {
        "operationId": "getCiLogs",
        "summary": "Read a CI job's logs",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiLogsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/wait": {
      "post": {
        "operationId": "waitForCi",
        "summary": "Wait for CI",
        "description": "Waits for the run of a branch, commit or run id to finish, up to `timeout_s`. Pass exactly one of `branch`, `sha` or `run_id`.\n\nScope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CiWaitRequestInput"
              },
              "example": {
                "repo": "owner/name",
                "branch": "main",
                "timeout_s": 60
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiWaitResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/jobs/{id}/vm": {
      "get": {
        "operationId": "getCiJobVm",
        "summary": "Get a CI job's VM",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiJobVm"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/jobs/{id}/terminal": {
      "get": {
        "operationId": "ciTerminal",
        "summary": "Open a terminal on a CI job",
        "description": "A WebSocket. `groundbox ci ssh` uses it.\n\nScope: `ci:write`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols: the connection is now a WebSocket."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/insights": {
      "get": {
        "operationId": "getCiInsights",
        "summary": "Get CI insights",
        "description": "Time, failures, cost, CPU and memory per job.\n\nScope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiInsights"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/auto": {
      "get": {
        "operationId": "listCiAuto",
        "summary": "List auto-size jobs",
        "description": "Each job on the auto size: its pick, why, and what its runs used.\n\nScope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiAutoJobs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/auto/settings": {
      "get": {
        "operationId": "getCiAutoSettings",
        "summary": "Get auto-size settings",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiAutoSettings"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "operationId": "updateCiAutoSettings",
        "summary": "Set the largest auto size",
        "description": "A higher cap lets jobs cost more a minute.\n\nScope: `ci:write`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCiAutoSettingsRequestInput"
              },
              "example": {
                "max_vcpus": 16
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiAutoSettings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cache/stats": {
      "get": {
        "operationId": "getCacheStats",
        "summary": "Get build cache stats",
        "description": "What the team's remote build cache holds, and hits, misses and bytes per tool.\n\nScope: `cache:read`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "cache:read",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuildCacheStats"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/tests": {
      "get": {
        "operationId": "getCiTests",
        "summary": "List tests",
        "description": "Test results from JUnit reports, with flaky tests.\n\nScope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "default": 14,
              "type": "integer",
              "minimum": 1,
              "maximum": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiTestsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/tests/{id}": {
      "get": {
        "operationId": "getCiTest",
        "summary": "Get a test's history",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiTestDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/jobs/{id}/tests": {
      "get": {
        "operationId": "getCiJobTests",
        "summary": "Get a CI job's test results",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiJobTests"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/tests/upload": {
      "post": {
        "operationId": "uploadCiTests",
        "summary": "Upload test results",
        "description": "Scope: `ci:write`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadCiTestsRequestInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadCiTestsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/test-timings": {
      "get": {
        "operationId": "getCiTestTimings",
        "summary": "Get test timings",
        "description": "Recorded time per test file of one job, for `groundbox tests split`.\n\nScope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[^/\\s]+\\/[^/\\s]+$"
            }
          },
          {
            "name": "job",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "runner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "default": 14,
              "type": "integer",
              "minimum": 1,
              "maximum": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiTestTimingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/logs/search": {
      "get": {
        "operationId": "searchCiLogs",
        "summary": "Search CI logs",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            }
          },
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiLogSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/auth/device/start": {
      "post": {
        "operationId": "deviceStart",
        "summary": "Start the device flow",
        "description": "What `groundbox login` calls first.\n\nNo key.",
        "tags": [
          "Sign-up"
        ],
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceStartRequestInput"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceStartResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/auth/device/token": {
      "post": {
        "operationId": "deviceToken",
        "summary": "Poll the device flow",
        "description": "No key.",
        "tags": [
          "Sign-up"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceTokenRequestInput"
              },
              "example": {
                "device_code": "..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/feedback": {
      "post": {
        "operationId": "sendFeedback",
        "summary": "Send feedback",
        "description": "Any valid key.\n\nAny valid key.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequestInput"
              },
              "example": {
                "message": "This call should have worked.",
                "source": "api"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/tuneups": {
      "post": {
        "operationId": "createTuneup",
        "summary": "Start a tune-up",
        "description": "Free on every plan. 503 `not_available` until it is switched on.\n\nScope: `ci:write`.",
        "tags": [
          "Tune-ups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTuneupRequestInput"
              },
              "example": {
                "repo": "owner/name"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tuneup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listTuneups",
        "summary": "List tune-ups",
        "description": "Scope: `ci:read`.",
        "tags": [
          "Tune-ups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[^/\\s]+\\/[^/\\s]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTuneupsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/tuneups/{id}": {
      "get": {
        "operationId": "getTuneup",
        "summary": "Get a tune-up",
        "description": "Scope: `ci:read`.",
        "tags": [
          "Tune-ups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tuneup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/tuneups/{id}/pr": {
      "post": {
        "operationId": "openTuneupPr",
        "summary": "Open a tune-up's pull request",
        "description": "Dashboard sessions only: the pull request is opened as the signed-in person. An API key is refused (403).\n\nScope: `ci:write`.",
        "tags": [
          "Tune-ups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenTuneupPrRequestInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenTuneupPrResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/builders": {
      "post": {
        "operationId": "ensureBuilder",
        "summary": "Start a builder",
        "description": "Starts the project's BuildKit builder if it is not up and waits until it answers. Paid plan.\n\nScope: `builds:write`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnsureBuilderRequestInput"
              },
              "example": {
                "project": "app"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Builder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listBuilders",
        "summary": "List builders",
        "description": "Scope: `builds:read`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBuildersResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/builders/clear-cache": {
      "post": {
        "operationId": "clearBuildCache",
        "summary": "Clear a builder's cache",
        "description": "Scope: `builds:write`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClearBuildCacheRequestInput"
              },
              "example": {
                "project": "app"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Builder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/builders/connect": {
      "get": {
        "operationId": "connectBuilder",
        "summary": "Connect to a builder",
        "description": "A WebSocket: one BuildKit connection, as binary messages. The project goes in the `x-groundbox-build-project` header.\n\nScope: `builds:write`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:write",
        "responses": {
          "101": {
            "description": "Switching Protocols: the connection is now a WebSocket."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/builds": {
      "post": {
        "operationId": "createBuild",
        "summary": "Record a build",
        "description": "Scope: `builds:write`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBuildRequestInput"
              },
              "example": {
                "project": "app",
                "tags": [
                  "registry.groundbox.dev/acme/app:latest"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Build"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "get": {
        "operationId": "listBuilds",
        "summary": "List builds",
        "description": "Scope: `builds:read`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:read",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(\\/[A-Za-z0-9._-]+)?$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBuildsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/builds/{id}": {
      "patch": {
        "operationId": "finishBuild",
        "summary": "Finish a build",
        "description": "Scope: `builds:write`.",
        "tags": [
          "Builds"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "builds:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishBuildRequestInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Build"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry": {
      "get": {
        "operationId": "getRegistry",
        "summary": "Get the registry",
        "description": "Scope: `registry:pull`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:pull",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryOverview"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/namespace": {
      "put": {
        "operationId": "claimRegistryNamespace",
        "summary": "Claim the namespace",
        "description": "Once per team. It cannot be changed after the first push.\n\nScope: `registry:push`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:push",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimRegistryNamespaceRequestInput"
              },
              "example": {
                "namespace": "acme"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryOverview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/repositories": {
      "get": {
        "operationId": "listRegistryRepositories",
        "summary": "List repositories",
        "description": "Scope: `registry:pull`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:pull",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRegistryRepositoriesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/repositories/{name}/tags": {
      "get": {
        "operationId": "listRegistryTags",
        "summary": "List a repository's tags",
        "description": "`{name}` is the repository name with its slashes percent-encoded: `acme%2Fapp`.\n\nScope: `registry:pull`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:pull",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRegistryTagsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/repositories/{name}": {
      "patch": {
        "operationId": "updateRegistryRepository",
        "summary": "Update a repository",
        "description": "Scope: `registry:push`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:push",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRegistryRepositoryRequestInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryRepository"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteRegistryRepository",
        "summary": "Delete a repository",
        "description": "Every manifest and tag in it. The blobs go at the next garbage collection.\n\nScope: `registry:push`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:push",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/repositories/{name}/tags/{tag}": {
      "delete": {
        "operationId": "deleteRegistryTag",
        "summary": "Delete a tag",
        "description": "The tag only; the manifest stays.\n\nScope: `registry:push`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:push",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "description": "The tag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/repositories/{name}/manifests/{digest}": {
      "delete": {
        "operationId": "deleteRegistryManifest",
        "summary": "Delete a manifest",
        "description": "The manifest and every tag pointing at it.\n\nScope: `registry:push`.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "registry:push",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "digest",
            "in": "path",
            "required": true,
            "description": "The manifest's digest, like sha256:...",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/registry/token": {
      "get": {
        "operationId": "registryToken",
        "summary": "Get a registry token",
        "description": "Docker's token endpoint. Basic auth with the key as the password; no credentials gets a token for pulls of public repositories only.\n\nThe key as a Basic auth password, or nothing.",
        "tags": [
          "Registry"
        ],
        "security": [
          {
            "basicAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryTokenResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/buckets": {
      "get": {
        "operationId": "listBuckets",
        "summary": "List buckets",
        "description": "Scope: `storage:read`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBucketsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "operationId": "createBucket",
        "summary": "Create a bucket",
        "description": "Scope: `storage:write`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBucketRequestInput"
              },
              "example": {
                "name": "my-bucket"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucket"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/buckets/{name}": {
      "delete": {
        "operationId": "deleteBucket",
        "summary": "Delete a bucket",
        "description": "Scope: `storage:write`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:write",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "force",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/buckets/{name}/objects": {
      "get": {
        "operationId": "listObjects",
        "summary": "List objects",
        "description": "Scope: `storage:read`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:read",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          },
          {
            "name": "delimiter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1000,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListObjectsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/buckets/{name}/object": {
      "get": {
        "operationId": "getObject",
        "summary": "Download an object",
        "description": "Scope: `storage:read`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:read",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "operationId": "putObject",
        "summary": "Upload an object",
        "description": "The body is the object's bytes.\n\nScope: `storage:write`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:write",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutObjectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "operationId": "deleteObject",
        "summary": "Delete an object",
        "description": "Scope: `storage:write`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:write",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/presign": {
      "post": {
        "operationId": "presign",
        "summary": "Make a presigned URL",
        "description": "Scope: `storage:read`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresignRequestInput"
              },
              "example": {
                "bucket": "my-bucket",
                "key": "reports/today.csv",
                "method": "GET",
                "expires_s": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresignResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/access-keys": {
      "get": {
        "operationId": "listAccessKeys",
        "summary": "List S3 access keys",
        "description": "Scope: `storage:read`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:read",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAccessKeysResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "operationId": "createAccessKey",
        "summary": "Create an S3 access key",
        "description": "The secret is shown once.\n\nScope: `storage:read`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccessKeyRequestInput"
              },
              "example": {
                "name": "laptop",
                "permission": "read"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAccessKeyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/storage/access-keys/{id}": {
      "delete": {
        "operationId": "revokeAccessKey",
        "summary": "Revoke an S3 access key",
        "description": "Scope: `storage:write`.",
        "tags": [
          "Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "storage:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/billing/ledger": {
      "get": {
        "operationId": "listLedger",
        "summary": "List ledger entries",
        "description": "Scope: `billing:read`.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "billing:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListLedgerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/jobs/{id}": {
      "get": {
        "operationId": "getCiJob",
        "summary": "Get a CI job",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiJob"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/ci/jobs/{id}/comparison": {
      "get": {
        "operationId": "getCiJobComparison",
        "summary": "Compare a CI job with GitHub-hosted runners",
        "description": "Scope: `ci:read`.",
        "tags": [
          "CI"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-required-scope": "ci:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobComparison"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A Groundbox API key (`gbx_...`). Keys carry scopes; see the API description."
      },
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Any user name, and a Groundbox API key as the password. For Docker's registry login."
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "team": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Uuid"
              },
              "name": {
                "type": "string"
              },
              "plan": {
                "type": "string",
                "enum": [
                  "free",
                  "monthly",
                  "annual",
                  "sponsored"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/TeamStatus"
              },
              "status_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "internal": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "plan",
              "status"
            ],
            "additionalProperties": false
          },
          "allows": {
            "type": "object",
            "properties": {
              "sandboxes": {
                "type": "boolean"
              },
              "schedules": {
                "type": "boolean"
              },
              "storage": {
                "type": "boolean"
              },
              "public_repos": {
                "type": "boolean"
              },
              "max_ci_vcpus": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_concurrent_ci_jobs": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "sandboxes",
              "schedules",
              "storage",
              "public_repos",
              "max_ci_vcpus",
              "max_concurrent_ci_jobs"
            ],
            "additionalProperties": false
          },
          "trial": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "unclaimed",
                      "claimed"
                    ]
                  },
                  "credit_micros": {
                    "$ref": "#/components/schemas/Micros"
                  },
                  "credit_left_micros": {
                    "$ref": "#/components/schemas/Micros"
                  },
                  "limits": {
                    "type": "object",
                    "properties": {
                      "max_live_sandboxes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_vcpus": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_memory_gb": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_disk_gb": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_sandbox_minutes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_secrets": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "not_included": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "live_sandboxes",
                            "sandbox_size",
                            "sandbox_lifetime",
                            "ci",
                            "storage",
                            "secrets",
                            "schedules",
                            "previews",
                            "builds",
                            "tuneups",
                            "wallet"
                          ]
                        }
                      }
                    },
                    "required": [
                      "max_live_sandboxes",
                      "max_vcpus",
                      "max_memory_gb",
                      "max_disk_gb",
                      "max_sandbox_minutes",
                      "not_included"
                    ],
                    "additionalProperties": false
                  },
                  "claim_url": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "claim_expires_at": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Timestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message_for_human": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "partner": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "credit_micros": {
                            "$ref": "#/components/schemas/Micros"
                          }
                        },
                        "required": [
                          "slug",
                          "name",
                          "credit_micros"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "status",
                  "credit_micros",
                  "credit_left_micros",
                  "limits",
                  "claim_url",
                  "claim_expires_at",
                  "message_for_human"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "free_minutes": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "included": {
                    "type": "number",
                    "minimum": 0
                  },
                  "used": {
                    "type": "number",
                    "minimum": 0
                  },
                  "left": {
                    "type": "number",
                    "minimum": 0
                  },
                  "period_start": {
                    "$ref": "#/components/schemas/Timestamp"
                  },
                  "resets_at": {
                    "$ref": "#/components/schemas/Timestamp"
                  }
                },
                "required": [
                  "included",
                  "used",
                  "left",
                  "period_start",
                  "resets_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "type": "object",
            "properties": {
              "total_micros": {
                "$ref": "#/components/schemas/Micros"
              },
              "plan_micros": {
                "$ref": "#/components/schemas/Micros"
              },
              "plan_expires_at": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Timestamp"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "wallet_micros": {
                "$ref": "#/components/schemas/Micros"
              }
            },
            "required": [
              "total_micros",
              "plan_micros",
              "plan_expires_at",
              "wallet_micros"
            ],
            "additionalProperties": false
          },
          "usage": {
            "type": "object",
            "properties": {
              "period_start": {
                "$ref": "#/components/schemas/Timestamp"
              },
              "this_month_micros": {
                "$ref": "#/components/schemas/Micros"
              },
              "ci_micros": {
                "$ref": "#/components/schemas/Micros"
              },
              "sandbox_micros": {
                "$ref": "#/components/schemas/Micros"
              }
            },
            "required": [
              "period_start",
              "this_month_micros",
              "ci_micros",
              "sandbox_micros"
            ],
            "additionalProperties": false
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_concurrent_ci_jobs": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_concurrent_sandboxes": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_paused_sandboxes": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_templates": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_volumes": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_volume_gb": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_snapshots": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "max_snapshot_gb": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "sandbox_max_timeout_minutes": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "ci_max_job_seconds": {
                "default": 21600,
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "max_concurrent_ci_jobs",
              "max_concurrent_sandboxes",
              "max_paused_sandboxes",
              "sandbox_max_timeout_minutes",
              "ci_max_job_seconds"
            ],
            "additionalProperties": false
          },
          "spend_caps": {
            "$ref": "#/components/schemas/TeamSpendCaps"
          },
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Uuid"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/components/schemas/ApiKeyMode"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiKeyScope"
                }
              },
              "monthly_spend_cap_micros": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Micros"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "spent_this_month_micros": {
                "$ref": "#/components/schemas/Micros"
              },
              "daily_spend_cap_micros": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Micros"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "spent_today_micros": {
                "$ref": "#/components/schemas/Micros"
              }
            },
            "required": [
              "id",
              "name",
              "mode",
              "scopes",
              "monthly_spend_cap_micros",
              "spent_this_month_micros"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "team",
          "balance",
          "usage",
          "limits",
          "key"
        ],
        "additionalProperties": false
      },
      "AllowHosts": {
        "maxItems": 100,
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 253
        }
      },
      "ApiKeyMode": {
        "type": "string",
        "enum": [
          "live",
          "test"
        ]
      },
      "ApiKeyScope": {
        "type": "string",
        "enum": [
          "sandboxes:read",
          "sandboxes:write",
          "schedules:read",
          "schedules:write",
          "ci:read",
          "ci:write",
          "builds:read",
          "builds:write",
          "registry:pull",
          "registry:push",
          "billing:read",
          "account:read",
          "cache:read",
          "cache:write",
          "storage:read",
          "storage:write",
          "secrets:read",
          "secrets:write",
          "secrets:use"
        ]
      },
      "BucketName": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$"
      },
      "Build": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/BuildId"
          },
          "project": {
            "$ref": "#/components/schemas/BuildProject"
          },
          "source": {
            "$ref": "#/components/schemas/BuildSource"
          },
          "status": {
            "$ref": "#/components/schemas/BuildStatus"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "started_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "ended_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "cached_steps": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_hit_pct": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "bytes_in": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bytes_out": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "project",
          "source",
          "status",
          "tags",
          "started_at",
          "ended_at",
          "duration_ms",
          "steps",
          "cached_steps",
          "cache_hit_pct",
          "bytes_in",
          "bytes_out"
        ],
        "additionalProperties": false
      },
      "BuildCacheDay": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "hits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "misses": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bytes_read": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bytes_written": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "date",
          "hits",
          "misses",
          "bytes_read",
          "bytes_written"
        ],
        "additionalProperties": false
      },
      "BuildCacheStats": {
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "used_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "entries": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "max_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "updated_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuildCacheToolStats"
            }
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuildCacheDay"
            }
          },
          "shared_writes": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "days",
          "used_bytes",
          "entries",
          "max_bytes",
          "updated_at",
          "tools",
          "daily",
          "shared_writes",
          "url"
        ],
        "additionalProperties": false
      },
      "BuildCacheTool": {
        "type": "string",
        "enum": [
          "turborepo",
          "gradle",
          "sccache",
          "bazel",
          "nx"
        ]
      },
      "BuildCacheToolStats": {
        "type": "object",
        "properties": {
          "tool": {
            "$ref": "#/components/schemas/BuildCacheTool"
          },
          "hits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "misses": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "hit_rate": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "writes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bytes_read": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bytes_written": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "saved_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "tool",
          "hits",
          "misses",
          "hit_rate",
          "writes",
          "bytes_read",
          "bytes_written",
          "saved_ms"
        ],
        "additionalProperties": false
      },
      "Builder": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/BuildProject"
          },
          "status": {
            "$ref": "#/components/schemas/BuilderStatus"
          },
          "vcpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "cache_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_measured_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_quota_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "connections": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "last_used_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "project",
          "status",
          "vcpus",
          "memory_gb",
          "cache_bytes",
          "cache_measured_at",
          "cache_quota_gb",
          "connections",
          "last_used_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "BuilderStatus": {
        "type": "string",
        "enum": [
          "stopped",
          "starting",
          "ready",
          "stopping"
        ]
      },
      "BuildId": {
        "type": "string",
        "pattern": "^bld_[a-z0-9]{16,32}$"
      },
      "BuildProject": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(\\/[A-Za-z0-9._-]+)?$"
      },
      "BuildSource": {
        "type": "string",
        "enum": [
          "cli",
          "buildx"
        ]
      },
      "BuildStatus": {
        "type": "string",
        "enum": [
          "running",
          "succeeded",
          "failed",
          "canceled"
        ]
      },
      "CiAutoJob": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string"
          },
          "workflow_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "job_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": "string"
          },
          "cpus": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "memory_gb": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "micros_per_minute": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Micros"
              },
              {
                "type": "null"
              }
            ]
          },
          "pick": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CiAutoPick"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string"
          },
          "runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "avg_cpus": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "peak_cpus": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "avg_memory_gb": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "peak_memory_gb": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "warm": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "last_job_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_seen_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "repo",
          "workflow_name",
          "job_name",
          "label",
          "cpus",
          "memory_gb",
          "micros_per_minute",
          "pick",
          "reason",
          "runs",
          "avg_cpus",
          "peak_cpus",
          "avg_memory_gb",
          "peak_memory_gb",
          "last_job_id",
          "last_seen_at"
        ],
        "additionalProperties": false
      },
      "CiAutoJobs": {
        "type": "object",
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/CiAutoSettings"
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiAutoJob"
            }
          }
        },
        "required": [
          "settings",
          "jobs"
        ],
        "additionalProperties": false
      },
      "CiAutoMaxVcpus": {
        "anyOf": [
          {
            "type": "number",
            "const": 2
          },
          {
            "type": "number",
            "const": 4
          },
          {
            "type": "number",
            "const": 6
          },
          {
            "type": "number",
            "const": 8
          },
          {
            "type": "number",
            "const": 10
          },
          {
            "type": "number",
            "const": 12
          },
          {
            "type": "number",
            "const": 14
          },
          {
            "type": "number",
            "const": 16
          }
        ]
      },
      "CiAutoPick": {
        "type": "object",
        "properties": {
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "own_cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rule": {
            "$ref": "#/components/schemas/CiAutoRule"
          },
          "adjusted": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "shared",
                  "max"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "avg_cpus": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "peak_memory_gb": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "cpus",
          "own_cpus",
          "rule",
          "adjusted",
          "runs",
          "avg_cpus",
          "peak_memory_gb"
        ],
        "additionalProperties": false
      },
      "CiAutoRule": {
        "type": "string",
        "enum": [
          "start",
          "hold",
          "up_cpu",
          "up_memory",
          "down",
          "floor"
        ]
      },
      "CiAutoSettings": {
        "type": "object",
        "properties": {
          "max_vcpus": {
            "$ref": "#/components/schemas/CiAutoMaxVcpus"
          },
          "default_max_vcpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "plan_max_vcpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "effective_max_vcpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "options": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          }
        },
        "required": [
          "max_vcpus",
          "default_max_vcpus",
          "plan_max_vcpus",
          "effective_max_vcpus",
          "options"
        ],
        "additionalProperties": false
      },
      "CiInsights": {
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "since": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiJobInsight"
            }
          },
          "monthly_savings_micros": {
            "$ref": "#/components/schemas/Micros"
          }
        },
        "required": [
          "days",
          "since",
          "jobs",
          "monthly_savings_micros"
        ],
        "additionalProperties": false
      },
      "CiJob": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "provider": {
            "type": "string",
            "enum": [
              "github",
              "gitlab"
            ]
          },
          "github_job_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "github_run_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "repo": {
            "type": "string"
          },
          "workflow_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "job_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": "string"
          },
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "flex": {
            "default": false,
            "type": "boolean"
          },
          "auto": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CiAutoPick"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CiJobStatus"
          },
          "conclusion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CiJobConclusion"
              },
              {
                "type": "null"
              }
            ]
          },
          "held_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "out_of_credit",
                  "concurrency_limit",
                  "team_held",
                  "no_capacity",
                  "free_minutes_used",
                  "public_repo_needs_paid_plan",
                  "runner_size_needs_paid_plan",
                  "waiting_behind_paid_jobs",
                  "free_plan_paused",
                  "runner_group_blocks_public_repos",
                  "flex_waiting",
                  "spend_cap",
                  "large_runner_limit"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "queued_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "started_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "seconds": {
            "type": "number",
            "minimum": 0
          },
          "cost_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "free_minutes": {
            "type": "number",
            "minimum": 0
          },
          "html_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "github_job_id",
          "github_run_id",
          "repo",
          "workflow_name",
          "job_name",
          "branch",
          "sha",
          "label",
          "cpus",
          "memory_gb",
          "flex",
          "status",
          "conclusion",
          "held_reason",
          "queued_at",
          "started_at",
          "completed_at",
          "seconds",
          "cost_micros",
          "html_url"
        ],
        "additionalProperties": false
      },
      "CiJobConclusion": {
        "type": "string",
        "enum": [
          "success",
          "failure",
          "cancelled",
          "skipped",
          "timed_out"
        ]
      },
      "CiJobInsight": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string"
          },
          "workflow_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "job_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "label": {
            "type": "string"
          },
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "flex": {
            "type": "boolean"
          },
          "runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failures": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failure_rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "flaky": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "median_seconds": {
            "type": "number",
            "minimum": 0
          },
          "p90_seconds": {
            "type": "number",
            "minimum": 0
          },
          "median_queue_seconds": {
            "type": "number",
            "minimum": 0
          },
          "p90_queue_seconds": {
            "type": "number",
            "minimum": 0
          },
          "minutes_per_week": {
            "type": "number",
            "minimum": 0
          },
          "cost_micros_per_week": {
            "$ref": "#/components/schemas/Micros"
          },
          "measured_runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "avg_cpus": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "peak_cpus": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "peak_memory_gb": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "tip": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CiSizeTip"
              },
              {
                "type": "null"
              }
            ]
          },
          "auto": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CiAutoPick"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "last_run_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "repo",
          "workflow_name",
          "job_name",
          "variants",
          "label",
          "cpus",
          "memory_gb",
          "flex",
          "runs",
          "failures",
          "failure_rate",
          "flaky",
          "median_seconds",
          "p90_seconds",
          "median_queue_seconds",
          "p90_queue_seconds",
          "minutes_per_week",
          "cost_micros_per_week",
          "measured_runs",
          "avg_cpus",
          "peak_cpus",
          "peak_memory_gb",
          "tip",
          "last_job_id",
          "last_run_at"
        ],
        "additionalProperties": false
      },
      "CiJobStatus": {
        "type": "string",
        "enum": [
          "queued",
          "held",
          "assigned",
          "running",
          "completed",
          "canceled"
        ]
      },
      "CiJobTestResult": {
        "type": "object",
        "properties": {
          "test_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "file": {
            "type": "string"
          },
          "suite": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CiTestStatus"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "retries": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "flaky": {
            "type": "boolean"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "stack": {
            "type": [
              "string",
              "null"
            ]
          },
          "report": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/CiTestSource"
          }
        },
        "required": [
          "test_id",
          "file",
          "suite",
          "name",
          "status",
          "duration_ms",
          "retries",
          "flaky",
          "message",
          "stack",
          "report",
          "source"
        ],
        "additionalProperties": false
      },
      "CiJobTests": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "passed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "skipped": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "flaky": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestSource"
            }
          },
          "tests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiJobTestResult"
            }
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "total",
          "passed",
          "failed",
          "skipped",
          "flaky",
          "duration_ms",
          "sources",
          "tests",
          "truncated"
        ],
        "additionalProperties": false
      },
      "CiJobVm": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "running": {
            "type": "boolean"
          },
          "terminal": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "open_sessions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "job_id",
          "running",
          "terminal",
          "reason",
          "open_sessions"
        ],
        "additionalProperties": false
      },
      "CiLogMatch": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "repo": {
            "type": "string"
          },
          "workflow_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "job_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "conclusion": {
            "type": [
              "string",
              "null"
            ]
          },
          "step": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "step_name": {
            "type": "string"
          },
          "line": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "text": {
            "type": "string"
          },
          "before": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "after": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "job_id",
          "repo",
          "workflow_name",
          "job_name",
          "branch",
          "sha",
          "conclusion",
          "step",
          "step_name",
          "line",
          "text",
          "before",
          "after",
          "at"
        ],
        "additionalProperties": false
      },
      "CiLogSearchResponse": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string"
          },
          "days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiLogMatch"
            }
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "q",
          "days",
          "matches",
          "truncated"
        ],
        "additionalProperties": false
      },
      "CiLogsResponse": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "logs": {
            "type": "string"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "logs",
          "truncated"
        ],
        "additionalProperties": false
      },
      "CiSizeTip": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "smaller",
              "bigger"
            ]
          },
          "label": {
            "type": "string"
          },
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "estimated_seconds": {
            "type": "number",
            "minimum": 0
          },
          "monthly_change_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "label",
          "cpus",
          "estimated_seconds",
          "monthly_change_micros",
          "text"
        ],
        "additionalProperties": false
      },
      "CiTestDetail": {
        "type": "object",
        "properties": {
          "test": {
            "$ref": "#/components/schemas/CiTestSummary"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestRun"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestError"
            }
          }
        },
        "required": [
          "test",
          "history",
          "errors"
        ],
        "additionalProperties": false
      },
      "CiTestError": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "message": {
            "type": "string"
          },
          "stack": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "job_id",
          "sha",
          "branch",
          "at",
          "message",
          "stack"
        ],
        "additionalProperties": false
      },
      "CiTestFileTiming": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string"
          },
          "median_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "runs": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "file",
          "median_ms",
          "runs"
        ],
        "additionalProperties": false
      },
      "CiTestRun": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "workflow_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "job_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "run_attempt": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "$ref": "#/components/schemas/CiTestStatus"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "retries": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "flaky": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/CiTestSource"
          },
          "at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "job_id",
          "workflow_name",
          "job_name",
          "sha",
          "branch",
          "run_attempt",
          "status",
          "duration_ms",
          "retries",
          "flaky",
          "source",
          "at"
        ],
        "additionalProperties": false
      },
      "CiTestSource": {
        "type": "string",
        "enum": [
          "junit",
          "upload",
          "console"
        ]
      },
      "CiTestsResponse": {
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "since": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "totals": {
            "type": "object",
            "properties": {
              "tests": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "results": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failures": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "flaky": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "tests",
              "results",
              "failures",
              "flaky"
            ],
            "additionalProperties": false
          },
          "flaky": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestSummary"
            }
          },
          "slowest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestSummary"
            }
          },
          "failing": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestSummary"
            }
          }
        },
        "required": [
          "days",
          "since",
          "totals",
          "flaky",
          "slowest",
          "failing"
        ],
        "additionalProperties": false
      },
      "CiTestStatus": {
        "type": "string",
        "enum": [
          "passed",
          "failed",
          "skipped"
        ]
      },
      "CiTestSummary": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "repo": {
            "type": "string"
          },
          "file": {
            "type": "string"
          },
          "suite": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failures": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failure_rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "flaky_commits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "flip_rate": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "flaky": {
            "type": "boolean"
          },
          "quarantine": {
            "type": [
              "string",
              "null"
            ]
          },
          "median_ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "p90_ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "last_status": {
            "$ref": "#/components/schemas/CiTestStatus"
          },
          "last_seen_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "last_failed_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_flaky_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_job_id": {
            "$ref": "#/components/schemas/Uuid"
          }
        },
        "required": [
          "id",
          "repo",
          "file",
          "suite",
          "name",
          "runs",
          "failures",
          "failure_rate",
          "flaky_commits",
          "flip_rate",
          "flaky",
          "quarantine",
          "median_ms",
          "p90_ms",
          "last_status",
          "last_seen_at",
          "last_failed_at",
          "last_flaky_at",
          "last_job_id"
        ],
        "additionalProperties": false
      },
      "CiTestTimingsResponse": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string"
          },
          "job": {
            "type": [
              "string",
              "null"
            ]
          },
          "days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "since": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "jobs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiTestFileTiming"
            }
          }
        },
        "required": [
          "repo",
          "job",
          "days",
          "since",
          "jobs",
          "files"
        ],
        "additionalProperties": false
      },
      "CiTime": {
        "type": "object",
        "properties": {
          "median_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "branch": {
            "type": "string"
          },
          "measured_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "median_seconds",
          "runs",
          "branch",
          "measured_at"
        ],
        "additionalProperties": false
      },
      "CiWaitRequestInput": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "pattern": "^[^/\\s]+\\/[^/\\s]+$"
          },
          "branch": {
            "type": "string",
            "minLength": 1
          },
          "sha": {
            "type": "string",
            "minLength": 7,
            "maxLength": 40
          },
          "run_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "timeout_s": {
            "default": 600,
            "type": "integer",
            "minimum": 1,
            "maximum": 3600
          }
        },
        "required": [
          "repo"
        ]
      },
      "CiWaitResponse": {
        "type": "object",
        "properties": {
          "result": {
            "type": "string",
            "enum": [
              "passed",
              "failed",
              "timed_out"
            ]
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiJob"
            }
          },
          "failure": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "job_id": {
                    "$ref": "#/components/schemas/Uuid"
                  },
                  "job_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "step": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "log": {
                    "type": "string"
                  }
                },
                "required": [
                  "job_id",
                  "job_name",
                  "step",
                  "log"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "result",
          "jobs",
          "failure"
        ],
        "additionalProperties": false
      },
      "ClaimRegistryNamespaceRequestInput": {
        "type": "object",
        "properties": {
          "namespace": {
            "$ref": "#/components/schemas/RegistryNamespace"
          }
        },
        "required": [
          "namespace"
        ]
      },
      "ClearBuildCacheRequestInput": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/BuildProject"
          }
        },
        "required": [
          "project"
        ]
      },
      "CommandOutputResponse": {
        "type": "object",
        "properties": {
          "stdout": {
            "type": "string"
          },
          "stderr": {
            "type": "string"
          },
          "seq": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "skipped_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "more": {
            "type": "boolean"
          },
          "done": {
            "type": "boolean"
          },
          "exit_code": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "timed_out": {
            "type": "boolean"
          }
        },
        "required": [
          "stdout",
          "stderr",
          "seq",
          "skipped_bytes",
          "more",
          "done",
          "exit_code",
          "duration_ms",
          "timed_out"
        ],
        "additionalProperties": false
      },
      "ComputerActionInput": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "screenshot"
              },
              "format": {
                "default": "png",
                "type": "string",
                "enum": [
                  "png",
                  "jpeg"
                ]
              },
              "quality": {
                "default": 75,
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "max_width": {
                "type": "integer",
                "minimum": 64,
                "maximum": 2560
              },
              "max_height": {
                "type": "integer",
                "minimum": 64,
                "maximum": 1600
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "cursor_position"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "mouse_move"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "coordinate"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "left_click"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "text": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^(shift|ctrl|control|alt|super|meta|cmd)(\\+(shift|ctrl|control|alt|super|meta|cmd))*$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "right_click"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "text": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^(shift|ctrl|control|alt|super|meta|cmd)(\\+(shift|ctrl|control|alt|super|meta|cmd))*$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "middle_click"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "text": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^(shift|ctrl|control|alt|super|meta|cmd)(\\+(shift|ctrl|control|alt|super|meta|cmd))*$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "double_click"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "text": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^(shift|ctrl|control|alt|super|meta|cmd)(\\+(shift|ctrl|control|alt|super|meta|cmd))*$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "triple_click"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "text": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^(shift|ctrl|control|alt|super|meta|cmd)(\\+(shift|ctrl|control|alt|super|meta|cmd))*$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "left_mouse_down"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "left_mouse_up"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "left_click_drag"
              },
              "start_coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "start_coordinate",
              "coordinate"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "scroll"
              },
              "coordinate": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              },
              "scroll_direction": {
                "type": "string",
                "enum": [
                  "up",
                  "down",
                  "left",
                  "right"
                ]
              },
              "scroll_amount": {
                "default": 3,
                "type": "integer",
                "minimum": 1,
                "maximum": 50
              },
              "text": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^(shift|ctrl|control|alt|super|meta|cmd)(\\+(shift|ctrl|control|alt|super|meta|cmd))*$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "scroll_direction"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "key"
              },
              "text": {
                "$ref": "#/components/schemas/KeyCombo"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "text"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "hold_key"
              },
              "text": {
                "$ref": "#/components/schemas/KeyCombo"
              },
              "duration": {
                "type": "number",
                "minimum": 0,
                "maximum": 10
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "text",
              "duration"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "type"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "text"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "wait"
              },
              "duration": {
                "type": "number",
                "minimum": 0,
                "maximum": 30
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "duration"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "clipboard_get"
              }
            },
            "required": [
              "action"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "clipboard_set"
              },
              "text": {
                "type": "string",
                "maxLength": 1048576
              }
            },
            "required": [
              "action",
              "text"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "open_url"
              },
              "url": {
                "type": "string",
                "maxLength": 4096
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "wait_for_screen_change"
              },
              "timeout_s": {
                "default": 10,
                "type": "number",
                "minimum": 0.1,
                "maximum": 60
              },
              "since": {
                "type": "string",
                "pattern": "^[a-f0-9]{32}$"
              },
              "coordinate_space": {
                "type": "object",
                "properties": {
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "required": [
                  "width",
                  "height"
                ]
              },
              "screenshot": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "$ref": "#/components/schemas/ScreenshotOptionsInput"
                  }
                ]
              },
              "screenshot_delay_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "action"
            ]
          }
        ]
      },
      "ComputerActionResponse": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "screenshot": {
            "$ref": "#/components/schemas/Screenshot"
          },
          "cursor": {
            "type": "object",
            "properties": {
              "x": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "y": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "x",
              "y"
            ],
            "additionalProperties": false
          },
          "text": {
            "type": "string"
          },
          "changed": {
            "type": "boolean"
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "action",
          "duration_ms"
        ],
        "additionalProperties": false
      },
      "CreateAccessKeyRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "permission": {
            "$ref": "#/components/schemas/StorageAccessPermission"
          },
          "buckets": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BucketName"
            }
          }
        }
      },
      "CreateAccessKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "access_key_id": {
            "type": "string",
            "pattern": "^GBX[A-Z2-7]{17}$"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "permission": {
            "$ref": "#/components/schemas/StorageAccessPermission"
          },
          "buckets": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BucketName"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "last_used_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "secret_access_key": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "region": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "access_key_id",
          "name",
          "permission",
          "buckets",
          "api_key_id",
          "status",
          "last_used_at",
          "created_at",
          "secret_access_key",
          "endpoint",
          "region"
        ],
        "additionalProperties": false
      },
      "CreateBucketRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/BucketName"
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateBuildRequestInput": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/BuildProject"
          },
          "tags": {
            "default": [],
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          }
        },
        "required": [
          "project"
        ]
      },
      "CreateCustomDomainRequestInput": {
        "type": "object",
        "properties": {
          "domain": {
            "$ref": "#/components/schemas/CustomDomainName"
          }
        },
        "required": [
          "domain"
        ]
      },
      "CreateDesktopLinkRequestInput": {
        "type": "object",
        "properties": {
          "control": {
            "default": false,
            "type": "boolean"
          },
          "expires_in_minutes": {
            "default": 60,
            "type": "integer",
            "minimum": 1,
            "maximum": 1440
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "frame_origins": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^https?:\\/\\/[A-Za-z0-9.-]+(:\\d+)?$"
            }
          }
        }
      },
      "CreateDesktopLinkResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "control": {
            "type": "boolean"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "revoked_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "token": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "sandbox_id",
          "control",
          "label",
          "expires_at",
          "revoked_at",
          "created_at",
          "token",
          "url"
        ],
        "additionalProperties": false
      },
      "CreatePreviewRequestInput": {
        "type": "object",
        "properties": {
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "public": {
            "type": "boolean"
          }
        },
        "required": [
          "port"
        ]
      },
      "CreateSandboxRequestInput": {
        "type": "object",
        "properties": {
          "cpus": {
            "$ref": "#/components/schemas/SandboxCpus"
          },
          "memory_gb": {
            "$ref": "#/components/schemas/SandboxMemoryGb"
          },
          "disk_gb": {
            "default": 20,
            "$ref": "#/components/schemas/SandboxDiskGb"
          },
          "vcpus": {
            "not": {}
          },
          "vcpu": {
            "not": {}
          },
          "cpu": {
            "not": {}
          },
          "memory": {
            "not": {}
          },
          "memory_mb": {
            "not": {}
          },
          "ram": {
            "not": {}
          },
          "disk": {
            "not": {}
          },
          "disk_size": {
            "not": {}
          },
          "timeout_minutes": {
            "default": 60,
            "type": "integer",
            "minimum": 1,
            "maximum": 43200
          },
          "on_timeout": {
            "default": "delete",
            "$ref": "#/components/schemas/SandboxOnTimeout"
          },
          "idle_timeout_seconds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdleTimeoutSeconds"
              },
              {
                "type": "null"
              }
            ]
          },
          "on_idle": {
            "$ref": "#/components/schemas/SandboxIdleAction"
          },
          "idle_cpu_percent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdleCpuPercent"
              },
              {
                "type": "null"
              }
            ]
          },
          "wake_on_request": {
            "type": "boolean"
          },
          "env": {
            "default": {},
            "$ref": "#/components/schemas/EnvVars"
          },
          "metadata": {
            "default": {},
            "$ref": "#/components/schemas/Metadata"
          },
          "allow_hosts": {
            "$ref": "#/components/schemas/AllowHosts"
          },
          "deny_hosts": {
            "$ref": "#/components/schemas/AllowHosts"
          },
          "secrets": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecretName"
            }
          },
          "env_from_secrets": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/SecretName"
            }
          },
          "flex": {
            "default": false,
            "type": "boolean"
          },
          "shared_cpu": {
            "default": false,
            "type": "boolean"
          },
          "template": {
            "$ref": "#/components/schemas/TemplateRef"
          },
          "image": {
            "$ref": "#/components/schemas/ImageReference"
          },
          "snapshot_id": {
            "type": "string",
            "pattern": "^snap_[A-Za-z0-9]{8,40}$"
          },
          "volumes": {
            "default": [],
            "maxItems": 4,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VolumeMountInput"
            }
          },
          "desktop": {
            "$ref": "#/components/schemas/DesktopOptionInput"
          }
        }
      },
      "CreateScheduleRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "cron": {
            "$ref": "#/components/schemas/CronExpression"
          },
          "timezone": {
            "default": "UTC",
            "type": "string",
            "minLength": 1
          },
          "sandbox": {
            "$ref": "#/components/schemas/CreateSandboxRequestInput"
          },
          "cmd": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "cron",
          "cmd"
        ]
      },
      "CreateSnapshotRequestInput": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "CreateTemplateRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/TemplateName"
          },
          "image": {
            "$ref": "#/components/schemas/ImageReference"
          },
          "dockerfile": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65536
          },
          "apt": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9+.-]{0,99}(=[A-Za-z0-9.:~+-]{1,100})?$"
            }
          },
          "pip": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}(\\[[A-Za-z0-9,._-]{1,100}\\])?((==|>=|<=|~=|!=|>|<)[A-Za-z0-9.*+!-]{1,50}(,(==|>=|<=|~=|!=|>|<)[A-Za-z0-9.*+!-]{1,50})*)?$"
            }
          },
          "npm": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^(@[a-z0-9][a-z0-9._-]{0,99}\\/)?[a-z0-9][a-z0-9._-]{0,213}(@[A-Za-z0-9.^~<>=*|+ -]{1,50})?$"
            }
          },
          "files": {
            "default": [],
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateFileInput"
            }
          },
          "run": {
            "default": [],
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16384
            }
          },
          "env": {
            "default": {},
            "$ref": "#/components/schemas/EnvVars"
          },
          "secrets": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecretName"
            }
          },
          "cpus": {
            "default": 2,
            "type": "integer",
            "minimum": 1,
            "maximum": 8
          },
          "memory_gb": {
            "$ref": "#/components/schemas/SandboxMemoryGb"
          },
          "disk_gb": {
            "default": 20,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateTuneupRequestInput": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "pattern": "^[^/\\s]+\\/[^/\\s]+$"
          },
          "switch_runners": {
            "type": "boolean"
          }
        },
        "required": [
          "repo"
        ]
      },
      "CreateVolumeRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/VolumeName"
          },
          "size_gb": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          }
        },
        "required": [
          "size_gb"
        ]
      },
      "CronExpression": {
        "type": "string",
        "pattern": "^(\\S+\\s+){4}\\S+$"
      },
      "CustomDomain": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_dns",
              "issuing",
              "active",
              "failed"
            ]
          },
          "dns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "TXT",
                    "CNAME"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "ok": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "required": [
                "type",
                "name",
                "value",
                "ok"
              ],
              "additionalProperties": false
            }
          },
          "target": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "sandbox_id": {
                    "$ref": "#/components/schemas/SandboxId"
                  },
                  "port": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "sandbox_id",
                  "port"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "verified_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "domain",
          "status",
          "dns",
          "target",
          "error",
          "verified_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "CustomDomainName": {
        "type": "string",
        "minLength": 4,
        "maxLength": 253
      },
      "DefaultTemplateResponse": {
        "type": "object",
        "properties": {
          "template": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Template"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "template"
        ],
        "additionalProperties": false
      },
      "DeleteFileResponse": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          }
        },
        "required": [
          "path",
          "deleted"
        ],
        "additionalProperties": false
      },
      "Desktop": {
        "type": "object",
        "properties": {
          "width": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "height": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "browser_profile_dir": {
            "type": "string"
          },
          "recording": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/DesktopStatus"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "control": {
            "$ref": "#/components/schemas/DesktopControl"
          },
          "ready_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "width",
          "height",
          "browser_profile_dir",
          "recording",
          "status",
          "error",
          "control",
          "ready_ms"
        ],
        "additionalProperties": false
      },
      "DesktopControl": {
        "type": "string",
        "enum": [
          "agent",
          "requested",
          "human"
        ]
      },
      "DesktopLink": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "control": {
            "type": "boolean"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "revoked_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "sandbox_id",
          "control",
          "label",
          "expires_at",
          "revoked_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "DesktopOptionInput": {
        "anyOf": [
          {
            "type": "boolean",
            "const": true
          },
          {
            "$ref": "#/components/schemas/DesktopSpecInput"
          }
        ]
      },
      "DesktopSpecInput": {
        "type": "object",
        "properties": {
          "width": {
            "default": 1280,
            "type": "integer",
            "minimum": 640,
            "maximum": 2560
          },
          "height": {
            "default": 800,
            "type": "integer",
            "minimum": 480,
            "maximum": 1600
          },
          "browser_profile_dir": {
            "default": "/home/runner/.groundbox-browser",
            "type": "string",
            "minLength": 2,
            "maxLength": 255,
            "pattern": "^\\/[A-Za-z0-9._\\-/]+$"
          },
          "start_url": {
            "type": "string",
            "maxLength": 4096
          },
          "recording": {
            "default": false,
            "type": "boolean"
          }
        }
      },
      "DesktopStatus": {
        "type": "string",
        "enum": [
          "starting",
          "ready",
          "failed"
        ]
      },
      "DeviceClient": {
        "type": "string",
        "enum": [
          "cli",
          "mcp",
          "sdk"
        ]
      },
      "DeviceStartRequestInput": {
        "type": "object",
        "properties": {
          "client": {
            "default": "cli",
            "$ref": "#/components/schemas/DeviceClient"
          },
          "client_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyScope"
            }
          }
        }
      },
      "DeviceStartResponse": {
        "type": "object",
        "properties": {
          "device_code": {
            "type": "string",
            "minLength": 20
          },
          "user_code": {
            "type": "string"
          },
          "verification_uri": {
            "type": "string",
            "format": "uri"
          },
          "verification_uri_complete": {
            "type": "string",
            "format": "uri"
          },
          "expires_in": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "interval": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "expires_in",
          "interval"
        ],
        "additionalProperties": false
      },
      "DeviceTokenRequestInput": {
        "type": "object",
        "properties": {
          "device_code": {
            "type": "string",
            "minLength": 20,
            "maxLength": 200
          }
        },
        "required": [
          "device_code"
        ]
      },
      "DeviceTokenResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "pending"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "approved"
              },
              "api_key": {
                "type": "string",
                "format": "starts_with",
                "pattern": "^gbx_.*"
              },
              "key_id": {
                "$ref": "#/components/schemas/Uuid"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiKeyScope"
                }
              },
              "team": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/Uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "status",
              "api_key",
              "key_id",
              "scopes",
              "team"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "denied"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "expired"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          }
        ]
      },
      "EnsureBuilderRequestInput": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/BuildProject"
          }
        },
        "required": [
          "project"
        ]
      },
      "EnvVars": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
        },
        "additionalProperties": {
          "type": "string"
        }
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "bad_request",
          "unauthorized",
          "key_pending_claim",
          "forbidden",
          "github_org_restricted",
          "missing_scope",
          "not_found",
          "conflict",
          "idempotency_key_reused",
          "insufficient_balance",
          "spend_cap_reached",
          "paid_plan_required",
          "trial_limit",
          "trial_credit_exhausted",
          "concurrency_limit",
          "team_held",
          "team_suspended",
          "no_capacity",
          "not_available",
          "rate_limited",
          "busy",
          "upgrade_required",
          "timeout",
          "internal"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "$ref": "#/components/schemas/ErrorCode"
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "ExecEncoding": {
        "type": "string",
        "enum": [
          "utf8",
          "base64"
        ]
      },
      "ExecId": {
        "type": "string",
        "pattern": "^ex_[a-z0-9]{16,32}$"
      },
      "ExecRequestInput": {
        "type": "object",
        "properties": {
          "cmd": {
            "type": "string",
            "minLength": 1
          },
          "args": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cwd": {
            "type": "string",
            "minLength": 1
          },
          "env": {
            "$ref": "#/components/schemas/EnvVars"
          },
          "encoding": {
            "$ref": "#/components/schemas/ExecEncoding"
          },
          "timeout_s": {
            "default": 60,
            "type": "integer",
            "minimum": 1,
            "maximum": 3600
          },
          "stdin": {
            "type": "string",
            "maxLength": 524288
          },
          "stdin_base64": {
            "type": "string",
            "maxLength": 699052,
            "pattern": "^[A-Za-z0-9+/]*={0,2}$"
          }
        }
      },
      "ExecResponse": {
        "type": "object",
        "properties": {
          "exit_code": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "stdout": {
            "type": "string"
          },
          "stderr": {
            "type": "string"
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "timed_out": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "exit_code",
          "stdout",
          "stderr",
          "duration_ms",
          "timed_out"
        ],
        "additionalProperties": false
      },
      "FeedbackRequestInput": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000
          },
          "source": {
            "type": "string",
            "enum": [
              "cli",
              "mcp",
              "api"
            ]
          },
          "last_call": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "status": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "request_id": {
                "type": "string"
              },
              "error": {
                "type": "string"
              }
            },
            "required": [
              "method",
              "path"
            ]
          }
        },
        "required": [
          "message"
        ]
      },
      "FeedbackResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "FileEntry": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "file",
              "dir",
              "symlink",
              "other"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "modified_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "name",
          "path",
          "type",
          "size_bytes",
          "modified_at"
        ],
        "additionalProperties": false
      },
      "FinishBuildRequestInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "canceled"
            ]
          },
          "steps": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000
          },
          "cached_steps": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000
          }
        },
        "required": [
          "status"
        ]
      },
      "ForkGroup": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ForkGroupId"
          },
          "source_sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SnapshotId"
              },
              {
                "type": "null"
              }
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "size": {
            "type": "string",
            "enum": [
              "shared",
              "source"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "progress": {
            "type": "object",
            "properties": {
              "starting": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "running": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "stopped": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "starting",
              "running",
              "failed",
              "stopped"
            ],
            "additionalProperties": false
          },
          "done": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "starting",
              "running",
              "partial",
              "failed",
              "stopped"
            ]
          },
          "wall_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "sandboxes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/SandboxId"
                },
                "fork_index": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "status": {
                  "$ref": "#/components/schemas/SandboxStatus"
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "fork_index",
                "status",
                "error"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "source_sandbox_id",
          "snapshot_id",
          "count",
          "size",
          "created_at",
          "progress",
          "done",
          "status",
          "wall_ms",
          "sandboxes"
        ],
        "additionalProperties": false
      },
      "ForkGroupId": {
        "type": "string",
        "pattern": "^fg_[A-Za-z0-9]{8,40}$"
      },
      "ForkSandboxRequestInput": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "timeout_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 43200
          },
          "cpus": {
            "$ref": "#/components/schemas/SandboxCpus"
          },
          "memory_gb": {
            "$ref": "#/components/schemas/SandboxMemoryGb"
          },
          "disk_gb": {
            "$ref": "#/components/schemas/SandboxDiskGb"
          },
          "vcpus": {
            "not": {}
          },
          "vcpu": {
            "not": {}
          },
          "cpu": {
            "not": {}
          },
          "memory": {
            "not": {}
          },
          "memory_mb": {
            "not": {}
          },
          "ram": {
            "not": {}
          },
          "disk": {
            "not": {}
          },
          "disk_size": {
            "not": {}
          },
          "snapshot_id": {
            "$ref": "#/components/schemas/SnapshotId"
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "size": {
            "type": "string",
            "enum": [
              "shared",
              "source"
            ]
          }
        }
      },
      "ForkSandboxResponse": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ForkGroup"
          },
          {
            "$ref": "#/components/schemas/Sandbox"
          }
        ]
      },
      "Handoff": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "active",
              "returned",
              "canceled"
            ]
          },
          "requested_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "taken_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "taken_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "returned_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "reason",
          "status",
          "requested_at",
          "taken_at",
          "taken_by",
          "returned_at",
          "note"
        ],
        "additionalProperties": false
      },
      "HandoffState": {
        "type": "object",
        "properties": {
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "control": {
            "$ref": "#/components/schemas/DesktopControl"
          },
          "handoff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Handoff"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "sandbox_id",
          "control",
          "handoff",
          "version"
        ],
        "additionalProperties": false
      },
      "IdleCpuPercent": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "IdleTimeoutSeconds": {
        "type": "integer",
        "minimum": 30,
        "maximum": 2592000
      },
      "ImageReference": {
        "type": "string",
        "minLength": 1,
        "maxLength": 512,
        "pattern": "^[a-z0-9][a-z0-9._\\-/:]*(@sha256:[a-f0-9]{64})?$"
      },
      "JobComparison": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/CiJob"
          },
          "previous": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "runner_label": {
                    "type": "string"
                  },
                  "seconds": {
                    "type": "number",
                    "minimum": 0
                  },
                  "cost_micros": {
                    "$ref": "#/components/schemas/Micros"
                  },
                  "completed_at": {
                    "$ref": "#/components/schemas/Timestamp"
                  }
                },
                "required": [
                  "runner_label",
                  "seconds",
                  "cost_micros",
                  "completed_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "share_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "job",
          "previous",
          "share_url"
        ],
        "additionalProperties": false
      },
      "KeepSnapshotRequestInput": {
        "type": "object",
        "properties": {
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "snapshot_id": {
            "$ref": "#/components/schemas/SnapshotId"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "sandbox_id"
        ]
      },
      "KeyCombo": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "^[A-Za-z0-9_+\\-. ]+$"
      },
      "KillCommandRequestInput": {
        "type": "object",
        "properties": {
          "signal": {
            "default": "SIGKILL",
            "type": "string",
            "enum": [
              "SIGKILL",
              "SIGTERM",
              "SIGINT",
              "SIGHUP",
              "SIGQUIT",
              "SIGUSR1",
              "SIGUSR2"
            ]
          }
        }
      },
      "LedgerEntry": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "purchase",
              "bonus",
              "usage",
              "free_usage",
              "refund",
              "adjustment"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "purchase",
              "bonus",
              "usage",
              "free_usage",
              "refund",
              "adjustment"
            ]
          },
          "bucket": {
            "type": "string",
            "enum": [
              "plan",
              "wallet",
              "free"
            ]
          },
          "amount_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "free_minutes": {
            "type": "number"
          },
          "list_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/Uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "ci",
                      "sandbox",
                      "sandbox_storage",
                      "volume_storage",
                      "registry_storage",
                      "bucket_storage",
                      "snapshot_storage"
                    ]
                  },
                  "flex": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ci_job_id": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sandbox_id": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/SandboxId"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "flex",
                  "ci_job_id",
                  "sandbox_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "type",
          "kind",
          "bucket",
          "amount_micros",
          "expires_at",
          "description",
          "usage",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ListAccessKeysResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageAccessKey"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListBucketsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageBucket"
            }
          },
          "used_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "quota_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cost_this_month_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "endpoint": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "used_bytes",
          "quota_bytes",
          "cost_this_month_micros",
          "endpoint"
        ],
        "additionalProperties": false
      },
      "ListBuildersResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Builder"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListBuildsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Build"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListCiRunsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CiJob"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListCommandsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxCommand"
            }
          },
          "running": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "data",
          "running"
        ],
        "additionalProperties": false
      },
      "ListCustomDomainsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomDomain"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListDesktopLinksResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DesktopLink"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListFilesResponse": {
        "type": "object",
        "properties": {
          "dir": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileEntry"
            }
          }
        },
        "required": [
          "dir",
          "entries"
        ],
        "additionalProperties": false
      },
      "ListLedgerResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerEntry"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListObjectsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageObject"
            }
          },
          "prefixes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "prefixes",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListPreviewsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxPreview"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListRegistryRepositoriesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistryRepository"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListRegistryTagsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistryTagView"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListSandboxesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sandbox"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListSchedulesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schedule"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListSecretsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Secret"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListSnapshotsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Snapshot"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListTemplateBuildsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateBuild"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "ListTemplatesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Template"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListTuneupsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tuneup"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ListVolumesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Volume"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "MakeDirResponse": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "created": {
            "type": "boolean"
          }
        },
        "required": [
          "path",
          "created"
        ],
        "additionalProperties": false
      },
      "Metadata": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "additionalProperties": {
          "type": "string",
          "maxLength": 512
        }
      },
      "Micros": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "ObjectKey": {
        "type": "string",
        "minLength": 1
      },
      "OkResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": false
      },
      "OpenTuneupPrRequestInput": {
        "type": "object",
        "properties": {
          "return_url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        }
      },
      "OpenTuneupPrResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "opened"
              },
              "pr_url": {
                "type": "string",
                "format": "uri"
              },
              "tuneup": {
                "$ref": "#/components/schemas/Tuneup"
              }
            },
            "required": [
              "status",
              "pr_url",
              "tuneup"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "needs_github_authorization"
              },
              "authorize_url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "status",
              "authorize_url"
            ],
            "additionalProperties": false
          }
        ]
      },
      "PresignRequestInput": {
        "type": "object",
        "properties": {
          "bucket": {
            "$ref": "#/components/schemas/BucketName"
          },
          "key": {
            "$ref": "#/components/schemas/ObjectKey"
          },
          "method": {
            "default": "GET",
            "type": "string",
            "enum": [
              "GET",
              "PUT"
            ]
          },
          "expires_s": {
            "default": 3600,
            "type": "integer",
            "minimum": 1,
            "maximum": 604800
          }
        },
        "required": [
          "bucket",
          "key"
        ]
      },
      "PresignResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "PUT"
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "url",
          "method",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PreviewReportReason": {
        "type": "string",
        "enum": [
          "phishing",
          "malware",
          "spam",
          "illegal",
          "other"
        ]
      },
      "PreviewReportRequestInput": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "reason": {
            "$ref": "#/components/schemas/PreviewReportReason"
          },
          "details": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "url",
          "reason"
        ]
      },
      "PutObjectResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "etag": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "size_bytes",
          "etag"
        ],
        "additionalProperties": false
      },
      "RegistryDigest": {
        "type": "string",
        "pattern": "^sha256:[a-f0-9]{64}$"
      },
      "RegistryNamespace": {
        "type": "string",
        "minLength": 2,
        "maxLength": 39,
        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
      },
      "RegistryOverview": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "namespace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RegistryNamespace"
              },
              {
                "type": "null"
              }
            ]
          },
          "suggested_namespace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RegistryNamespace"
              },
              {
                "type": "null"
              }
            ]
          },
          "used_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "quota_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "micros_per_gb_month": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reachable": {
            "type": "boolean"
          },
          "measured_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "host",
          "namespace",
          "suggested_namespace",
          "used_bytes",
          "quota_bytes",
          "micros_per_gb_month",
          "reachable",
          "measured_at"
        ],
        "additionalProperties": false
      },
      "RegistryRepository": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/RegistryRepositoryName"
          },
          "visibility": {
            "$ref": "#/components/schemas/RegistryVisibility"
          },
          "retention": {
            "$ref": "#/components/schemas/RegistryRetention"
          },
          "tag_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "manifest_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pushed_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "name",
          "visibility",
          "retention",
          "tag_count",
          "manifest_count",
          "size_bytes",
          "pushed_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "RegistryRepositoryName": {
        "type": "string",
        "maxLength": 255,
        "pattern": "^[a-z0-9]+(?:(?:\\.|_|__|-+)[a-z0-9]+)*(?:\\/[a-z0-9]+(?:(?:\\.|_|__|-+)[a-z0-9]+)*)+$"
      },
      "RegistryRetention": {
        "type": "object",
        "properties": {
          "keep_last_tags": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "untagged_max_age_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3650
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "keep_last_tags",
          "untagged_max_age_days"
        ],
        "additionalProperties": false
      },
      "RegistryTagView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "digest": {
            "$ref": "#/components/schemas/RegistryDigest"
          },
          "media_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pushed_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "name",
          "digest",
          "media_type",
          "size_bytes",
          "platforms",
          "pushed_at"
        ],
        "additionalProperties": false
      },
      "RegistryTokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "issued_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "token",
          "access_token",
          "expires_in",
          "issued_at"
        ],
        "additionalProperties": false
      },
      "RegistryVisibility": {
        "type": "string",
        "enum": [
          "private",
          "public"
        ]
      },
      "RequestHandoffRequestInput": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "RestoreSandboxRequestInput": {
        "type": "object",
        "properties": {
          "snapshot_id": {
            "$ref": "#/components/schemas/SnapshotId"
          }
        },
        "required": [
          "snapshot_id"
        ]
      },
      "RestoreSandboxResponse": {
        "type": "object",
        "properties": {
          "sandbox": {
            "$ref": "#/components/schemas/Sandbox"
          },
          "snapshot_id": {
            "$ref": "#/components/schemas/SnapshotId"
          },
          "restore_ms": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "sandbox",
          "snapshot_id",
          "restore_ms"
        ],
        "additionalProperties": false
      },
      "ReturnControlRequestInput": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "Sandbox": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "status": {
            "$ref": "#/components/schemas/SandboxStatus"
          },
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "disk_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "booted": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "cpus": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "memory_mb": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "cpus",
                  "memory_mb"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_minutes": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "idle_timeout_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "on_idle": {
            "$ref": "#/components/schemas/SandboxIdleAction"
          },
          "idle_cpu_percent": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "wake_on_request": {
            "type": "boolean"
          },
          "pause_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxPauseReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "wakes_on_request": {
            "type": "boolean"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "allow_hosts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AllowHosts"
              },
              {
                "type": "null"
              }
            ]
          },
          "deny_hosts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AllowHosts"
              },
              {
                "type": "null"
              }
            ]
          },
          "env_from_secrets": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "flex": {
            "type": "boolean"
          },
          "shared_cpu": {
            "default": false,
            "type": "boolean"
          },
          "forked_from": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxId"
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "fork_group_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "fork_index": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "template": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/TemplateId"
                  },
                  "name": {
                    "type": "string"
                  },
                  "version": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "id",
                  "name",
                  "version"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "image": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "digest": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "building",
                      "ready",
                      "failed",
                      "canceled"
                    ]
                  }
                },
                "required": [
                  "reference",
                  "digest",
                  "status"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "volumes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "volume_id": {
                  "$ref": "#/components/schemas/VolumeId"
                },
                "path": {
                  "type": "string"
                },
                "read_only": {
                  "type": "boolean"
                }
              },
              "required": [
                "volume_id",
                "path",
                "read_only"
              ],
              "additionalProperties": false
            }
          },
          "start": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pool",
                  "warm",
                  "cold"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "boot_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "desktop": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Desktop"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "started_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "paused_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "shut_down_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "on_timeout": {
            "$ref": "#/components/schemas/SandboxOnTimeout"
          },
          "stopped_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxStopReason"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "cpus",
          "memory_gb",
          "disk_gb",
          "booted",
          "timeout_minutes",
          "metadata",
          "allow_hosts",
          "flex",
          "shared_cpu",
          "forked_from",
          "cost_micros",
          "created_at",
          "started_at",
          "expires_at",
          "paused_at",
          "stopped_at",
          "stop_reason"
        ],
        "additionalProperties": false
      },
      "SandboxCommand": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ExecId"
          },
          "cmd": {
            "type": [
              "string",
              "null"
            ]
          },
          "args": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "cwd": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/SandboxCommandState"
          },
          "background": {
            "type": "boolean"
          },
          "stdin": {
            "type": "boolean"
          },
          "tty": {
            "default": false,
            "type": "boolean"
          },
          "started_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "ended_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "exit_code": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "timed_out": {
            "type": "boolean"
          },
          "output_seq": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "output_kept": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "cmd",
          "args",
          "cwd",
          "state",
          "background",
          "stdin",
          "tty",
          "started_at",
          "ended_at",
          "exit_code",
          "duration_ms",
          "timed_out",
          "output_seq",
          "output_kept"
        ],
        "additionalProperties": false
      },
      "SandboxCommandState": {
        "type": "string",
        "enum": [
          "running",
          "exited",
          "lost"
        ]
      },
      "SandboxCpus": {
        "type": "integer",
        "minimum": 1,
        "maximum": 16
      },
      "SandboxDiskGb": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "SandboxId": {
        "type": "string",
        "pattern": "^sbx_[A-Za-z0-9]{8,40}$"
      },
      "SandboxIdleAction": {
        "type": "string",
        "enum": [
          "pause"
        ]
      },
      "SandboxMemoryGb": {
        "type": "integer",
        "minimum": 1,
        "maximum": 9007199254740991
      },
      "SandboxOnTimeout": {
        "type": "string",
        "enum": [
          "delete",
          "stop",
          "pause"
        ]
      },
      "SandboxPauseReason": {
        "type": "string",
        "enum": [
          "manual",
          "idle"
        ]
      },
      "SandboxPreview": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "port": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "public": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "share_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "disabled": {
            "type": "boolean"
          },
          "bytes_in": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "bytes_out": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "requests": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "last_request_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "sandbox_id",
          "port",
          "public",
          "url",
          "share_url",
          "expires_at",
          "disabled",
          "bytes_in",
          "bytes_out",
          "requests",
          "last_request_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "SandboxStatus": {
        "type": "string",
        "enum": [
          "queued",
          "starting",
          "running",
          "pausing",
          "paused",
          "resuming",
          "shutting_down",
          "shut_down",
          "stopping",
          "stopped",
          "failed"
        ]
      },
      "SandboxStopReason": {
        "type": "string",
        "enum": [
          "deleted",
          "timeout",
          "out_of_credit",
          "spend_cap",
          "plan_ended",
          "abuse",
          "paused_too_long",
          "worker_lost",
          "error"
        ]
      },
      "SandboxTimeline": {
        "type": "object",
        "properties": {
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "interval_s": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "keep": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "max_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelinePoint"
            }
          }
        },
        "required": [
          "sandbox_id",
          "interval_s",
          "keep",
          "bytes",
          "max_bytes",
          "points"
        ],
        "additionalProperties": false
      },
      "SandboxUsage": {
        "type": "object",
        "properties": {
          "sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "running_seconds": {
            "type": "number",
            "minimum": 0
          },
          "busy_core_hours": {
            "type": "number",
            "minimum": 0
          },
          "memory_gb_hours": {
            "type": "number",
            "minimum": 0
          },
          "storage_gb_hours": {
            "type": "number",
            "minimum": 0
          },
          "compute_cost_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "storage_cost_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "cost_micros": {
            "$ref": "#/components/schemas/Micros"
          }
        },
        "required": [
          "sandbox_id",
          "running_seconds",
          "busy_core_hours",
          "memory_gb_hours",
          "storage_gb_hours",
          "compute_cost_micros",
          "storage_cost_micros",
          "cost_micros"
        ],
        "additionalProperties": false
      },
      "Schedule": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ScheduleId"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "cron": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "sandbox": {
            "type": "object",
            "properties": {
              "cpus": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "memory_gb": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "disk_gb": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "timeout_minutes": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "env": {
                "$ref": "#/components/schemas/EnvVars"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              },
              "allow_hosts": {
                "$ref": "#/components/schemas/AllowHosts"
              },
              "deny_hosts": {
                "$ref": "#/components/schemas/AllowHosts"
              },
              "secrets": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "env_from_secrets": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "flex": {
                "type": "boolean"
              }
            },
            "required": [
              "cpus",
              "memory_gb",
              "disk_gb",
              "timeout_minutes",
              "env",
              "metadata",
              "flex"
            ],
            "additionalProperties": false
          },
          "cmd": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "next_run_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_run_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_sandbox_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SandboxId"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "cron",
          "timezone",
          "sandbox",
          "cmd",
          "enabled",
          "next_run_at",
          "last_run_at",
          "last_sandbox_id",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ScheduleId": {
        "type": "string",
        "pattern": "^sch_[A-Za-z0-9]{8,40}$"
      },
      "Screenshot": {
        "type": "object",
        "properties": {
          "media_type": {
            "type": "string",
            "enum": [
              "image/png",
              "image/jpeg"
            ]
          },
          "data": {
            "type": "string"
          },
          "width": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "height": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "screen": {
            "type": "object",
            "properties": {
              "width": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "height": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "width",
              "height"
            ],
            "additionalProperties": false
          },
          "screen_hash": {
            "type": "string"
          }
        },
        "required": [
          "media_type",
          "data",
          "width",
          "height",
          "screen"
        ],
        "additionalProperties": false
      },
      "ScreenshotOptionsInput": {
        "type": "object",
        "properties": {
          "format": {
            "default": "png",
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "quality": {
            "default": 75,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "max_width": {
            "type": "integer",
            "minimum": 64,
            "maximum": 2560
          },
          "max_height": {
            "type": "integer",
            "minimum": 64,
            "maximum": 1600
          }
        }
      },
      "Secret": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/SecretName"
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "updated_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "last_used_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "created_at",
          "updated_at",
          "last_used_at"
        ],
        "additionalProperties": false
      },
      "SecretName": {
        "type": "string",
        "maxLength": 128,
        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
      },
      "SetDefaultTemplateRequestInput": {
        "type": "object",
        "properties": {
          "template": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TemplateRef"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "template"
        ]
      },
      "SetSecretRequestInput": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32768
          }
        },
        "required": [
          "value"
        ]
      },
      "SetTimelineRequestInput": {
        "type": "object",
        "properties": {
          "interval_s": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 2,
                "maximum": 3600
              },
              {
                "type": "null"
              }
            ]
          },
          "keep": {
            "default": 30,
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          }
        },
        "required": [
          "interval_s"
        ]
      },
      "SignupRequestInput": {
        "type": "object",
        "properties": {
          "agent_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        }
      },
      "SignupResponse": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "format": "starts_with",
            "pattern": "^gbx_.*"
          },
          "claim_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string",
            "enum": [
              "trial",
              "pending_claim"
            ]
          },
          "expires_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "trial": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "unclaimed",
                      "claimed"
                    ]
                  },
                  "credit_micros": {
                    "$ref": "#/components/schemas/Micros"
                  },
                  "credit_left_micros": {
                    "$ref": "#/components/schemas/Micros"
                  },
                  "limits": {
                    "type": "object",
                    "properties": {
                      "max_live_sandboxes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_vcpus": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_memory_gb": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_disk_gb": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_sandbox_minutes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "max_secrets": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "not_included": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "live_sandboxes",
                            "sandbox_size",
                            "sandbox_lifetime",
                            "ci",
                            "storage",
                            "secrets",
                            "schedules",
                            "previews",
                            "builds",
                            "tuneups",
                            "wallet"
                          ]
                        }
                      }
                    },
                    "required": [
                      "max_live_sandboxes",
                      "max_vcpus",
                      "max_memory_gb",
                      "max_disk_gb",
                      "max_sandbox_minutes",
                      "not_included"
                    ],
                    "additionalProperties": false
                  },
                  "claim_url": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "claim_expires_at": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Timestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message_for_human": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "partner": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "credit_micros": {
                            "$ref": "#/components/schemas/Micros"
                          }
                        },
                        "required": [
                          "slug",
                          "name",
                          "credit_micros"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "status",
                  "credit_micros",
                  "credit_left_micros",
                  "limits",
                  "claim_url",
                  "claim_expires_at",
                  "message_for_human"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "message_for_human": {
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "claim_url",
          "status",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "Snapshot": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/SnapshotId"
          },
          "status": {
            "$ref": "#/components/schemas/SnapshotStatus"
          },
          "source_sandbox_id": {
            "$ref": "#/components/schemas/SandboxId"
          },
          "source_snapshot_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SnapshotId"
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "disk_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory": {
            "type": "boolean"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cost_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "taken_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "last_used_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "source_sandbox_id",
          "source_snapshot_id",
          "label",
          "cpus",
          "memory_gb",
          "disk_gb",
          "memory",
          "size_bytes",
          "cost_micros",
          "taken_at",
          "created_at",
          "last_used_at",
          "expires_at",
          "deleted_at",
          "error"
        ],
        "additionalProperties": false
      },
      "SnapshotId": {
        "type": "string",
        "pattern": "^snap_[A-Za-z0-9]{8,40}$"
      },
      "SnapshotStatus": {
        "type": "string",
        "enum": [
          "creating",
          "ready",
          "failed",
          "deleted"
        ]
      },
      "StartCommandRequestInput": {
        "type": "object",
        "properties": {
          "cmd": {
            "type": "string",
            "minLength": 1
          },
          "args": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cwd": {
            "type": "string",
            "minLength": 1
          },
          "env": {
            "$ref": "#/components/schemas/EnvVars"
          },
          "timeout_s": {
            "default": 3600,
            "type": "integer",
            "minimum": 1,
            "maximum": 2592000
          },
          "stdin": {
            "default": false,
            "type": "boolean"
          }
        }
      },
      "StorageAccessKey": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "access_key_id": {
            "type": "string",
            "pattern": "^GBX[A-Z2-7]{17}$"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "permission": {
            "$ref": "#/components/schemas/StorageAccessPermission"
          },
          "buckets": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BucketName"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "last_used_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "access_key_id",
          "name",
          "permission",
          "buckets",
          "api_key_id",
          "status",
          "last_used_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "StorageAccessPermission": {
        "type": "string",
        "enum": [
          "read",
          "write"
        ]
      },
      "StorageBucket": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/BucketName"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "object_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "name",
          "size_bytes",
          "object_count",
          "created_at"
        ],
        "additionalProperties": false
      },
      "StorageObject": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "etag": {
            "type": "string"
          },
          "content_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_modified": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "key",
          "size_bytes",
          "etag",
          "content_type",
          "last_modified"
        ],
        "additionalProperties": false
      },
      "TakeControlRequestInput": {
        "type": "object",
        "properties": {
          "by": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "TeamSpendCaps": {
        "type": "object",
        "properties": {
          "daily_spend_cap_micros": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Micros"
              },
              {
                "type": "null"
              }
            ]
          },
          "monthly_spend_cap_micros": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Micros"
              },
              {
                "type": "null"
              }
            ]
          },
          "spent_today_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "spent_this_month_micros": {
            "$ref": "#/components/schemas/Micros"
          }
        },
        "required": [
          "daily_spend_cap_micros",
          "monthly_spend_cap_micros",
          "spent_today_micros",
          "spent_this_month_micros"
        ],
        "additionalProperties": false
      },
      "TeamStatus": {
        "type": "string",
        "enum": [
          "active",
          "held",
          "suspended"
        ]
      },
      "Template": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TemplateId"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "building",
              "ready",
              "failed"
            ]
          },
          "hidden": {
            "type": "boolean"
          },
          "image": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "digest": {
                    "type": "string"
                  }
                },
                "required": [
                  "reference",
                  "digest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "is_default": {
            "type": "boolean"
          },
          "latest_build": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TemplateBuild"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "updated_at": {
            "$ref": "#/components/schemas/Timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "version",
          "status",
          "is_default",
          "latest_build",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "TemplateBuild": {
        "type": "object",
        "properties": {
          "template_id": {
            "$ref": "#/components/schemas/TemplateId"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "status": {
            "$ref": "#/components/schemas/TemplateBuildStatus"
          },
          "spec": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "cpus": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "memory_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "disk_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "disk_used_gb": {
            "type": [
              "number",
              "null"
            ]
          },
          "warm": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "started_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "template_id",
          "version",
          "status",
          "spec",
          "cpus",
          "memory_gb",
          "disk_gb",
          "disk_used_gb",
          "warm",
          "error",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "additionalProperties": false
      },
      "TemplateBuildSpecInput": {
        "type": "object",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageReference"
          },
          "dockerfile": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65536
          },
          "apt": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9+.-]{0,99}(=[A-Za-z0-9.:~+-]{1,100})?$"
            }
          },
          "pip": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}(\\[[A-Za-z0-9,._-]{1,100}\\])?((==|>=|<=|~=|!=|>|<)[A-Za-z0-9.*+!-]{1,50}(,(==|>=|<=|~=|!=|>|<)[A-Za-z0-9.*+!-]{1,50})*)?$"
            }
          },
          "npm": {
            "default": [],
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^(@[a-z0-9][a-z0-9._-]{0,99}\\/)?[a-z0-9][a-z0-9._-]{0,213}(@[A-Za-z0-9.^~<>=*|+ -]{1,50})?$"
            }
          },
          "files": {
            "default": [],
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateFileInput"
            }
          },
          "run": {
            "default": [],
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16384
            }
          },
          "env": {
            "default": {},
            "$ref": "#/components/schemas/EnvVars"
          },
          "secrets": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecretName"
            }
          },
          "cpus": {
            "default": 2,
            "type": "integer",
            "minimum": 1,
            "maximum": 8
          },
          "memory_gb": {
            "$ref": "#/components/schemas/SandboxMemoryGb"
          },
          "disk_gb": {
            "default": 20,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "TemplateBuildStatus": {
        "type": "string",
        "enum": [
          "queued",
          "building",
          "ready",
          "failed",
          "canceled"
        ]
      },
      "TemplateFileInput": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 2,
            "maxLength": 1024,
            "format": "starts_with",
            "pattern": "^\\/.*"
          },
          "content": {
            "type": "string",
            "maxLength": 1048576
          },
          "encoding": {
            "default": "utf8",
            "type": "string",
            "enum": [
              "utf8",
              "base64"
            ]
          },
          "mode": {
            "default": "644",
            "type": "string",
            "pattern": "^0?[0-7]{3}$"
          }
        },
        "required": [
          "path",
          "content"
        ]
      },
      "TemplateId": {
        "type": "string",
        "pattern": "^tpl_[A-Za-z0-9]{8,40}$"
      },
      "TemplateLogLine": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "seq",
          "at",
          "text"
        ],
        "additionalProperties": false
      },
      "TemplateLogsResponse": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateLogLine"
            }
          },
          "next": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "$ref": "#/components/schemas/TemplateBuildStatus"
          },
          "done": {
            "type": "boolean"
          }
        },
        "required": [
          "lines",
          "next",
          "status",
          "done"
        ],
        "additionalProperties": false
      },
      "TemplateName": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
      },
      "TemplateRef": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80,
        "pattern": "^(tpl_[A-Za-z0-9]{8,40}|[a-z0-9][a-z0-9-]{0,62})(:[1-9]\\d{0,5})?$"
      },
      "TimelinePoint": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/SnapshotId"
          },
          "t": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "auto",
              "manual",
              "fork"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pause_ms": {
            "type": "number",
            "minimum": 0
          },
          "full": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "t",
          "label",
          "kind",
          "size_bytes",
          "pause_ms",
          "full"
        ],
        "additionalProperties": false
      },
      "Timestamp": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
      },
      "Tuneup": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TuneupId"
          },
          "repo": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TuneupStatus"
          },
          "base_branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "base_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TuneupChange"
            }
          },
          "left_open": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TuneupLeftOpen"
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TuneupFile"
            }
          },
          "pr_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "pr_branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "timings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TuneupJobTiming"
            }
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/components/schemas/TuneupErrorCode"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "switch_runners": {
            "default": false,
            "type": "boolean"
          },
          "agent": {
            "default": true,
            "type": "boolean"
          },
          "steps": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TuneupStep"
            }
          },
          "ci_before": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/CiTime"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/TuneupResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "started_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "repo",
          "status",
          "base_branch",
          "base_sha",
          "summary",
          "changes",
          "left_open",
          "files",
          "pr_url",
          "pr_branch",
          "timings",
          "error",
          "switch_runners",
          "agent",
          "steps",
          "ci_before",
          "result",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "additionalProperties": false
      },
      "TuneupChange": {
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/TuneupChangeKind"
          },
          "path": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "expected_effect": {
            "type": "string"
          },
          "saving_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "path",
          "title",
          "explanation",
          "expected_effect"
        ],
        "additionalProperties": false
      },
      "TuneupChangeKind": {
        "type": "string",
        "enum": [
          "runner_switch",
          "runner_size",
          "cache",
          "docker_cache",
          "parallelism",
          "test_sharding",
          "redundant_step",
          "concurrency",
          "path_filter",
          "shallow_checkout",
          "other"
        ]
      },
      "TuneupErrorCode": {
        "type": "string",
        "enum": [
          "not_available",
          "clone_failed",
          "sandbox_failed",
          "model_failed",
          "budget_exceeded",
          "interrupted",
          "internal"
        ]
      },
      "TuneupFile": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "diff": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "diff"
        ],
        "additionalProperties": false
      },
      "TuneupId": {
        "type": "string",
        "pattern": "^tun_[A-Za-z0-9]{8,40}$"
      },
      "TuneupJobTiming": {
        "type": "object",
        "properties": {
          "workflow": {
            "type": [
              "string",
              "null"
            ]
          },
          "job": {
            "type": "string"
          },
          "before_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "after_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "before_runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "after_runs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "workflow",
          "job",
          "before_seconds",
          "after_seconds",
          "before_runs",
          "after_runs"
        ],
        "additionalProperties": false
      },
      "TuneupLeftOpen": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "why_not": {
            "type": "string"
          },
          "expected_effect": {
            "type": "string"
          },
          "how": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "why_not",
          "expected_effect",
          "how"
        ],
        "additionalProperties": false
      },
      "TuneupResult": {
        "type": "object",
        "properties": {
          "before_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "after_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "head_sha": {
            "type": "string"
          },
          "finished_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TuneupResultJob"
            }
          },
          "shards": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "job": {
                    "type": "string"
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 9007199254740991
                  },
                  "spread_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "job",
                  "count",
                  "spread_seconds"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "cache": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "restored": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "saved": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "restored",
                  "saved"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "before_seconds",
          "after_seconds",
          "head_sha",
          "finished_at",
          "jobs",
          "shards",
          "cache"
        ],
        "additionalProperties": false
      },
      "TuneupResultJob": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "label",
          "seconds"
        ],
        "additionalProperties": false
      },
      "TuneupStatus": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "ready",
          "no_changes",
          "pr_opened",
          "failed"
        ]
      },
      "TuneupStep": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/TuneupStepKey"
          },
          "status": {
            "$ref": "#/components/schemas/TuneupStepStatus"
          },
          "label": {
            "type": "string"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "key",
          "status",
          "label",
          "detail",
          "at"
        ],
        "additionalProperties": false
      },
      "TuneupStepKey": {
        "type": "string",
        "enum": [
          "workflows",
          "tools",
          "time",
          "changes",
          "pr"
        ]
      },
      "TuneupStepStatus": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "done",
          "skipped"
        ]
      },
      "UpdateCiAutoSettingsRequestInput": {
        "type": "object",
        "properties": {
          "max_vcpus": {
            "$ref": "#/components/schemas/CiAutoMaxVcpus"
          }
        },
        "required": [
          "max_vcpus"
        ]
      },
      "UpdateCustomDomainRequestInput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "sandbox_id": {
                "$ref": "#/components/schemas/SandboxId"
              },
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              }
            },
            "required": [
              "sandbox_id",
              "port"
            ]
          },
          {
            "type": "object",
            "properties": {
              "sandbox_id": {
                "type": "null"
              }
            },
            "required": [
              "sandbox_id"
            ]
          }
        ]
      },
      "UpdatePreviewRequestInput": {
        "type": "object",
        "properties": {
          "public": {
            "type": "boolean"
          }
        },
        "required": [
          "public"
        ]
      },
      "UpdateRegistryRepositoryRequestInput": {
        "type": "object",
        "properties": {
          "visibility": {
            "$ref": "#/components/schemas/RegistryVisibility"
          },
          "retention": {
            "type": "object",
            "properties": {
              "keep_last_tags": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "untagged_max_age_days": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3650
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "UpdateSandboxRequestInput": {
        "type": "object",
        "properties": {
          "timeout_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 43200
          },
          "idle_timeout_seconds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdleTimeoutSeconds"
              },
              {
                "type": "null"
              }
            ]
          },
          "on_idle": {
            "$ref": "#/components/schemas/SandboxIdleAction"
          },
          "idle_cpu_percent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdleCpuPercent"
              },
              {
                "type": "null"
              }
            ]
          },
          "wake_on_request": {
            "type": "boolean"
          },
          "allow_hosts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AllowHosts"
              },
              {
                "type": "null"
              }
            ]
          },
          "deny_hosts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AllowHosts"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UploadCiTestsRequestInput": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200
          },
          "runner_name": {
            "type": "string",
            "maxLength": 200
          },
          "run_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "run_attempt": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "job": {
            "type": "string",
            "maxLength": 500
          },
          "files": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024
                },
                "encoding": {
                  "default": "utf8",
                  "type": "string",
                  "enum": [
                    "utf8",
                    "gzip_base64"
                  ]
                },
                "content": {
                  "type": "string",
                  "maxLength": 1048576
                }
              },
              "required": [
                "name",
                "content"
              ]
            }
          }
        },
        "required": [
          "repo",
          "files"
        ]
      },
      "UploadCiTestsResponse": {
        "type": "object",
        "properties": {
          "job_id": {
            "$ref": "#/components/schemas/Uuid"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "tests": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name",
                "tests",
                "error"
              ],
              "additionalProperties": false
            }
          },
          "tests": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "passed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "skipped": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "job_id",
          "files",
          "tests",
          "passed",
          "failed",
          "skipped"
        ],
        "additionalProperties": false
      },
      "Uuid": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      },
      "Volume": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/VolumeId"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "size_gb": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "deleting",
              "deleted"
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sandbox_id": {
                  "$ref": "#/components/schemas/SandboxId"
                },
                "path": {
                  "type": "string"
                },
                "read_only": {
                  "type": "boolean"
                }
              },
              "required": [
                "sandbox_id",
                "path",
                "read_only"
              ],
              "additionalProperties": false
            }
          },
          "cost_micros": {
            "$ref": "#/components/schemas/Micros"
          },
          "created_at": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "deleted_at": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "size_gb",
          "status",
          "attachments",
          "cost_micros",
          "created_at",
          "deleted_at"
        ],
        "additionalProperties": false
      },
      "VolumeId": {
        "type": "string",
        "pattern": "^vol_[A-Za-z0-9]{8,40}$"
      },
      "VolumeMountInput": {
        "type": "object",
        "properties": {
          "volume": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VolumeId"
              },
              {
                "$ref": "#/components/schemas/VolumeName"
              }
            ]
          },
          "path": {
            "type": "string",
            "minLength": 2,
            "maxLength": 255,
            "pattern": "^\\/[A-Za-z0-9._\\-/]+$"
          },
          "read_only": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "volume",
          "path"
        ]
      },
      "VolumeName": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
      },
      "WriteFileResponse": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "path",
          "size_bytes"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Error": {
        "description": "An error. Every non-2xx answer has this body.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request is not valid: `bad_request`, with the problems in `details`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No key, or a key that is not valid: `unauthorized`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Out of balance, past the spend cap, a paid-plan feature or past the free trial: `insufficient_balance`, `spend_cap_reached`, `paid_plan_required`, `trial_limit` or `trial_credit_exhausted`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key lacks the scope (`missing_scope`) or may not do this (`forbidden`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Nothing with that id in your team: `not_found`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "description": "Not in a state that allows it, or an `Idempotency-Key` used for a different request: `conflict` or `idempotency_key_reused`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests (`rate_limited`) or too many at once (`concurrency_limit`). Wait for `Retry-After`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    }
  }
}
