> ## 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.

# Get URL to upload your data

> Generates a signed URL to upload a `tar.gz` archive containing your workspace files. Once uploaded, use the `/initialize` endpoint to unpack it into the sandbox.



## OpenAPI

````yaml post /local-sandbox/{local_sandbox_id}/upload-url
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}/upload-url:
    post:
      tags:
        - local-sandbox
      summary: Get URL to upload your data
      description: >-
        Generates a signed URL to upload a `tar.gz` archive containing your
        workspace files. Once uploaded, use the `/initialize` endpoint to unpack
        it into the sandbox.
      operationId: get_upload_url_local_sandbox__local_sandbox_id__upload_url_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 for the signed URL. Use 'asia' for users in
              China/Asia to upload to a nearby bucket (lower latency). The file
              is accessible from any region over Google's private backbone.
              Defaults to 'us'.
            default: us
          description: >-
            GCS bucket region for the signed URL. Use 'asia' for users in
            China/Asia to upload to a nearby bucket (lower latency). The file is
            accessible from any region over Google's private backbone. Defaults
            to 'us'.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrlResponse'
        '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.
    UploadUrlResponse:
      properties:
        upload_url:
          type: string
          title: Upload Url
          description: Signed GCS URL to PUT the tar.gz archive to
        expires_in_minutes:
          type: integer
          title: Expires In Minutes
          description: Minutes until the upload URL expires
      type: object
      required:
        - upload_url
        - expires_in_minutes
      title: UploadUrlResponse
      description: Response for the upload URL endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````