For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sessions

The Sessions API lets you manage sandbox sessions, their backing templates and classes, and the resources attached to each session. A session is a running sandbox environment provisioned from a template and class, with optional file, repository, and memory-store resources mounted into it.

To obtain your authentication credentials, install the Release CLI and run release auth login. The CLI stores credentials in ~/.release.yaml.


Sandbox Classes

Sandbox classes define the compute shape (CPU, memory, GPU) available to a session.

List Sandbox Classes

Endpoint

GET https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_classes

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

Status Codes

Code
Description

200

Returns array of sandbox classes

401

Unauthorized — invalid or missing credentials

Response Body

Returns an array of sandbox class objects.

Field
Type
Description

id

string (hashid)

Unique identifier for the sandbox class

name

string

Display name of the class

created_at

string (ISO 8601)

When the class was created

updated_at

string (ISO 8601)

When the class was last updated

Example Responses

200 OK

401 Unauthorized


Get Sandbox Class

Endpoint

GET https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_classes/{id}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The sandbox class ID

Status Codes

Code
Description

200

Returns the sandbox class

401

Unauthorized — invalid or missing credentials

404

Sandbox class not found

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the sandbox class

name

string

Display name of the class

created_at

string (ISO 8601)

When the class was created

updated_at

string (ISO 8601)

When the class was last updated

Example Responses

200 OK

404 Not Found


Sandbox Templates

Templates define the default configuration for a session, including which sandbox class to use and which resources to attach.

List Sandbox Templates

Endpoint

GET https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_templates

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

Status Codes

Code
Description

200

Returns array of sandbox templates

401

Unauthorized — invalid or missing credentials

Response Body

Returns an array of sandbox template objects.

Field
Type
Description

id

string (hashid)

Unique identifier for the template

name

string

Display name of the template

sandbox_class_id

string (hashid)

The sandbox class used by this template

created_at

string (ISO 8601)

When the template was created

updated_at

string (ISO 8601)

When the template was last updated

Example Responses

200 OK


Get Sandbox Template

Endpoint

GET https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_templates/{id}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The sandbox template ID

Status Codes

Code
Description

200

Returns the sandbox template

401

Unauthorized — invalid or missing credentials

404

Template not found

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the template

name

string

Display name of the template

sandbox_class_id

string (hashid)

The sandbox class used by this template

created_at

string (ISO 8601)

When the template was created

updated_at

string (ISO 8601)

When the template was last updated

Example Responses

200 OK

404 Not Found


Create Sandbox Template

Endpoint

POST https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_templates

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

Request Body

Field
Type
Required
Description

name

string

Yes

Display name for the template

sandbox_class_id

string (hashid)

Yes

The sandbox class to use

Example

Status Codes

Code
Description

201

Template created

401

Unauthorized — invalid or missing credentials

422

Validation error

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the template

name

string

Display name of the template

sandbox_class_id

string (hashid)

The sandbox class used by this template

created_at

string (ISO 8601)

When the template was created

updated_at

string (ISO 8601)

When the template was last updated

Example Responses

201 Created

422 Unprocessable Entity


Update Sandbox Template

Endpoint

PATCH https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_templates/{id}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The sandbox template ID

Request Body

Field
Type
Required
Description

name

string

No

Updated display name

sandbox_class_id

string (hashid)

No

Updated sandbox class

Example

Status Codes

Code
Description

200

Template updated

401

Unauthorized — invalid or missing credentials

404

Template not found

422

Validation error

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the template

name

string

Display name of the template

sandbox_class_id

string (hashid)

The sandbox class used by this template

created_at

string (ISO 8601)

When the template was created

updated_at

string (ISO 8601)

When the template was last updated

Example Responses

200 OK


Delete Sandbox Template

Endpoint

DELETE https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_templates/{id}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The sandbox template ID

Status Codes

Code
Description

204

Template deleted (no content)

401

Unauthorized — invalid or missing credentials

404

Template not found

Example Responses

404 Not Found


Sessions

