---
title: "Initialize sandbox from your uploaded data"
method: POST
path: "/local-sandbox/{local_sandbox_id}/initialize"
tags: ["local-sandbox"]
---

# Initialize sandbox from your uploaded data

`POST /local-sandbox/{local_sandbox_id}/initialize`

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

## Path parameters

- `local_sandbox_id` string, required — The local sandbox identifier

## Query parameters

- `region` 'us' | 'asia' — 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.

## Response `200`

Successful Response

- InitializeSandboxResponse — Response model for sandbox initialization
  - `sandbox_id` string, required — Sandbox identifier
  - `status` 'idle' | 'occupied' | 'error', required — Status of a sandbox instance - matches database enum
  - `message` string, required — Initialization result message

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai.md) · [All operations](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/klavis-ai/klavis-ai-https-www-klavis-ai/revisions/1f05ced7280f/schema)
