Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

The San Francisco Compute Company Instances API

Spin up instances in a capacity to use your available compute.

The San Francisco Compute Company Instances API is one of 14 APIs that The San Francisco Compute Company publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Instances. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, and authentication docs.

This API exposes 10 operations across 6 paths, and defines 49 schemas. It is described by OpenAPI 3.1.0, at version 0.1.0.

Requests are made against a single base URL, https://api.sfcompute.com.

10 operations 6 paths 49 schemas 1 DELETE4 GET2 PATCH3 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
0.1.0
Base URL
https://api.sfcompute.com/preview/v2
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

The San Francisco Compute Company Instances API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (JWT) (bearer_auth). By default, every request must be authenticated.

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

Paths & Operations 10

Across 6 paths, the API surfaces 10 operations — 1 DELETE, 4 GET, 2 PATCH, 3 POST. Each is listed below with its method, path, parameters, and response codes.

Instances 10

Spin up instances in a capacity to use your available compute.

POST
/preview/v2/instances
Create instance
create_instance body → 201401403404422500
GET
/preview/v2/instances
List instances
list_instances 13 params → 200401403404422500
PATCH
/preview/v2/instances
Update multiple instances
batch_patch_instances body → 200401403422500
DELETE
/preview/v2/instances/{id}
Delete instance
delete_instance 1 param → 204401403404409500
GET
/preview/v2/instances/{id}
Get instance
fetch_instance 1 param → 200401403404500
PATCH
/preview/v2/instances/{id}
Update instance
update_instance 1 param body → 200400401403404422500
GET
/preview/v2/instances/{id}/logs
Get instance logs
get_instance_logs 7 params → 200401403404422500
POST
/preview/v2/instances/{id}/replace
Replace instance
replace_instance 2 params body → 201400401403404422500
GET
/preview/v2/instances/{id}/ssh
Get instance SSH info
get_instance_ssh 1 param → 200401403404500
POST
/preview/v2/instances/{id}/terminate
Terminate instance
terminate_instance 1 param → 200401403404500

Schemas 49

The contract defines 49 schemas that model the data the API accepts and returns. The most detailed are CreateInstanceRequest (10 properties), InstanceScope (6 properties), InstanceSshInfo (5 properties), InstanceLogChunk (5 properties). Each schema is shown below with its type and property counts.

InstanceSkuId
Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
InternalServerError
object
1 property 1 required
DeploymentId
string
InstancePriority
string
Instance priority — a relative ranking that determines which instances the system prefers to keep running when capacity is constrained. When a capacity's quota…
SpotDeploymentId
string
UnprocessableEntityError
object
1 property 1 required
ErrorDetail
object
3 properties 2 required
FirewallId
string
WorkspaceId
string
InstanceLogChunk
object
5 properties 5 required
ConflictError
object
1 property 1 required
ResourcePathOrId_PoolId
string
A resource path like 'sfc:pool:acme:prod:my-pool' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved.…
BadRequestError
object
1 property 1 required
PatchInstanceRequest
object
3 properties
InstancesCursor
string
ImageId
Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
UnauthorizedError
object
1 property 1 required
ResourcePathOrId_FirewallId
string
A resource path like 'sfc:firewall:acme:prod:my-firewall' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed o…
InstanceId
Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
InstanceScope
object
6 properties 6 required
InstanceSshInfo
object
5 properties 3 required
CreateInstanceRequest
object
10 properties 3 required
PoolId
string
ListInstancesResponse
object
4 properties 3 required
NotFoundError
object
1 property 1 required
ResourcePathOrId_ImageId
string
A resource path like 'sfc:image:acme:prod:my-image' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or move…
BatchPatchInstancesResponse
object
Response shape for PATCH /v2/instances (batch). Mirrors the input list — one InstanceResponse per unique id in the request body, reflecting the post-write stat…
2 properties 2 required
PoolSummary
object
A pool referenced by id and name.
2 properties 2 required
SpotDeploymentSummary
object
2 properties 2 required
ReplaceInstanceRequest
object
Request body for POST /v2/instances/{id}/replace. Terminates the target instance and creates a fresh one on the same capacity and SKU, with a new image (and op…
3 properties 1 required
InstanceLogsResponse
object
2 properties 2 required
BatchPatchInstanceEntry
object
One entry in a [BatchPatchInstancesRequest]: the instance to patch (id) and the fields to update. prioritylevel is the only field currently patchable here. To…
2 properties 2 required
ImageSummary
object
2 properties 2 required
InstanceManagedBySummary
Tags
object
InstanceStatus
string
awaitingallocation when waiting for compute allocation on its capacity, running once assigned and the physical machine is running (still takes time for the ima…
CapacityId
Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
Name
string
CapacitySummary
object
2 properties 2 required
InstanceSshHostKey
object
2 properties 2 required
InstanceResponse
InstanceSkuSummary
object
A summary of an instance SKU - its id and human-recognizable alias - embedded on resources that reference a SKU.
3 properties 3 required
BatchPatchInstancesRequest
object
Request body for PATCH /v2/instances (batch). Each entry in data applies a partial patch to one instance; instances not mentioned are untouched. All entries mu…
1 property 1 required
InstanceInclude
string
ResourcePathOrId_WorkspaceId
string
A resource path like 'sfc:workspace:acme:my-workspace' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or m…
instanceResourcePath_InstanceId
string
A resource path for a instance resource. Format: sfc:instance: : : .
DeploymentSummary
object
2 properties 2 required
UnixEpoch
integer
Unix timestamp.
ForbiddenError
object
1 property 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

the-san-francisco-compute-company-instances-api-openapi.yml Raw ↑

Other APIs The San Francisco Compute Company publishes across the network.

The San Francisco Compute Company Account API
The San Francisco Compute Company Deployments API
The San Francisco Compute Company Feature Flags API
The San Francisco Compute Company Images API
The San Francisco Compute Company Instance SKU Catalog API
The San Francisco Compute Company Instance SKUs API
The San Francisco Compute Company Instance Templates API
The San Francisco Compute Company Orderbook API
The San Francisco Compute Company Orders API
The San Francisco Compute Company Pools API
The San Francisco Compute Company Procurements API
The San Francisco Compute Company Users API