Get URL to upload your data
curl --request POST \
--url https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"upload_url": "<string>",
"expires_in_minutes": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Local Sandbox
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.
POST
/
local-sandbox
/
{local_sandbox_id}
/
upload-url
Get URL to upload your data
curl --request POST \
--url https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.klavis.ai/local-sandbox/{local_sandbox_id}/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"upload_url": "<string>",
"expires_in_minutes": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Your Klavis AI API key.
Path Parameters
The local sandbox identifier
Query Parameters
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'.
Available options:
us, asia 