Sessions represent running sandbox environments. Each session is provisioned from a template and progresses through a defined state lifecycle.

State lifecycle: pending -> running -> suspended -> terminating -> terminated | errored

List Sessions

Endpoint

GET https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

Status Codes

Code
Description

200

Returns array of sessions

401

Unauthorized — invalid or missing credentials

Response Body

Returns an array of session objects. See session fields below.

Example Responses

200 OK


Create Session

Endpoint

POST https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

Request Body

Field
Type
Required
Description

sandbox_template_id

string (hashid)

Yes

The template to provision from

title

string

No

Human-readable session name

cluster_id

string (hashid)

No

Target cluster for the session

environment_id

string (hashid)

No

Bind to a Release environment

metadata

object

No

Arbitrary key-value metadata

resources

array

No

Resources to attach (see Resource Types)

Example

Status Codes

Code
Description

201

Session created

401

Unauthorized — invalid or missing credentials

422

Validation error (invalid template, environment, or resource configuration)

Response Body

See session fields below.

Example Responses

201 Created

422 Unprocessable Entity


Get Session

Endpoint

GET https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

Status Codes

Code
Description

200

Returns the session

401

Unauthorized — invalid or missing credentials

404

Session not found

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the session

title

string or null

Human-readable session name

state

string

One of: pending, running, suspended, terminating, terminated, errored

sandbox_template_id

string (hashid)

The template this session was created from

environment_id

string (hashid) or null

Bound Release environment, if any

sandbox_claim_name

string

Internal claim name for the sandbox

metadata

object

Arbitrary key-value metadata

started_at

string (ISO 8601) or null

When the session began running

completed_at

string (ISO 8601) or null

When the session finished

created_at

string (ISO 8601)

When the session was created

updated_at

string (ISO 8601)

When the session was last updated

resources

array

List of attached resource objects (see Resource Types)

Example Responses

200 OK

404 Not Found


Update Session

Updates a session's mutable fields. Which fields can be updated depends on the current session state.

State-based edit rules:

Session State
Allowed Fields

pending, creating, suspended

title, metadata, environment_id, resources

running

title, metadata

terminated, errored

None (read-only, returns 422)

Endpoint

PATCH https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

Request Body

Field
Type
Required
Description

title

string

No

Updated session name

metadata

object

No

Updated metadata

environment_id

string (hashid)

No

Updated environment binding (not allowed when running)

Example

Status Codes

Code
Description

200

Session updated

401

Unauthorized — invalid or missing credentials

404

Session not found

422

State conflict — session cannot be edited in its current state

Response Body

Returns the updated session object. See session fields.

Example Responses

200 OK

422 Session State Conflict


Suspend Session

Suspends a running session, preserving its state for later resumption.

Endpoint

POST https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}/suspend

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

Status Codes

Code
Description

200

Session suspended

401

Unauthorized — invalid or missing credentials

404

Session not found

422

Invalid state transition

Response Body

Returns the updated session object. See session fields.

Example Responses

200 OK


Resume Session

Resumes a previously suspended session.

Endpoint

POST https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}/resume

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

Status Codes

Code
Description

200

Session resumed

401

Unauthorized — invalid or missing credentials

404

Session not found

422

Invalid state transition

Response Body

Returns the updated session object. See session fields.

Example Responses

200 OK


Terminate Session

Permanently terminates a session. This action cannot be undone.

Endpoint

POST https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}/terminate

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

Status Codes

Code
Description

200

Session terminating

401

Unauthorized — invalid or missing credentials

404

Session not found

422

Invalid state transition

Response Body

Returns the updated session object. See session fields.

Example Responses

200 OK


Session Resources

Resources are files, repositories, or memory stores mounted into a session. Resources can only be added, updated, or removed when the session is in pending, creating, or suspended state. Attempting to modify resources in any other state returns a 422 session_state_conflict error.

Resource state lifecycle: pending -> cloning -> ready | failed

Resource Types

Each resource has a resource_type that determines which fields are available in its config object.

