v44

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-20129390589.6 KB
Capacities

Create capacity

⚠️ This endpoint is in public preview.

Create a capacity to hold compute.

post/preview/v2/capacities

Request body

namestring
workspacestring required

A resource path like 'sfc:workspace:acme:my-workspace' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

tagsSfcApiTags

Example request

{
  "name": "my-resource-name",
  "workspace": "wksp_k3R-nX9vLm7Qp2Yw5Jd8F",
  "tags": {
    "env": "prod",
    "team": "infra"
  }
}

Response

Capacity created.

idstring required
resource_pathstring required

A resource path for a capacity resource. Format: sfc:capacity:<account>:<workspace>:<name>.

ownerstring required
workspacestring required
namestring required
kind'market' | 'originating' | 'read_only' required

Capacity kind determines what operations are allowed on a capacity.

  • Market: User-created capacities.
  • Originating: Provider capacities for selling compute. Cannot add compute (buy orders/procurements).
  • ReadOnly: System-managed capacities used for legacy compute, bare metal contracts, and other. Cannot be modified through the API.
object'capacity' required
created_atinteger required

Unix timestamp.

tagsSfcApiTags

Example response

{
  "id": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
  "resource_path": "sfc:capacity:<account_id>:<workspace>:<name>",
  "owner": "my-resource-name",
  "workspace": "my-resource-name",
  "name": "my-resource-name",
  "object": "capacity",
  "allocation_schedule": {
    "total": [
      {
        "start_at": 1738972800,
        "end_at": 1738972800
      }
    ]
  },
  "procurements": [
    {
      "id": "proc_k3R-nX9vLm7Qp2Yw5Jd8F",
      "name": "my-resource-name"
    }
  ],
  "deployments": [
    {
      "id": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
      "name": "my-resource-name"
    }
  ],
  "created_at": 1738972800,
  "tags": {
    "env": "prod",
    "team": "infra"
  }
}