---
title: "Get URL to upload your data"
method: POST
path: "/local-sandbox/{local_sandbox_id}/upload-url"
tags: ["local-sandbox"]
---

# Get URL to upload your data

`POST /local-sandbox/{local_sandbox_id}/upload-url`

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.

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

- UploadUrlResponse — Response for the upload URL endpoint.
  - `upload_url` string, required — Signed GCS URL to PUT the tar.gz archive to
  - `expires_in_minutes` integer, required — Minutes until the upload URL expires

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