Fork a session
Starts count new sessions from a checkpoint of this one. Each child gets the checkpoint’s files and conversation (the agent continues from that point in its own, new conversation), the parent’s environment version and rate, its own model access key and its own budget. Children are ordinary sessions: billed, capped and ended individually. Without checkpoint_id a fresh checkpoint is taken first.
curl --request POST \
--url https://api.veri.studio/v1/sessions/{session_id}/fork \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkpoint_id": "<string>",
"count": 1,
"budget_usd": 123,
"title": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/sessions/{session_id}/fork"
payload = {
"checkpoint_id": "<string>",
"count": 1,
"budget_usd": 123,
"title": "<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>', count: 1, budget_usd: 123, title: '<string>'})
};
fetch('https://api.veri.studio/v1/sessions/{session_id}/fork', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"parent_session_id": "<string>",
"checkpoint_id": "<string>",
"sessions": [
{
"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
Checkpoint to fork from (default: take a fresh checkpoint first, which
needs the session ready or paused).
Children to start, 1..=4 (default 1). Every child needs a free slot under the workspace's concurrent-session cap; a fork that does not fit starts no child.
x >= 0Spend ceiling per child in USD (default: the parent's).
Title for the children (default: the parent's).
Response
The checkpoint used and the children
curl --request POST \
--url https://api.veri.studio/v1/sessions/{session_id}/fork \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkpoint_id": "<string>",
"count": 1,
"budget_usd": 123,
"title": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/sessions/{session_id}/fork"
payload = {
"checkpoint_id": "<string>",
"count": 1,
"budget_usd": 123,
"title": "<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>', count: 1, budget_usd: 123, title: '<string>'})
};
fetch('https://api.veri.studio/v1/sessions/{session_id}/fork', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"parent_session_id": "<string>",
"checkpoint_id": "<string>",
"sessions": [
{
"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
}
}
]
}
