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": {}
}
]
}