github_repository

Field
Type
Required
Description

repo_url

string

Yes

GitHub repository URL

auth_mode

string

No

One of: github_app, github_token. Default: github_app

token

string

No

Required when auth_mode is github_token. Never persisted

checkout

object

No

{"type": "branch|tag|commit|none", "value": "main"}

branch

string

No

Legacy checkout field (backward compatible)

repo_name

string

No

Directory name for the cloned repository

repository_id

string

No

Platform repository ID

mount_path

string

No

Mount location, e.g. /mnt/session/repos/repo-name

file

Field
Type
Required
Description

s3_uri

string

Yes

S3 URI (s3://bucket/path), must belong to account's upload prefix

filename

string

Yes

Name of the file

content_type

string

Yes

MIME type of the file

size_bytes

integer

Yes

File size in bytes (max 100 MB)

checksum

string

No

File checksum for integrity verification

mount_path

string

Yes

Mount location within the session

memory_store

Field
Type
Required
Description

memory_store_id

string (hashid)

Yes

ID of the memory store to attach

namespace

string

No

Namespace within the memory store

mode

string

No

One of: read_write, read_only

mount_path

string

Yes

Mount location within the session

Validations

  • All mount paths must start with /mnt/session

  • File resources have a maximum size of 100 MB

  • S3 URIs must start with s3:// and belong to the account's upload prefix

  • When using github_token auth mode, a token must be provided and the repo_url must be an HTTPS github.com URL

  • environment_id must belong to the same account (returns 422 if not found)


Add Resource to Session

Endpoint

POST https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}/resources

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

Request Body

Field
Type
Required
Description

resource_type

string

Yes

One of: github_repository, file, memory_store

mount_path

string

Yes

Mount location (must start with /mnt/session)

config

object

Yes

Type-specific configuration (see Resource Types)

Example — GitHub repository

Example — File

Example — Memory store

Status Codes

Code
Description

201

Resource added

401

Unauthorized — invalid or missing credentials

404

Session not found

422

Validation error or session state conflict

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the resource

resource_type

string

One of: github_repository, file, memory_store

state

string

One of: pending, cloning, ready, failed

mount_path

string

Mount location within the session

config

object

Type-specific configuration

status

object

Current status information

Example Responses

201 Created

422 Session State Conflict


Update Resource

Endpoint

PATCH https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}/resources/{resourceId}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

resourceId

string (hashid)

Yes

The resource ID

Request Body

Field
Type
Required
Description

mount_path

string

No

Updated mount path (must start with /mnt/session)

branch

string

No

Updated branch (github_repository only)

namespace

string

No

Updated namespace (memory_store only)

mode

string

No

Updated mode (memory_store only). One of: read_write, read_only

Example

Status Codes

Code
Description

200

Resource updated

401

Unauthorized — invalid or missing credentials

404

Session or resource not found

422

Validation error or session state conflict

Response Body

Field
Type
Description

id

string (hashid)

Unique identifier for the resource

resource_type

string

One of: github_repository, file, memory_store

state

string

One of: pending, cloning, ready, failed

mount_path

string

Mount location within the session

config

object

Type-specific configuration

status

object

Current status information

Example Responses

200 OK


Remove Resource

Endpoint

DELETE https://backend-{handle}-envs.gcp.release.com/ai/accounts/{accountId}/sandbox_sessions/{id}/resources/{resourceId}

Authentication

Header
Type
Description

X-User-Email

string

Email associated with your Release account

X-User-Token

string

User authentication token from ~/.release.yaml

Path Parameters

Name
Type
Required
Description

accountId

string (hashid)

Yes

The Release account ID

id

string (hashid)

Yes

The session ID

resourceId

string (hashid)

Yes

The resource ID

Status Codes

Code
Description

204

Resource removed (no content)

401

Unauthorized — invalid or missing credentials

404

Session or resource not found

422

Session state conflict — resources cannot be modified in current state

Example Responses

422 Session State Conflict

Last updated

Was this helpful?