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"
}
]
}Create VM 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.
x >= 11
Max price per hour for a node in cents
1600
Zone to create the nodes in. Required for auto reserved nodes if any_zone is false.
"hayesvalley"
Allow auto reserved nodes to be created in any zone that meets the requirements
false
Start time as Unix timestamp in seconds Optional for reserved nodes. If not provided, defaults to now
1640995200
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
autoreserved, reserved 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
["cuda-crunch"]User script to be executed during the VM's boot process Data should be base64 encoded
"aGVsbG8gd29ybGQ="
Custom image ID to use for the VM instances
"vmi_1234567890abcdef"
(Optional) If set, enables forwarding to the VM on port 443.
false