Sessions
Start a session
Creates a session pinned to an environment version and starts its sandbox. The session is provisioning until the runtime reports ready; watch the stream or poll GET.
POST
/
v1
/
sessions
Start a session
curl --request POST \
--url https://api.veri.studio/v1/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment_id": "<string>",
"environment_version": 123,
"title": "<string>",
"budget_usd": 123
}
'import requests
url = "https://api.veri.studio/v1/sessions"
payload = {
"environment_id": "<string>",
"environment_version": 123,
"title": "<string>",
"budget_usd": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
environment_id: '<string>',
environment_version: 123,
title: '<string>',
budget_usd: 123
})
};
fetch('https://api.veri.studio/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"environment_id": "<string>",
"environment_version": 123,
"status": "<string>",
"awake_seconds": 123,
"total_cost_usd": 123,
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"budget_usd": 123,
"started_at": "2023-11-07T05:31:56Z",
"last_active_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"failure_code": "<string>",
"error_message": "<string>"
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Body
application/json
Response
The new session
provisioning | ready | running | paused | ended | failed
Seconds the sandbox has been awake (what the session meter bills).
Charged so far (USD).
Start a session
curl --request POST \
--url https://api.veri.studio/v1/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment_id": "<string>",
"environment_version": 123,
"title": "<string>",
"budget_usd": 123
}
'import requests
url = "https://api.veri.studio/v1/sessions"
payload = {
"environment_id": "<string>",
"environment_version": 123,
"title": "<string>",
"budget_usd": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
environment_id: '<string>',
environment_version: 123,
title: '<string>',
budget_usd: 123
})
};
fetch('https://api.veri.studio/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"environment_id": "<string>",
"environment_version": 123,
"status": "<string>",
"awake_seconds": 123,
"total_cost_usd": 123,
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"budget_usd": 123,
"started_at": "2023-11-07T05:31:56Z",
"last_active_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"failure_code": "<string>",
"error_message": "<string>"
}
