Session ops
Upload a file into a session's sandbox
Creates or replaces one file under /workspace with the request body (at most 32 MiB; larger files are out of scope: fetch them from inside the sandbox with exec). Missing parent directories are created; symlinks are resolved and the target must stay under /workspace. The file is owned by the agent user. Allowed while the session is ready. Recorded as session.file_write (path and size).
PUT
/
v1
/
sessions
/
{session_id}
/
files
/
content
Upload a file into a session's sandbox
curl --request PUT \
--url https://api.veri.studio/v1/sessions/{session_id}/files/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '[
1
]'import requests
url = "https://api.veri.studio/v1/sessions/{session_id}/files/content"
payload = "[\n 1\n]"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '[\n 1\n]'
};
fetch('https://api.veri.studio/v1/sessions/{session_id}/files/content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"path": "<string>",
"bytes": 1
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Path Parameters
Session ID
Query Parameters
Absolute path under /workspace (listing default: /workspace). Other
query parameters (list=1) are accepted and ignored: a directory is
always listed.
Body
application/octet-stream
Required range:
x >= 0Upload a file into a session's sandbox
curl --request PUT \
--url https://api.veri.studio/v1/sessions/{session_id}/files/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '[
1
]'import requests
url = "https://api.veri.studio/v1/sessions/{session_id}/files/content"
payload = "[\n 1\n]"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: '[\n 1\n]'
};
fetch('https://api.veri.studio/v1/sessions/{session_id}/files/content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"path": "<string>",
"bytes": 1
}
