Skip to main content
POST
/
preview
/
v2
/
pools
Create pool
curl --request POST \
  --url https://api.sfcompute.com/preview/v2/pools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspace": "<string>",
  "name": "my-resource-name",
  "tags": {
    "env": "prod",
    "team": "infra"
  }
}
'
{
  "object": "pool",
  "id": "pool_k3R-nX9vLm7Qp2Yw5Jd8F",
  "resource_path": "<string>",
  "owner": "<string>",
  "workspace": "<string>",
  "workspace_id": "<string>",
  "name": "<string>",
  "allocation_schedule": {
    "total": [
      {
        "start_at": 1738972800,
        "node_count": 123,
        "end_at": 1738972800
      }
    ],
    "by_instance_sku": {}
  },
  "created_at": 1738972800,
  "procurements": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "deployments": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "tags": {
    "env": "prod",
    "team": "infra"
  }
}

Authorizations

Authorization
string
header
required

Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.

Body

application/json

Create a pool to hold compute.

workspace
string
required

Workspace to create this pool in.

Pattern: (wksp_[0-9a-zA-Z_-]{1,21})|(sfc:workspace:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,1})
Example:

"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"

name
null | string

Unique name for this pool.

Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

tags
object

Optional metadata tags for this pool.

Example:
{ "env": "prod", "team": "infra" }

Response

Pool created.

A pool — a container of owned compute allocation over time.

object
string
default:pool
required
read-only

Discriminator for /pools responses.

Allowed value: "pool"
id
required

Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.

Pattern: pool_[0-9a-zA-Z_-]{1,21}
Example:

"pool_k3R-nX9vLm7Qp2Yw5Jd8F"

resource_path
string
required

A resource path for a pool resource. Format: sfc:pool:::.

Pattern: sfc:pool:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+
Example:

"sfc:pool:<account_id>:<workspace>:<name>"

owner
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace_id
string
required
Pattern: wksp_[0-9a-zA-Z_-]{1,21}
Example:

"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"

name
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

kind
enum<string>
required

Pool kind determines what operations are allowed on a pool.

  • Market: User-created pools. - Originating: Provider pools for selling compute. Cannot add compute (buy orders/procurements). - ReadOnly: System-managed pools used for legacy compute, bare metal contracts, and other. Cannot be modified through the API.
Available options:
market,
originating,
read_only
allocation_schedule
object
required

Allocation schedule of this pool. Add to the schedule by placing buy orders into this pool.

created_at
integer<int64>
required

Unix timestamp.

Example:

1738972800

procurements
object[]

Active procurements targeting this pool.

deployments
object[]

Active deployments targeting this pool.

tags
object

Metadata tags attached to this pool.

Example:
{ "env": "prod", "team": "infra" }