Skip to main content
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

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

local_sandbox_id
string
required

The local sandbox identifier

Query Parameters

region
enum<string>
default:us

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

Response

Successful Response

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