> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade the sandbox-api

> Triggers an upgrade of the sandbox-api process. Returns 200 immediately before upgrading.
The upgrade will: download the specified binary from GitHub releases, validate it, and restart.
All running processes will be preserved across the upgrade.
Available versions: "latest" (default, most recent release), "develop", "main", or specific tag like "v1.0.0"
You can also specify a custom baseUrl for forks (defaults to https://github.com/blaxel-ai/sandbox/releases)



## OpenAPI

````yaml /reference/sandbox-api/openapi.json post /upgrade
openapi: 3.0.0
info:
  description: API for manipulating filesystem, processes and network.
  title: Sandbox API
  contact: {}
  version: 0.0.1
servers:
  - url: https://{sandbox_host}
    description: >-
      Host from the sandbox's returned url, without the scheme or trailing
      slash.
    variables:
      sandbox_host:
        default: sandbox.example.com
security:
  - BearerAuth: []
paths:
  /upgrade:
    post:
      tags:
        - system
      summary: Upgrade the sandbox-api
      description: >-
        Triggers an upgrade of the sandbox-api process. Returns 200 immediately
        before upgrading.

        The upgrade will: download the specified binary from GitHub releases,
        validate it, and restart.

        All running processes will be preserved across the upgrade.

        Available versions: "latest" (default, most recent release), "develop",
        "main", or specific tag like "v1.0.0"

        You can also specify a custom baseUrl for forks (defaults to
        https://github.com/blaxel-ai/sandbox/releases)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeRequest'
        description: Upgrade options
      responses:
        '200':
          description: Upgrade initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpgradeRequest:
      type: object
      properties:
        baseUrl:
          description: Base URL for releases (useful for forks)
          type: string
          example: https://github.com/blaxel-ai/sandbox/releases
        version:
          description: >-
            Version to upgrade to: "latest" (default), "develop", "main", or
            specific tag like "v1.0.0"
          type: string
          example: latest
    SuccessResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: File created successfully
        path:
          type: string
          example: /path/to/file
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Error message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Sandbox access token created through POST /v1/token.

````