Skip to main content
POST
/
v1
/
nodes
Create nodes
curl --request POST \
  --url https://api.sfcompute.com/v1/nodes \
  --header 'Content-Type: application/json' \
  --data '
{
  "desired_count": 1,
  "max_price_per_node_hour": 1600,
  "zone": "hayesvalley",
  "any_zone": false,
  "start_at": 1640995200,
  "end_at": 123,
  "node_type": "autoreserved",
  "names": [
    "cuda-crunch"
  ],
  "cloud_init_user_data": "aGVsbG8gd29ybGQ=",
  "image_id": "vmi_1234567890abcdef",
  "forward_443": false
}
'
{
  "object": "list",
  "data": [
    {
      "object": "node",
      "id": "n_b1dc52505c6db142",
      "name": "cuda-crunch",
      "zone": "hayesvalley",
      "gpu_type": "H100",
      "owner": "sfcompute",
      "status": "running",
      "created_at": 1640995200,
      "updated_at": 1640995200,
      "start_at": 1640995200,
      "procurement_id": "proc_b1dc52505c6de142",
      "max_price_per_node_hour": 1000,
      "node_type": "autoreserved"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.sfcompute.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
desired_count
integer<u-int32>
required
Required range: x >= 1
Example:

1

max_price_per_node_hour
integer<int64>
required

Max price per hour for a node in cents

Example:

1600

zone
string

Zone to create the nodes in. Required for auto reserved nodes if any_zone is false.

Example:

"hayesvalley"

any_zone
boolean
default:false

Allow auto reserved nodes to be created in any zone that meets the requirements

Example:

false

start_at
integer<int64>

Start time as Unix timestamp in seconds Optional for reserved nodes. If not provided, defaults to now

Example:

1640995200

end_at
integer<int64> | null

End time as Unix timestamp in seconds If provided, end time must be aligned to the hour If not provided, the node will be created as an autoreserved node

node_type
null | enum<string>
default:autoreserved
Available options:
autoreserved,
reserved
names
string[]

Custom node names Names cannot begin with 'vm_' or 'n_' as this is reserved for system-generated IDs Names cannot be numeric strings Names cannot exceed 128 characters

Example:
["cuda-crunch"]
cloud_init_user_data
string<byte>

User script to be executed during the VM's boot process Data should be base64 encoded

Example:

"aGVsbG8gd29ybGQ="

image_id
string

Custom image ID to use for the VM instances

Example:

"vmi_1234567890abcdef"

forward_443
boolean
default:false

(Optional) If set, enables forwarding to the VM on port 443.

Example:

false

Response

Nodes created successfully

object
string
required
Example:

"list"

data
object[]
required