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

# Initialize sandbox from your uploaded data

> Extracts the uploaded `tar.gz` archive into the sandbox workspace. This must be called after successfully uploading the file using the URL from `/upload-url`.



## OpenAPI

````yaml post /local-sandbox/{local_sandbox_id}/initialize
openapi: 3.1.0
info:
  title: Klavis AI (https://www.klavis.ai)
  description: Klavis AI - Open Source MCP Integrations for AI Applications
  version: 0.1.0
servers:
  - url: https://api.klavis.ai
    description: US Production server
  - url: https://api.eu.klavis.ai
    description: EU Production server
security: []
paths:
  /local-sandbox/{local_sandbox_id}/initialize:
    post:
      tags:
        - local-sandbox
      summary: Initialize sandbox from your uploaded data
      description: >-
        Extracts the uploaded `tar.gz` archive into the sandbox workspace. This
        must be called after successfully uploading the file using the URL from
        `/upload-url`.
      operationId: >-
        initialize_local_sandbox_local_sandbox__local_sandbox_id__initialize_post
      parameters:
        - name: local_sandbox_id
          in: path
          required: true
          schema:
            type: string
            description: The local sandbox identifier
            title: Local Sandbox Id
          description: The local sandbox identifier
        - name: region
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/GCSRegion'
            description: >-
              GCS bucket region where the archive was uploaded. Must match the
              region used in the `/upload-url` call. Defaults to 'us'.
            default: us
          description: >-
            GCS bucket region where the archive was uploaded. Must match the
            region used in the `/upload-url` call. Defaults to 'us'.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeSandboxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    GCSRegion:
      type: string
      enum:
        - us
        - asia
      title: GCSRegion
      description: |-
        Region hint for GCS upload/download bucket selection.

        Controls which GCS bucket is used for signed URLs so that users
        geographically closer to an edge bucket get faster transfers.
        The data is always pulled to the US GKE cluster over Google's
        private backbone after upload.
    InitializeSandboxResponse:
      properties:
        sandbox_id:
          type: string
          title: Sandbox Id
          description: Sandbox identifier
        status:
          $ref: '#/components/schemas/SandboxStatus'
          description: Current status
        message:
          type: string
          title: Message
          description: Initialization result message
      type: object
      required:
        - sandbox_id
        - status
        - message
      title: InitializeSandboxResponse
      description: Response model for sandbox initialization
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SandboxStatus:
      type: string
      enum:
        - idle
        - occupied
        - error
      title: SandboxStatus
      description: Status of a sandbox instance - matches database enum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````