Roll a session back to a checkpoint
Discards the sandbox’s current filesystem and conversation position and restarts it from the checkpoint, in place: same session id, same key, same transcript (the rollback is recorded as an event; earlier events stay readable). Allowed while ready or paused (409 while a run is in progress or an approval is pending); the session is provisioning until the runtime reports ready. Running processes do not survive. Rolling back refreshes the checkpoint’s 30-day expiry.
curl --request POST \
--url https://api.veri.studio/v1/sessions/{session_id}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkpoint_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/sessions/{session_id}/rollback"
payload = { "checkpoint_id": "<string>" }
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({checkpoint_id: '<string>'})
};
fetch('https://api.veri.studio/v1/sessions/{session_id}/rollback', 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,
"harness": "<string>",
"status": "<string>",
"awake_seconds": 123,
"total_cost_usd": 123,
"rate_usd_per_hour": 123,
"egress_bytes": 123,
"egress_usd_per_gb": 123,
"tool_calls": 123,
"tool_call_usd_per_1k": 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>",
"parent_session_id": "<string>",
"forked_from_checkpoint_id": "<string>",
"usage": {
"runs": 123,
"run_duration_ms": {
"p50": 123,
"max": 123
},
"interrupts": 123,
"pauses": 123,
"llm_calls": 123,
"tokens": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_creation": 123
},
"permission_denials": 123,
"approvals": {
"requested": 123,
"approved": 123,
"denied": 123,
"wait_ms_total": 123
},
"tool_calls": 123,
"boot_ms": 123,
"restore_ms": 123,
"snapshot_ms": 123,
"model_cost_usd": 123,
"harness_estimated_cost_usd": 123
},
"resources": {
"sampled_at": "2023-11-07T05:31:56Z",
"load1": 123,
"mem_bytes": 123,
"mem_limit_bytes": 123,
"disk_bytes": 123
}
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Path Parameters
Session ID
Body
Response
The session, provisioning again until the runtime reports ready
The agent harness the session runs (claude-code), from its pinned
environment version.
provisioning | ready | running | awaiting_approval | paused | ended | failed
Seconds the sandbox has been awake (what the session meter bills).
Charged so far (USD).
Price per awake hour (USD) this session bills at, fixed at create from
the environment's size.
Request + response bytes through the sandbox's egress interceptor
(every mode; in unrestricted only the intercepted hosts).
Price per GB of egress_bytes (USD), fixed at create: non-zero only
for an audited_open environment.
Billable third-party tool executions (Composio): each app tool run
through COMPOSIO_MULTI_EXECUTE_TOOL counts one; search, schema and
connection tools are free.
Price per 1,000 tool_calls (USD), fixed at create: non-zero only
when the environment has Composio tools. The workspace's monthly free
allowance is applied when the calls are settled.
Set on a forked child: the session it was forked from.
Set on a forked child: the parent's checkpoint it started from.
Lifecycle timings, runs, model calls, tokens and model cost derived
from the transcript. Only on GET /v1/sessions/{id}; absent on the
list.
Show child attributes
Show child attributes
The newest sandbox resource sample (CPU load, memory, disk) from the runtime's heartbeat; absent until the first one.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.veri.studio/v1/sessions/{session_id}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkpoint_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/sessions/{session_id}/rollback"
payload = { "checkpoint_id": "<string>" }
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({checkpoint_id: '<string>'})
};
fetch('https://api.veri.studio/v1/sessions/{session_id}/rollback', 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,
"harness": "<string>",
"status": "<string>",
"awake_seconds": 123,
"total_cost_usd": 123,
"rate_usd_per_hour": 123,
"egress_bytes": 123,
"egress_usd_per_gb": 123,
"tool_calls": 123,
"tool_call_usd_per_1k": 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>",
"parent_session_id": "<string>",
"forked_from_checkpoint_id": "<string>",
"usage": {
"runs": 123,
"run_duration_ms": {
"p50": 123,
"max": 123
},
"interrupts": 123,
"pauses": 123,
"llm_calls": 123,
"tokens": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_creation": 123
},
"permission_denials": 123,
"approvals": {
"requested": 123,
"approved": 123,
"denied": 123,
"wait_ms_total": 123
},
"tool_calls": 123,
"boot_ms": 123,
"restore_ms": 123,
"snapshot_ms": 123,
"model_cost_usd": 123,
"harness_estimated_cost_usd": 123
},
"resources": {
"sampled_at": "2023-11-07T05:31:56Z",
"load1": 123,
"mem_bytes": 123,
"mem_limit_bytes": 123,
"disk_bytes": 123
}
}
