Skip to main content
POST
/
preview
/
v2
/
order_preview
Estimate an order
curl --request POST \
  --url https://api.sfcompute.com/preview/v2/order_preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "requirements": {
    "accelerator": [
      "H100"
    ]
  },
  "start_at": 1738972800,
  "duration_seconds": 1,
  "node_count": 123,
  "capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F"
}
'
{
  "post_order_body": {
    "capacity": "<string>",
    "side": "sell",
    "instance_sku": "<string>",
    "allocation_schedule_delta": [
      {
        "start_at": 1738972800,
        "node_count": 123,
        "end_at": 1738972800
      }
    ],
    "limit_price_dollars_per_node_hour": "<string>",
    "allow_standing": true
  },
  "fee": {
    "flat_dollars_per_node_hour": "<string>",
    "percentage_bps": 123
  },
  "type": "quoted",
  "notices": [
    {
      "start_at": 1738972800,
      "end_at": 1738972800,
      "maintenance_type": "info",
      "title": "<string>",
      "description": "<string>",
      "type": "maintenance_window",
      "action_message": "<string>"
    }
  ]
}

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.

Authorizations

Authorization
string
header
required

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

Body

application/json
requirements
object
required

Key/value filters on instance SKU properties.

Valid keys and values are published at GET /v2/instance_sku_property_catalog.

Empty map = no constraints.

Example:
{ "accelerator": ["H100"] }
start_at
integer<int64>
required

Order start. Must align to a 60-second boundary.

Example:

1738972800

duration_seconds
integer<u-int64>
required

Order duration in seconds. Must be a positive multiple of 60.

Required range: x >= 0
node_count
integer<int32>
required

Number of nodes. Must be positive.

capacity
null | string

Capacity that receives compute when the order fills. Omit to get an estimate without pinning to a capacity. The response body then returns a placeholder you must replace before submitting to /v2/orders.

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

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

Response

Estimate result.

post_order_body
object
required

Ready-to-submit body for POST /v2/orders. Posting this body verbatim will fill at the estimated price.

fee
object
required

Fee policy for the matched instance SKU.

type
string
default:quoted
required
read-only
Allowed value: "quoted"
notices
object[]

Maintenance windows for the matched instance SKU overlapping the order's delivery window.