Skip to main content
This feature is in public preview.
The Preview API is hosted at https://api.sfcompute.com/preview/v2. All requests require a Bearer token.

Create an API token

sf tokens create --name my-token
This prints a token starting with sk_live_. Save it somewhere safe - you will not be able to retrieve it again.

Grant permissions

Tokens start with no permissions. Grant access to the resources your token needs.
sf grants create --token my-token --role admin --workspace my-workspace
See Roles and Grants for how permissions work, and the Quick Start for more on workspaces.

Make a request

curl https://api.sfcompute.com/preview/v2/pools \
  -H "Authorization: Bearer sk_live_..."

API reference

The full API reference is available in the sidebar. The reference is auto-generated from our OpenAPI spec and covers all available endpoints, request parameters, and response shapes.