Start Session Tape
POST /v1/sessions/{session_id}/tape/start
Start recording a tape for one of your sessions.
A tape is a step-by-step record of what happens on the session's VM (executions, HTTP egress, LLM calls, file changes) that you can read, diff and branch from later. If the session or its VM already has a tape recording, that tape is returned and no new one is started. retention_days sets when the tape expires (0 keeps it until you delete it). To record a VM directly, use POST /v1/vms/\{vm_id\}/tape/start.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
session_id | path | string | Yes | ||
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"record_egress_content": {
"type": "boolean",
"title": "Record Egress Content",
"default": false
},
"record_fs": {
"type": "boolean",
"title": "Record Fs",
"default": true
},
"retention_days": {
"type": "integer",
"maximum": 365,
"minimum": 0,
"title": "Retention Days",
"default": 7
}
},
"type": "object",
"title": "TapeStartRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
record_egress_content | boolean | No | default=false | |
record_fs | boolean | No | default=true | |
retention_days | integer | No | default=7, min=0, max=365 |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"vm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Vm Id"
},
"parent_tape_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Parent Tape Id"
},
"parent_step_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Parent Step Id"
},
"status": {
"type": "string",
"title": "Status"
},
"started_at": {
"type": "string",
"title": "Started At"
},
"stopped_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Stopped At"
},
"total_steps": {
"type": "integer",
"title": "Total Steps",
"default": 0
},
"total_size_bytes": {
"type": "integer",
"title": "Total Size Bytes",
"default": 0
},
"record_egress_content": {
"type": "boolean",
"title": "Record Egress Content",
"default": false
},
"record_fs": {
"type": "boolean",
"title": "Record Fs",
"default": true
},
"retention_until": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Retention Until"
},
"s3_prefix": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "S3 Prefix"
},
"workspace_volume_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Workspace Volume Id"
}
},
"type": "object",
"required": [
"id",
"status",
"started_at"
],
"title": "TapeInfo"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | Yes | ||
session_id | string | null | No | nullable | |
vm_id | string | null | No | nullable | |
parent_tape_id | string | null | No | nullable | |
parent_step_id | integer | null | No | nullable | |
status | string | Yes | ||
started_at | string | Yes | ||
stopped_at | string | null | No | nullable | |
total_steps | integer | No | default=0 | |
total_size_bytes | integer | No | default=0 | |
record_egress_content | boolean | No | default=false | |
record_fs | boolean | No | default=true | |
retention_until | string | null | No | nullable | |
s3_prefix | string | null | No | nullable | |
workspace_volume_id | string | null | No | nullable |
400
session_id is not a valid UUID.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.