Skip to main content
POST
Create a volume
Related guide: Sandbox volumes.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Headers

X-Team-Id
string

Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.

Minimum string length: 1

Query Parameters

team_id
string

Optional team ID. Must match X-Team-Id when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.

Minimum string length: 1

Body

application/json

Volume to create. Only size is required.

size
required

Capacity, as a size (e.g. "10Gi", "512Mi") or a number of Mi (e.g. 1024). Can grow later, never shrink.

Example:

"10Gi"

name
string

Volume name, unique in the team. Generated when omitted.

Required string length: 1 - 49
Pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
Example:

"datasets"

region
string

Region of the volume. Defaults to the default sandbox region. Sandboxes mounting it must be in the same region.

Example:

"us-pdx-1"

labels
object

Key-value pairs for organizing and filtering resources. Labels can be used to categorize resources by environment, project, team, or any custom taxonomy.

Example:

Response

Volume created. Provisioning may continue; inspect status for readiness.

Persistent volume.

name
string
required
read-only

Volume name, used in volume_name path parameters and sandbox volumes.

Example:

"datasets"

size
required

Capacity, as a size (e.g. "10Gi", "512Mi") or a number of Mi (e.g. 1024).

Example:

"10Gi"

region
string
required

Region of the volume.

Example:

"us-pdx-1"

status
enum<string>
required

Volume status, always uppercase.

Available options:
DEPLOYING,
DEPLOYED,
FAILED,
DELETING
Example:

"DEPLOYED"

attached_to
string
read-only

Name of the sandbox the volume is mounted in. Absent when not mounted.

Example:

"baseten-api-review-0916"

labels
object

Labels. Omitted from list responses.

Example:
created_at
string<date-time>
read-only
Example:

"2026-10-12T12:00:00Z"

updated_at
string<date-time>
read-only
Example:

"2026-10-12T12:00:00Z"

created_by
string
read-only

User or service account that created the volume.

Example:

"sandbox-automation"

updated_by
string
read-only

User or service account that last updated the volume.

Example:

"sandbox-automation"