{
  "openapi": "3.1.0",
  "info": {
    "title": "Styne sandbox API",
    "version": "0.1.0",
    "description": "Isolated Linux sandboxes for AI agents: create from a template, run commands, files, fork, snapshots, pause and resume. The wire contract is the E2B API, so an unmodified E2B SDK works."
  },
  "servers": [
    {
      "url": "https://api.styne.ai"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Sandboxes",
      "externalDocs": {
        "url": "https://docs.styne.ai/quickstart"
      }
    },
    {
      "name": "Templates",
      "externalDocs": {
        "url": "https://docs.styne.ai/guide-templates"
      }
    },
    {
      "name": "Run commands",
      "externalDocs": {
        "url": "https://docs.styne.ai/exec"
      }
    },
    {
      "name": "Files",
      "externalDocs": {
        "url": "https://docs.styne.ai/files"
      }
    },
    {
      "name": "Fork",
      "externalDocs": {
        "url": "https://docs.styne.ai/fork"
      }
    },
    {
      "name": "Snapshots",
      "externalDocs": {
        "url": "https://docs.styne.ai/snapshots"
      }
    },
    {
      "name": "Volumes",
      "externalDocs": {
        "url": "https://docs.styne.ai/volumes"
      }
    },
    {
      "name": "Logs and metrics",
      "externalDocs": {
        "url": "https://docs.styne.ai/observability"
      }
    },
    {
      "name": "Timeouts, pause and resume",
      "externalDocs": {
        "url": "https://docs.styne.ai/pause-tiers"
      }
    },
    {
      "name": "Plans and billing",
      "externalDocs": {
        "url": "https://docs.styne.ai/billing"
      }
    },
    {
      "name": "Agent sign-up",
      "externalDocs": {
        "url": "https://docs.styne.ai/agent-signup"
      }
    },
    {
      "name": "Browsers",
      "externalDocs": {
        "url": "https://docs.styne.ai/browsers"
      }
    },
    {
      "name": "Browser profiles",
      "externalDocs": {
        "url": "https://docs.styne.ai/profiles"
      }
    },
    {
      "name": "Login vault",
      "externalDocs": {
        "url": "https://docs.styne.ai/vault"
      }
    },
    {
      "name": "Ports and preview URLs",
      "externalDocs": {
        "url": "https://docs.styne.ai/ports"
      }
    },
    {
      "name": "SSH and port forwarding",
      "externalDocs": {
        "url": "https://docs.styne.ai/ssh"
      }
    },
    {
      "name": "CI runners",
      "externalDocs": {
        "url": "https://docs.styne.ai/ci"
      }
    },
    {
      "name": "Run a coding agent in a sandbox",
      "externalDocs": {
        "url": "https://docs.styne.ai/agents"
      }
    },
    {
      "name": "State store",
      "externalDocs": {
        "url": "https://docs.styne.ai/state"
      }
    },
    {
      "name": "Calls between sandboxes",
      "externalDocs": {
        "url": "https://docs.styne.ai/calls"
      }
    },
    {
      "name": "Wake triggers and schedules",
      "externalDocs": {
        "url": "https://docs.styne.ai/wake-triggers"
      }
    },
    {
      "name": "Checkpoints and rewind",
      "externalDocs": {
        "url": "https://docs.styne.ai/checkpoints"
      }
    },
    {
      "name": "Container images",
      "externalDocs": {
        "url": "https://docs.styne.ai/images"
      }
    }
  ],
  "paths": {
    "/sandboxes": {
      "post": {
        "operationId": "sandboxes.create",
        "summary": "Create a sandbox from a template",
        "tags": [
          "Sandboxes"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Create a sandbox. Name a template (templateID), a saved snapshot (snapshot) or a size; with none of them the default size is used.",
                "properties": {
                  "templateID": {
                    "type": "string",
                    "description": "Template id or alias from GET /templates, for example base, code, small, large or browser."
                  },
                  "snapshot": {
                    "type": "string",
                    "description": "Name of a saved snapshot of your account to start from; replaces templateID."
                  },
                  "size": {
                    "type": "string",
                    "description": "The standard image at this size; replaces templateID.",
                    "enum": [
                      "small",
                      "default",
                      "large",
                      "xlarge"
                    ]
                  },
                  "image": {
                    "type": "string",
                    "description": "A container image to start from, for example alpine, python:3.12-slim or ghcr.io/org/app:tag; excludes templateID and snapshot. It starts on a node that holds a prepared build of the image; an image nobody prepared is a 404."
                  },
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds until the sandbox times out."
                  },
                  "idleTimeout": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3600,
                    "description": "Seconds without a call or connection after which the sandbox sleeps even if a process runs inside it; it wakes on the next call. 0 or absent: it sleeps only when nothing of yours runs inside."
                  },
                  "autoPause": {
                    "type": "boolean",
                    "description": "Pause instead of kill when the timeout is reached."
                  },
                  "autoResume": {
                    "description": "Resume a paused sandbox on the next request: true, or {\"enabled\": true} as the SDKs send it.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "enabled"
                        ]
                      }
                    ]
                  },
                  "lifecycle": {
                    "type": "object",
                    "description": "What happens at the timeout.",
                    "properties": {
                      "onTimeout": {
                        "type": "string",
                        "description": "kill or pause.",
                        "enum": [
                          "kill",
                          "pause"
                        ]
                      },
                      "autoResume": {
                        "type": "boolean",
                        "description": "Resume on the next request after a pause."
                      }
                    }
                  },
                  "secure": {
                    "type": "boolean",
                    "description": "Require the access token on every sandbox call."
                  },
                  "allow_internet_access": {
                    "type": "boolean",
                    "description": "false blocks outbound internet access from the sandbox. Snake case, as the E2B SDK sends it."
                  },
                  "network": {
                    "type": "object",
                    "description": "Network rules.",
                    "properties": {
                      "allowPublicTraffic": {
                        "type": "boolean",
                        "description": "Serve the sandbox ports without the traffic token."
                      },
                      "allowOut": {
                        "type": "array",
                        "description": "Outbound destinations allowed.",
                        "items": {
                          "type": "string"
                        }
                      },
                      "denyOut": {
                        "type": "array",
                        "description": "Outbound destinations blocked.",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maskRequestHost": {
                        "type": "string",
                        "description": "Host header sent to the sandbox port."
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "description": "String keys and values.",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "envVars": {
                    "type": "object",
                    "description": "Environment variables set in every command of the sandbox.",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "environment": {
                    "type": "string",
                    "description": "Stored environment to start from; the account default when left out."
                  },
                  "vcpus": {
                    "type": "integer",
                    "description": "vCPUs the sandbox needs; a request above the template size is refused."
                  },
                  "memory_mib": {
                    "type": "integer",
                    "description": "Memory in MiB the sandbox needs; a request above the template size is refused."
                  },
                  "volumeMounts": {
                    "type": "array",
                    "description": "Volumes of your account to mount, by name or id. The sandbox runs on the node that keeps them; see Volumes.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Volume name or id."
                        },
                        "path": {
                          "type": "string",
                          "description": "Mount path inside the sandbox."
                        },
                        "readOnly": {
                          "type": "boolean",
                          "description": "Mount read-only."
                        }
                      },
                      "required": [
                        "name",
                        "path"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "sandboxes.list",
        "summary": "List the account's sandboxes",
        "tags": [
          "Sandboxes"
        ],
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}": {
      "get": {
        "operationId": "sandboxes.get",
        "summary": "Read one sandbox",
        "tags": [
          "Sandboxes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "sandboxes.delete",
        "summary": "Kill a sandbox",
        "tags": [
          "Sandboxes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/templates": {
      "get": {
        "operationId": "templates.list",
        "summary": "List the templates the key can start",
        "tags": [
          "Sandboxes"
        ],
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/regions": {
      "get": {
        "operationId": "regions.list",
        "summary": "List the regions and whether a machine there takes new VMs now",
        "tags": [
          "Sandboxes"
        ],
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}": {
      "get": {
        "operationId": "templates.get",
        "summary": "One template by id or alias",
        "tags": [
          "Sandboxes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Sandboxes",
          "url": "https://docs.styne.ai/quickstart"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/quickstart."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "templates.delete",
        "summary": "Delete a saved snapshot by its template id, at the path the E2B SDK uses; answers 204",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Templates",
          "url": "https://docs.styne.ai/guide-templates"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/guide-templates."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/templates/aliases/{alias}": {
      "get": {
        "operationId": "templates.aliases",
        "summary": "Resolve a template alias to its template id",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "alias",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Templates",
          "url": "https://docs.styne.ai/guide-templates"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/guide-templates."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/default-templates": {
      "get": {
        "operationId": "templates.default",
        "summary": "List the templates the key can start, at the path the E2B SDK reads",
        "tags": [
          "Templates"
        ],
        "externalDocs": {
          "description": "Templates",
          "url": "https://docs.styne.ai/guide-templates"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/guide-templates."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/templates": {
      "get": {
        "operationId": "templates.v2",
        "summary": "List the templates the key can start, at the E2B v2 path",
        "tags": [
          "Templates"
        ],
        "externalDocs": {
          "description": "Templates",
          "url": "https://docs.styne.ai/guide-templates"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/guide-templates."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/exec": {
      "post": {
        "operationId": "sandboxes.exec",
        "summary": "Run a command and stream its output",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Run one command and wait for it to finish. Give cmd (run through a shell unless argv is set) or argv.",
                "properties": {
                  "cmd": {
                    "type": "string",
                    "description": "The command line."
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Arguments appended to cmd."
                  },
                  "argv": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The command as an argument vector, run without a shell."
                  },
                  "shell": {
                    "type": "string",
                    "description": "Shell used for cmd; /bin/sh when left out."
                  },
                  "envs": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Environment variables for this command (also accepted as env or envVars)."
                  },
                  "cwd": {
                    "type": "string",
                    "description": "Working directory."
                  },
                  "user": {
                    "type": "string",
                    "description": "User to run as."
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Milliseconds before the command is stopped."
                  },
                  "stdin": {
                    "type": "boolean",
                    "description": "Keep standard input open for later input calls."
                  },
                  "pty": {
                    "description": "Run on a pseudo-terminal of this size ({rows, cols})."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/commands": {
      "post": {
        "operationId": "commands.start",
        "summary": "Run a command to its exit, or start it detached",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Start a command and return its pid at once; read it with the command calls. Same fields as exec, plus detached.",
                "properties": {
                  "cmd": {
                    "type": "string",
                    "description": "The command line."
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Arguments appended to cmd."
                  },
                  "argv": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The command as an argument vector, run without a shell."
                  },
                  "shell": {
                    "type": "string",
                    "description": "Shell used for cmd; /bin/sh when left out."
                  },
                  "envs": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Environment variables for this command (also accepted as env or envVars)."
                  },
                  "cwd": {
                    "type": "string",
                    "description": "Working directory."
                  },
                  "user": {
                    "type": "string",
                    "description": "User to run as."
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Milliseconds before the command is stopped."
                  },
                  "stdin": {
                    "type": "boolean",
                    "description": "Keep standard input open for later input calls."
                  },
                  "pty": {
                    "description": "Run on a pseudo-terminal of this size ({rows, cols})."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/commands/{pid}": {
      "get": {
        "operationId": "commands.status",
        "summary": "Read a command's status by pid",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "commands.stop",
        "summary": "Signal a running command",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/commands/{pid}/stream": {
      "get": {
        "operationId": "commands.stream",
        "summary": "Replay and follow a command's output",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/commands/{pid}/input": {
      "post": {
        "operationId": "commands.input",
        "summary": "Write text to a running command's stdin, and close it with eof",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Send input to a running command.",
                "properties": {
                  "data": {
                    "type": "string",
                    "description": "Text written to the command's standard input."
                  },
                  "eof": {
                    "type": "boolean",
                    "description": "Close standard input after the data."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/command-history": {
      "get": {
        "operationId": "commands.history",
        "summary": "List the sandbox's commands, newest first",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/command-history/{cid}": {
      "get": {
        "operationId": "commands.get",
        "summary": "Read one command of the history",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/command-history/{cid}/logs": {
      "get": {
        "operationId": "commands.logs",
        "summary": "Read a command's stdout and stderr, also after it ended",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/code": {
      "post": {
        "operationId": "sandboxes.code",
        "summary": "Run code in a kernel context; answers its output, results and error",
        "tags": [
          "Run commands"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Run a code cell in a persistent interpreter context.",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "The source to run."
                  },
                  "language": {
                    "type": "string",
                    "description": "Interpreter language, for example python or javascript."
                  },
                  "contextId": {
                    "type": "string",
                    "description": "Run in this context to keep its variables; a new context when left out."
                  },
                  "env": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Environment variables for this run."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run commands",
          "url": "https://docs.styne.ai/exec"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/exec."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files": {
      "get": {
        "operationId": "sandboxes.files.read",
        "summary": "Read a file: the bytes of the file at the path query",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "sandboxes.files.write",
        "summary": "Write a file: the request body is the content; folders on the way are created",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "sandboxes.files.delete",
        "summary": "Delete a file or folder; answers 204",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files/list": {
      "get": {
        "operationId": "sandboxes.files.list",
        "summary": "List a directory",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files/search": {
      "post": {
        "operationId": "sandboxes.files.search",
        "summary": "Find files by name under a path",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files/find": {
      "post": {
        "operationId": "sandboxes.files.find",
        "summary": "Find text in the files under a path",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files/replace": {
      "post": {
        "operationId": "sandboxes.files.replace",
        "summary": "Replace text across files",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files/permissions": {
      "post": {
        "operationId": "sandboxes.files.permissions",
        "summary": "Set mode, owner and group of a path",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/files/signed-url": {
      "post": {
        "operationId": "sandboxes.files.signed-url",
        "summary": "Make a short-lived upload or download URL for one file",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Files",
          "url": "https://docs.styne.ai/files"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/files."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/fork": {
      "post": {
        "operationId": "sandboxes.fork",
        "summary": "Fork a running sandbox into copies",
        "tags": [
          "Fork"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Copy a running sandbox into one or more children. The body is optional.",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "Number of children, 1 to 1000; 1 when left out."
                  },
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds the children live; the parent's timeout when left out."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "String keys and values set on every child."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Fork",
          "url": "https://docs.styne.ai/fork"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/fork."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/snapshots": {
      "post": {
        "operationId": "snapshots.save",
        "summary": "Save a sandbox as a named snapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Save the sandbox's memory and disk as a snapshot. The body is optional.",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Snapshot name; generated when left out."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "snapshots.list_of_sandbox",
        "summary": "List the snapshots taken of one sandbox",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/snapshots": {
      "get": {
        "operationId": "snapshots.list",
        "summary": "List the account's saved snapshots",
        "tags": [
          "Snapshots"
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "snapshots.delete_all",
        "summary": "Delete every saved snapshot of the account",
        "tags": [
          "Snapshots"
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/snapshots/{name}": {
      "get": {
        "operationId": "snapshots.get",
        "summary": "Read one saved snapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "snapshots.delete",
        "summary": "Delete a saved snapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/snapshots/{name}/tree": {
      "get": {
        "operationId": "snapshots.tree",
        "summary": "List the files inside a saved snapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/snapshots/{name}/files": {
      "get": {
        "operationId": "snapshots.file",
        "summary": "Download one file from a saved snapshot",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/snapshots/{name}/archive": {
      "get": {
        "operationId": "snapshots.archive",
        "summary": "Download a file or folder of a saved snapshot as a tar",
        "tags": [
          "Snapshots"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Snapshots",
          "url": "https://docs.styne.ai/snapshots"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/snapshots."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/volumes": {
      "post": {
        "operationId": "volumes.create",
        "summary": "Create a volume",
        "tags": [
          "Volumes"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Create an empty ext4 volume.",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Unique in the account."
                  },
                  "sizeMB": {
                    "type": "integer",
                    "description": "Size in MiB, 1024 to 102400; 10240 by default."
                  },
                  "region": {
                    "type": "string",
                    "description": "Region id; the default of a sandbox create when left out."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Volumes",
          "url": "https://docs.styne.ai/volumes"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/volumes."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "volumes.list",
        "summary": "List the account's volumes",
        "tags": [
          "Volumes"
        ],
        "externalDocs": {
          "description": "Volumes",
          "url": "https://docs.styne.ai/volumes"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/volumes."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/volumes/{id}": {
      "get": {
        "operationId": "volumes.get",
        "summary": "Read one volume by name or id",
        "tags": [
          "Volumes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Volumes",
          "url": "https://docs.styne.ai/volumes"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/volumes."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "volumes.delete",
        "summary": "Delete a volume",
        "tags": [
          "Volumes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Volumes",
          "url": "https://docs.styne.ai/volumes"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/volumes."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/logs": {
      "get": {
        "operationId": "sandboxes.logs",
        "summary": "Read the output of a sandbox's commands",
        "tags": [
          "Logs and metrics"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Logs and metrics",
          "url": "https://docs.styne.ai/observability"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/observability."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/metrics": {
      "get": {
        "operationId": "sandboxes.metrics",
        "summary": "Read a sandbox's CPU, memory and disk over time",
        "tags": [
          "Logs and metrics"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Logs and metrics",
          "url": "https://docs.styne.ai/observability"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/observability."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/pause": {
      "post": {
        "operationId": "sandboxes.pause",
        "summary": "Pause a sandbox at a tier",
        "tags": [
          "Timeouts, pause and resume"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Pause the sandbox. The body is optional.",
                "properties": {
                  "tier": {
                    "type": "string",
                    "enum": [
                      "memory",
                      "hot",
                      "standby",
                      "archived"
                    ],
                    "description": "Where the paused memory is kept: memory (or hot, the default) on the node, standby on the node's disk, archived also in object storage."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Timeouts, pause and resume",
          "url": "https://docs.styne.ai/pause-tiers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/pause-tiers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/resume": {
      "post": {
        "operationId": "sandboxes.resume",
        "summary": "Resume a paused sandbox",
        "tags": [
          "Timeouts, pause and resume"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Resume a paused sandbox. The body is optional.",
                "properties": {
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds the sandbox lives after the resume."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Timeouts, pause and resume",
          "url": "https://docs.styne.ai/pause-tiers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/pause-tiers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/connect": {
      "post": {
        "operationId": "sandboxes.connect",
        "summary": "Return a sandbox and resume it if it is paused",
        "tags": [
          "Timeouts, pause and resume"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Connect to a sandbox, resuming it if it is paused. The body is optional.",
                "properties": {
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds the sandbox lives from now, if longer than what is left."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Timeouts, pause and resume",
          "url": "https://docs.styne.ai/pause-tiers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/pause-tiers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/timeout": {
      "post": {
        "operationId": "sandboxes.timeout",
        "summary": "Set a new lifetime for a running sandbox",
        "tags": [
          "Timeouts, pause and resume"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Set how long the sandbox lives from now.",
                "properties": {
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds the sandbox lives from now."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Timeouts, pause and resume",
          "url": "https://docs.styne.ai/pause-tiers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/pause-tiers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/refreshes": {
      "post": {
        "operationId": "sandboxes.refresh",
        "summary": "Extend the lifetime of a running sandbox",
        "tags": [
          "Timeouts, pause and resume"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Extend the sandbox's life.",
                "properties": {
                  "duration": {
                    "type": "integer",
                    "description": "Seconds the sandbox lives from now, if longer than what is left."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Timeouts, pause and resume",
          "url": "https://docs.styne.ai/pause-tiers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/pause-tiers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/run/usage": {
      "get": {
        "operationId": "usage.read",
        "summary": "Read the plan, hours used and caps of the account",
        "tags": [
          "Plans and billing"
        ],
        "externalDocs": {
          "description": "Plans and billing",
          "url": "https://docs.styne.ai/billing"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/billing."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/run/balance": {
      "get": {
        "operationId": "balance.read",
        "summary": "Read the dollar balance of the account",
        "tags": [
          "Plans and billing"
        ],
        "externalDocs": {
          "description": "Plans and billing",
          "url": "https://docs.styne.ai/billing"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/billing."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agent/signup": {
      "post": {
        "operationId": "agent.signup",
        "summary": "Create an account and a limited key without a person; returns a claim link",
        "tags": [
          "Agent sign-up"
        ],
        "externalDocs": {
          "description": "Agent sign-up",
          "url": "https://docs.styne.ai/agent-signup"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agent-signup."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agent/claim/{token}": {
      "get": {
        "operationId": "agent.claim.state",
        "summary": "Read whether a claim link is open, claimed or expired",
        "tags": [
          "Agent sign-up"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Agent sign-up",
          "url": "https://docs.styne.ai/agent-signup"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agent-signup."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers": {
      "post": {
        "operationId": "browsers.create",
        "summary": "Start a Chromium session",
        "tags": [
          "Browsers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Start a browser session. Every field is optional.",
                "properties": {
                  "region": {
                    "type": "string",
                    "description": "Region to start in: ash (default). ams is accepted and served in ash for now; aliases eu, us-east."
                  },
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds the session lives."
                  },
                  "idle_timeout_seconds": {
                    "type": "integer",
                    "description": "Seconds without a connected CDP client before the session sleeps; 0 never sleeps on its own."
                  },
                  "secure": {
                    "type": "boolean",
                    "description": "Refused with a 422: a browser session is reached only with the signed token in its cdp_url."
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Your own keys and JSON values (also accepted as user_metadata), kept with the session and answered on create, GET /browsers/{id} and GET /browsers: at most 50 keys of 1 to 64 letters, digits, _ - . :, each value at most 512 bytes as JSON."
                  },
                  "unblock": {
                    "type": "string",
                    "description": "What happens on a block or captcha page: off, auto (default) or always."
                  },
                  "captcha": {
                    "type": "string",
                    "description": "What the session does with a CAPTCHA: off, click (default: the widget's checkbox is clicked) or solve (a challenge the click does not pass is solved, metered per solve, at most 10 per session)."
                  },
                  "egress": {
                    "type": "string",
                    "description": "Where the session's traffic leaves from, from its first request: direct (default), residential or mullvad. Residential traffic is metered per GB; static and image CDNs, ad hosts and the browser's own background fetches leave directly."
                  },
                  "country": {
                    "type": "string",
                    "description": "Two-letter country of the residential or mullvad address, for example it. Needs egress residential or mullvad."
                  },
                  "proxy": {
                    "description": "Refused with a 422 that names egress and country, which pick where the session's traffic leaves."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA timezone the session reports, for example Europe/Berlin."
                  },
                  "locale": {
                    "type": "string",
                    "description": "BCP 47 language tag, for example de-DE."
                  },
                  "profile": {
                    "type": "string",
                    "description": "Start the saved browser of this profile, signed in as it was left."
                  },
                  "fork": {
                    "type": "boolean",
                    "description": "With profile: an unbound copy for runs in parallel."
                  },
                  "persist": {
                    "type": "boolean",
                    "description": "With profile: true (the default without fork) saves the browser into the profile on the server whenever the session ends (a delete, its timeout, a stop of its machine); false writes the profile only on POST /profiles/{id}/save. true without profile or with fork is a 422."
                  },
                  "viewport": {
                    "type": "object",
                    "properties": {
                      "width": {
                        "type": "integer"
                      },
                      "height": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "width",
                      "height"
                    ],
                    "description": "Page size in CSS pixels (window.innerWidth x innerHeight), 320x240 to 3840x2160, set before the start answers; pages opened later get it too. Default 1280x633."
                  },
                  "recording": {
                    "type": "boolean",
                    "description": "false: the edge keeps no recording of the session (console, network, trace and replay answer empty). Default true."
                  },
                  "downloads": {
                    "type": "boolean",
                    "description": "true: the browser saves every download into /home/browser/Downloads for the whole session; read the files with GET /sandboxes/{id}/files. Default false."
                  },
                  "stealth": {
                    "type": "boolean",
                    "description": "false: unblock and captcha default to off (a value you name still wins). true or absent keeps the defaults."
                  },
                  "extensions": {
                    "type": "array",
                    "description": "Ids of uploaded extensions (POST /extensions) loaded into the browser before the start answers, at most 10; an id the account does not have is a 422 that names it."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "browsers.list",
        "summary": "List the account's browser sessions",
        "tags": [
          "Browsers"
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}": {
      "get": {
        "operationId": "browsers.get",
        "summary": "Read a browser session and its CDP endpoint",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "browsers.delete",
        "summary": "Stop a browser session",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/steps": {
      "post": {
        "operationId": "browsers.steps.record",
        "summary": "Record a step and check that the page shows what you expect",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Name the step and what must be true on the page after it.",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "What the step did; required, up to 200 characters."
                  },
                  "verify": {
                    "type": "object",
                    "description": "One or more of url_matches, selector_exists, text_contains, js_expr, cookie; required."
                  },
                  "action_ref": {
                    "type": "string",
                    "description": "Your own reference for the action, such as a task or call id."
                  },
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds to wait for the checks to hold; 1 to 45, default 10."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "browsers.steps.list",
        "summary": "List the session's steps and whether the run is verified",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/steps/{n}": {
      "get": {
        "operationId": "browsers.steps.get",
        "summary": "Read one step with the page's HTML and the resources it loaded",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/steps/{n}/screenshot": {
      "get": {
        "operationId": "browsers.steps.screenshot",
        "summary": "The step's screenshot as a JPEG",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles": {
      "post": {
        "operationId": "profiles.create",
        "summary": "Create a profile for an end user",
        "tags": [
          "Browser profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Create a profile.",
                "properties": {
                  "end_user": {
                    "type": "string",
                    "description": "Your name for the person; required."
                  },
                  "label": {
                    "type": "string",
                    "description": "Free text, up to 200 characters."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "profiles.list",
        "summary": "List the account's profiles, optionally of one end user",
        "tags": [
          "Browser profiles"
        ],
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}": {
      "get": {
        "operationId": "profiles.get",
        "summary": "Read a profile",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "profiles.delete",
        "summary": "Delete a profile and its saved browser",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "profiles.update",
        "summary": "Change a profile's label or how it signs in: vault item, start page, signed-in and signed-out pages",
        "tags": [
          "Login vault"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Change a profile. Every field is optional.",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "Free text, up to 200 characters."
                  },
                  "login": {
                    "type": "object",
                    "description": "item: the vault item id (null unlinks); url: where the sign-in starts, on one of the item's hosts; expect: what signed in looks like (url_matches, selector_exists, text_contains, js_expr, cookie); logged_out: what signed out looks like on a live page; auto: whether a sign-in starts on its own when the profile is found signed out (default true). null clears all of it."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}/save": {
      "post": {
        "operationId": "profiles.save",
        "summary": "Save a running browser into the profile",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Save a browser.",
                "properties": {
                  "browser_id": {
                    "type": "string",
                    "description": "The browser session to save; required."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}/fork": {
      "post": {
        "operationId": "profiles.fork",
        "summary": "Make a new profile that starts as a copy",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Fork a profile. Every field is optional.",
                "properties": {
                  "end_user": {
                    "type": "string",
                    "description": "End user of the copy; the original's when left out."
                  },
                  "label": {
                    "type": "string",
                    "description": "Label of the copy."
                  },
                  "copy_credentials": {
                    "type": "boolean",
                    "description": "Whether the copy signs in with the source's vault item too; default true."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}/check": {
      "post": {
        "operationId": "profiles.check",
        "summary": "Test that the saved login still works",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Open a page in a copy of the saved browser and test what you expect to see.",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The page to open; without url and expect the profile's remembered ones are used (the first explicit check is remembered)."
                  },
                  "expect": {
                    "type": "object",
                    "description": "One or more of url_matches, selector_exists, text_contains, js_expr, cookie."
                  },
                  "timeout": {
                    "type": "integer",
                    "description": "Seconds to wait for the expectations to hold; 1 to 45, default 30."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/signin-links": {
      "post": {
        "operationId": "signin-links.create",
        "summary": "Create a hosted sign-in link for an end user",
        "tags": [
          "Browser profiles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Create a sign-in link.",
                "properties": {
                  "profile": {
                    "type": "string",
                    "description": "A profile id, or the name of your end user (the newest profile of that name is used, one is made when there is none); required."
                  },
                  "start_url": {
                    "type": "string",
                    "description": "The address the person starts on; required."
                  },
                  "allow_hosts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Hosts the page may visit besides the start address and the hosts it redirects to first, such as accounts.google.com or *.example.com."
                  },
                  "ttl": {
                    "type": "integer",
                    "description": "Seconds the link stays valid; 60 to 3600, default 900."
                  },
                  "return_url": {
                    "type": "string",
                    "description": "An https address the page offers when the person is done."
                  },
                  "region": {
                    "type": "string",
                    "description": "Region to start the browser in when the profile has no saved browser yet."
                  },
                  "brand": {
                    "type": "object",
                    "description": "A name (up to 60 characters) and an https logo shown on the page."
                  },
                  "success_check": {
                    "type": "object",
                    "description": "url_matches, selector_exists, text_contains or cookie; when it holds the link completes without the person pressing Done."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/signin-links/{id}": {
      "get": {
        "operationId": "signin-links.get",
        "summary": "Read a sign-in link: state, profile, and whether the success check passed",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "signin-links.delete",
        "summary": "Cancel a sign-in link and stop its browser",
        "tags": [
          "Browser profiles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browser profiles",
          "url": "https://docs.styne.ai/profiles"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/profiles."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vault/items": {
      "post": {
        "operationId": "vault.items.create",
        "summary": "Store a login (username, password, TOTP secret) for one or more sites",
        "tags": [
          "Login vault"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Store a vault item.",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "Free text, up to 200 characters."
                  },
                  "hosts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "1 to 5 sites the item may be typed into; *.example.com covers subdomains. Cannot change later."
                  },
                  "site": {
                    "type": "string",
                    "description": "One site, instead of hosts."
                  },
                  "login_url": {
                    "type": "string",
                    "description": "https address on one of the hosts where the sign-in starts."
                  },
                  "fields": {
                    "type": "object",
                    "description": "The secrets; they are sealed and never answered.",
                    "properties": {
                      "username": {
                        "type": "string",
                        "description": "1 to 320 bytes; required on create."
                      },
                      "password": {
                        "type": "string",
                        "description": "1 to 1024 bytes; required on create."
                      },
                      "totp_secret": {
                        "type": "string",
                        "description": "One-time-code secret: base32, an otpauth://totp/, otpauth://hotp/ or otpauth://steam/ link, steam://<base32>, or a Steam shared_secret in base64 with totp.type steam; null on update removes it."
                      }
                    }
                  },
                  "totp": {
                    "type": "object",
                    "description": "type (totp, hotp, steam), digits (6, 7, 8), period (15, 30, 60), algorithm (SHA1, SHA256, SHA512) and, for hotp, the counter of the first code, when the secret does not carry them. A Steam code has 5 characters and 30 s."
                  },
                  "profiles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Profile ids or end-user names to link; each profile signs in with one item."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "vault.items.list",
        "summary": "List the account's vault items in this region, newest first, optionally of one profile or host",
        "tags": [
          "Login vault"
        ],
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vault/items/{id}": {
      "get": {
        "operationId": "vault.items.get",
        "summary": "Read a vault item (never a secret)",
        "tags": [
          "Login vault"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "vault.items.update",
        "summary": "Change a vault item: label, login URL, linked profiles, or a new password or TOTP secret",
        "tags": [
          "Login vault"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Change a vault item. Every field is optional; hosts cannot change.",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "Free text, up to 200 characters."
                  },
                  "login_url": {
                    "type": "string",
                    "description": "https address on one of the hosts; null removes it."
                  },
                  "profiles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The full list of linked profiles."
                  },
                  "fields": {
                    "type": "object",
                    "description": "The secrets; they are sealed and never answered.",
                    "properties": {
                      "username": {
                        "type": "string",
                        "description": "1 to 320 bytes; required on create."
                      },
                      "password": {
                        "type": "string",
                        "description": "1 to 1024 bytes; required on create."
                      },
                      "totp_secret": {
                        "type": "string",
                        "description": "One-time-code secret: base32, an otpauth://totp/, otpauth://hotp/ or otpauth://steam/ link, steam://<base32>, or a Steam shared_secret in base64 with totp.type steam; null on update removes it."
                      }
                    }
                  },
                  "totp": {
                    "type": "object",
                    "description": "type (totp, hotp, steam), digits (6, 7, 8), period (15, 30, 60), algorithm (SHA1, SHA256, SHA512) and, for hotp, the counter of the first code, when the secret does not carry them. A Steam code has 5 characters and 30 s."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "vault.items.delete",
        "summary": "Delete a vault item and unlink it from its profiles",
        "tags": [
          "Login vault"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vault/audit": {
      "get": {
        "operationId": "vault.audit",
        "summary": "List what happened to the account's vault items, newest first",
        "tags": [
          "Login vault"
        ],
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}/login": {
      "post": {
        "operationId": "profiles.login",
        "summary": "Sign a profile in with its vault item, in the background (202)",
        "tags": [
          "Login vault"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "No fields."
              }
            }
          }
        },
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{id}/relogin": {
      "post": {
        "operationId": "profiles.relogin",
        "summary": "Sign a profile in again with its vault item (202; 200 when a run is already going)",
        "tags": [
          "Login vault"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Every field is optional.",
                "properties": {
                  "human_ttl": {
                    "type": "integer",
                    "description": "Seconds a person has to finish when the run needs one; 60 to 3600, default 1800."
                  },
                  "return_url": {
                    "type": "string",
                    "description": "https address the person returns to after finishing."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Login vault",
          "url": "https://docs.styne.ai/vault"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/vault."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/control": {
      "post": {
        "operationId": "browsers.control.take",
        "summary": "Take control of a browser as a person; the answer carries a control_id and a cdp_url",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Take control of a browser session for a person. The body is optional.",
                "properties": {
                  "holder": {
                    "type": "string",
                    "description": "Name for the audit row; the key that took control when left out."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "browsers.control.show",
        "summary": "Show who holds the browser and every takeover with its holder and times",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "browsers.control.return",
        "summary": "Return control of a browser to your client",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/trace": {
      "get": {
        "operationId": "browsers.trace",
        "summary": "A browser session's timeline: navigations, actions, documents, failed requests, console warnings and errors",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/network": {
      "get": {
        "operationId": "browsers.network",
        "summary": "A browser session's requests with status, type, size and duration",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/console": {
      "get": {
        "operationId": "browsers.console",
        "summary": "A browser session's console lines and browser log entries",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/replay": {
      "get": {
        "operationId": "browsers.replay",
        "summary": "A browser session's replay frames (its screenshots, screencast frames and a paced screencast)",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/metrics": {
      "get": {
        "operationId": "browsers.metrics",
        "summary": "A browser session's CPU, memory and requests in flight over time",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/unblock": {
      "get": {
        "operationId": "browsers.unblock",
        "summary": "A browser session's unblock mode and what each step of the block chain did",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/{id}/captcha": {
      "get": {
        "operationId": "browsers.captcha",
        "summary": "A browser session's captcha mode and what its challenge watcher did",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/browsers/concurrency": {
      "get": {
        "operationId": "browsers.concurrency",
        "summary": "The account's browser concurrency: limit (null when the account has no ceiling), running, queued, and creates the limit refused in the last hour",
        "tags": [
          "Browsers"
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/extensions": {
      "post": {
        "operationId": "extensions.upload",
        "summary": "Upload a Chrome extension: the zip of an unpacked extension, as a form's file part or the body",
        "tags": [
          "Browsers"
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "extensions.list",
        "summary": "List the account's extensions",
        "tags": [
          "Browsers"
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/extensions/{id}": {
      "get": {
        "operationId": "extensions.get",
        "summary": "Read an extension",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "extensions.delete",
        "summary": "Delete an extension",
        "tags": [
          "Browsers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Browsers",
          "url": "https://docs.styne.ai/browsers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/browsers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/ports": {
      "get": {
        "operationId": "sandboxes.ports.list",
        "summary": "List the ports a sandbox exposes, with URL and public flag",
        "tags": [
          "Ports and preview URLs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Ports and preview URLs",
          "url": "https://docs.styne.ai/ports"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ports."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sandboxes.ports.expose",
        "summary": "Expose a port, public (no token) or token-gated",
        "tags": [
          "Ports and preview URLs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Expose a sandbox port on a public URL.",
                "properties": {
                  "port": {
                    "type": "integer",
                    "description": "The port inside the sandbox."
                  },
                  "public": {
                    "type": "boolean",
                    "description": "Serve it without the traffic token."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Ports and preview URLs",
          "url": "https://docs.styne.ai/ports"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ports."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/ports/{port}": {
      "delete": {
        "operationId": "sandboxes.ports.hide",
        "summary": "Hide an exposed port again",
        "tags": [
          "Ports and preview URLs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Ports and preview URLs",
          "url": "https://docs.styne.ai/ports"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ports."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/ssh-keys": {
      "get": {
        "operationId": "sandboxes.sshKeys.list",
        "summary": "List the SSH public keys authorized on a sandbox",
        "tags": [
          "SSH and port forwarding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "SSH and port forwarding",
          "url": "https://docs.styne.ai/ssh"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ssh."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sandboxes.sshKeys.add",
        "summary": "Authorize an OpenSSH public key and get the host, port and user to connect to",
        "tags": [
          "SSH and port forwarding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Add an SSH public key to the sandbox.",
                "properties": {
                  "publicKey": {
                    "type": "string",
                    "description": "The public key in authorized_keys format."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "SSH and port forwarding",
          "url": "https://docs.styne.ai/ssh"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ssh."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/ssh-keys/{keyId}": {
      "delete": {
        "operationId": "sandboxes.sshKeys.remove",
        "summary": "Revoke an authorized SSH public key",
        "tags": [
          "SSH and port forwarding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "SSH and port forwarding",
          "url": "https://docs.styne.ai/ssh"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ssh."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ci/jobs": {
      "post": {
        "operationId": "ci.jobs.create",
        "summary": "Queue a CI job on a runner",
        "tags": [
          "CI runners"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Run a workflow of a repository the account's GitHub App installation covers, on a Styne runner. The workflow needs an `on: workflow_dispatch` trigger.",
                "required": [
                  "repo",
                  "workflow"
                ],
                "properties": {
                  "repo": {
                    "type": "string",
                    "description": "The repository as owner/name."
                  },
                  "workflow": {
                    "type": "string",
                    "description": "The workflow file in .github/workflows (for example test.yml), or its numeric id."
                  },
                  "ref": {
                    "type": "string",
                    "description": "Branch or tag to run on; main when left out."
                  },
                  "inputs": {
                    "type": "object",
                    "description": "The workflow's workflow_dispatch inputs, name to string value (at most 25).",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "env": {
                    "type": "object",
                    "description": "The same as inputs; both are merged, inputs win.",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "CI runners",
          "url": "https://docs.styne.ai/ci"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ci."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ci.jobs.list",
        "summary": "List the account's CI jobs, newest first",
        "tags": [
          "CI runners"
        ],
        "externalDocs": {
          "description": "CI runners",
          "url": "https://docs.styne.ai/ci"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ci."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ci/jobs/{id}": {
      "get": {
        "operationId": "ci.jobs.get",
        "summary": "Read a CI job from queue to finish",
        "tags": [
          "CI runners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "CI runners",
          "url": "https://docs.styne.ai/ci"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ci."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ci/jobs/{id}/steps": {
      "get": {
        "operationId": "ci.jobs.steps",
        "summary": "Read a CI job's steps with their timings",
        "tags": [
          "CI runners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "CI runners",
          "url": "https://docs.styne.ai/ci"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ci."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ci/jobs/{id}/logs": {
      "get": {
        "operationId": "ci.jobs.logs",
        "summary": "Read a CI job's log as server-sent events",
        "tags": [
          "CI runners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "CI runners",
          "url": "https://docs.styne.ai/ci"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ci."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ci/queue": {
      "get": {
        "operationId": "ci.queue",
        "summary": "Read the account's CI jobs waiting for a runner",
        "tags": [
          "CI runners"
        ],
        "externalDocs": {
          "description": "CI runners",
          "url": "https://docs.styne.ai/ci"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/ci."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/prompt": {
      "post": {
        "operationId": "sandboxes.prompt",
        "summary": "Prompt a coding agent (Claude Code, Codex) in a sandbox",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Send a prompt to the coding agent in the sandbox.",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "The prompt (also accepted as message or text)."
                  },
                  "harness": {
                    "type": "string",
                    "description": "The agent to run, for example claude-code."
                  },
                  "model": {
                    "type": "string",
                    "description": "Model the agent uses."
                  },
                  "new": {
                    "type": "boolean",
                    "description": "Start a new conversation."
                  },
                  "conversationId": {
                    "type": "string",
                    "description": "Continue this conversation."
                  },
                  "env": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "The customer's model credentials and other variables the agent reads."
                  },
                  "permissionMode": {
                    "type": "string",
                    "description": "The agent's permission mode."
                  },
                  "cwd": {
                    "type": "string",
                    "description": "Working directory."
                  },
                  "partial": {
                    "type": "boolean",
                    "description": "Claude Code: stream partial messages."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/prompts/{promptId}": {
      "get": {
        "operationId": "sandboxes.prompts.get",
        "summary": "Read the status of one prompt",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/conversations": {
      "get": {
        "operationId": "sandboxes.conversations.list",
        "summary": "List the agent conversations of a sandbox",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/conversations/{conversationId}": {
      "get": {
        "operationId": "sandboxes.conversations.get",
        "summary": "Read one agent conversation",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/events": {
      "get": {
        "operationId": "sandboxes.events",
        "summary": "Read or follow the agent events of a sandbox",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/steer": {
      "post": {
        "operationId": "sandboxes.steer",
        "summary": "Steer a running agent turn with a new message",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Redirect the running agent turn with a new prompt. Same fields as the prompt call.",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "The prompt (also accepted as message or text)."
                  },
                  "harness": {
                    "type": "string",
                    "description": "The agent to run, for example claude-code."
                  },
                  "model": {
                    "type": "string",
                    "description": "Model the agent uses."
                  },
                  "new": {
                    "type": "boolean",
                    "description": "Start a new conversation."
                  },
                  "conversationId": {
                    "type": "string",
                    "description": "Continue this conversation."
                  },
                  "env": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "The customer's model credentials and other variables the agent reads."
                  },
                  "permissionMode": {
                    "type": "string",
                    "description": "The agent's permission mode."
                  },
                  "cwd": {
                    "type": "string",
                    "description": "Working directory."
                  },
                  "partial": {
                    "type": "boolean",
                    "description": "Claude Code: stream partial messages."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/interrupt": {
      "post": {
        "operationId": "sandboxes.interrupt",
        "summary": "Interrupt the running agent turns of a sandbox",
        "tags": [
          "Run a coding agent in a sandbox"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Interrupt the running agent turn.",
                "properties": {
                  "conversation": {
                    "type": "string",
                    "description": "The conversation to interrupt."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Run a coding agent in a sandbox",
          "url": "https://docs.styne.ai/agents"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/agents."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/state": {
      "get": {
        "operationId": "state.usage",
        "summary": "The account's state usage and ceilings",
        "tags": [
          "State store"
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/state/{ns}": {
      "get": {
        "operationId": "state.list",
        "summary": "List the keys of a state namespace",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "ns",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "state.drop",
        "summary": "Delete a state namespace",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "ns",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/state/{ns}/{key}": {
      "get": {
        "operationId": "state.get",
        "summary": "Read a state value",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "ns",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "state.put",
        "summary": "Write a state value, optionally at a version",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "ns",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "state.delete",
        "summary": "Delete a state value",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "ns",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/state": {
      "get": {
        "operationId": "sandboxes.state.list",
        "summary": "List the keys of a sandbox's own state",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/state/{key}": {
      "get": {
        "operationId": "sandboxes.state.get",
        "summary": "Read a value of a sandbox's own state",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "sandboxes.state.put",
        "summary": "Write a value of a sandbox's own state",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "sandboxes.state.delete",
        "summary": "Delete a value of a sandbox's own state",
        "tags": [
          "State store"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "State store",
          "url": "https://docs.styne.ai/state"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/state."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/names": {
      "get": {
        "operationId": "names.list",
        "summary": "List the account's sandbox names",
        "tags": [
          "Calls between sandboxes"
        ],
        "externalDocs": {
          "description": "Calls between sandboxes",
          "url": "https://docs.styne.ai/calls"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/calls."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/triggers": {
      "post": {
        "operationId": "triggers.create",
        "summary": "Add a schedule or webhook trigger to a sandbox",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Create a trigger that delivers events into the sandbox.",
                "properties": {
                  "type": {
                    "description": "schedule or webhook."
                  },
                  "schedule": {
                    "description": "For a schedule trigger: when it fires (see the triggers page)."
                  },
                  "webhook": {
                    "description": "For a webhook trigger: {verify, secret}."
                  },
                  "deliver": {
                    "description": "Where an event goes: {type: http, port, path}, {type: file, dir} or {type: command, command, timeout_seconds}."
                  },
                  "keep_awake_seconds": {
                    "type": "integer",
                    "description": "Seconds the sandbox is kept awake after an event."
                  }
                },
                "required": [
                  "type",
                  "deliver"
                ]
              }
            }
          }
        },
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "triggers.list",
        "summary": "List a sandbox's triggers",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/triggers/{trigger}": {
      "get": {
        "operationId": "triggers.get",
        "summary": "One trigger, with next_fire_at for a schedule",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "triggers.update",
        "summary": "Enable or disable a trigger, or change its keep-awake time",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Change a trigger. Every field is optional.",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Turn the trigger on or off."
                  },
                  "keep_awake_seconds": {
                    "type": "integer",
                    "description": "Seconds the sandbox is kept awake after an event."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "triggers.delete",
        "summary": "Delete a trigger",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/triggers/{trigger}/events": {
      "get": {
        "operationId": "triggers.events",
        "summary": "List a trigger's events with their delivery status",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/triggers/{trigger}/events/{event}/retry": {
      "post": {
        "operationId": "triggers.retry",
        "summary": "Send a dead event again",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/triggers/{trigger}/fire": {
      "post": {
        "operationId": "triggers.fire",
        "summary": "Fire a trigger now with the request body, for testing",
        "tags": [
          "Wake triggers and schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "The event payload, any JSON or text; it is delivered as it came.",
                "additionalProperties": true
              }
            }
          }
        },
        "externalDocs": {
          "description": "Wake triggers and schedules",
          "url": "https://docs.styne.ai/wake-triggers"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/wake-triggers."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/checkpoints": {
      "post": {
        "operationId": "checkpoints.take",
        "summary": "Save a checkpoint of a sandbox as the next step of its timeline",
        "tags": [
          "Checkpoints and rewind"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Save a checkpoint of the sandbox. Every field is optional.",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "A name for the step."
                  },
                  "keepLast": {
                    "type": "integer",
                    "description": "After saving, keep only this many newest steps of the sandbox (at most 1000)."
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Checkpoints and rewind",
          "url": "https://docs.styne.ai/checkpoints"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/checkpoints."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "checkpoints.list",
        "summary": "List a sandbox's checkpoints, oldest first",
        "tags": [
          "Checkpoints and rewind"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Checkpoints and rewind",
          "url": "https://docs.styne.ai/checkpoints"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/checkpoints."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sandboxes/{id}/rewind": {
      "post": {
        "operationId": "sandboxes.rewind",
        "summary": "Go back to a checkpoint or saved snapshot; the sandbox keeps its id",
        "tags": [
          "Checkpoints and rewind"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Go back to a checkpoint; the sandbox keeps its id.",
                "properties": {
                  "checkpoint": {
                    "type": "string",
                    "description": "The checkpoint id from the timeline."
                  }
                },
                "required": [
                  "checkpoint"
                ]
              }
            }
          }
        },
        "externalDocs": {
          "description": "Checkpoints and rewind",
          "url": "https://docs.styne.ai/checkpoints"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/checkpoints."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/images/{digest}": {
      "get": {
        "operationId": "images.get",
        "summary": "The registered image: its references, its config and the machines that hold a ready build",
        "tags": [
          "Container images"
        ],
        "parameters": [
          {
            "name": "digest",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Container images",
          "url": "https://docs.styne.ai/images"
        },
        "responses": {
          "2XX": {
            "description": "Success. The answer is described on https://docs.styne.ai/images."
          },
          "default": {
            "description": "An error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your Styne API key: Authorization: Bearer $STYNE_API_KEY."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Every error answer has this shape; the codes are listed on the errors page.",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The HTTP status."
          },
          "error_code": {
            "type": "string",
            "description": "A stable machine-readable code, for example free_tier_limit."
          },
          "message": {
            "type": "string",
            "description": "What happened and what to do, in plain words."
          },
          "origin": {
            "type": "string",
            "description": "Where the fault came from, for example client, customer_limit or infrastructure."
          },
          "request_id": {
            "type": "string",
            "description": "Quote it to support; the same value is in the x-request-id header."
          }
        },
        "required": [
          "code",
          "message"
        ]
      }
    }
  }
}
