Skip to main content
The Infinite Compute API does what the console does, from your own scripts, CI pipelines and tools: launch, stop, park and delete GPU servers, manage volumes and SSH access, and read usage. The same rules apply as in the console, so a request the console would refuse is refused here too. There are three ways to use it:
The API, the command line and the Terraform provider are in beta, and the API is turned on per project. If you can’t use it in your project, contact support.

Address

All requests go to your console address followed by /api/public/v1:
Your console address is in your welcome email.

Authentication

Every request carries an API key in the Authorization header:
Create keys in the console: open the menu at the bottom of the sidebar and choose API keys. A key acts for the person who created it, in one project. See API keys. GET /me tells you which project, person and key a key belongs to. It’s the quickest way to check a key works.

Requests and responses

  • JSON in and out, field names in snake_case, times in RFC 3339 (UTC).
  • Unknown fields in a request body are refused, so a typo can’t be silently ignored.
  • Every response carries an X-Request-Id header. Quote it when you contact support. You can send your own X-Request-Id (8 to 128 letters, digits, ., _, : or -) to match our logs to yours.

Errors

Every error has the same shape:
Branch on code; message is for people and may change.

Long-running work

Creating, deleting and acting on a server (start, stop, reboot, park, resume) answer at once with 202 Accepted and the resource in its current state. Poll GET /servers/{id} until it reaches the state you want. A server’s status is one of: Volumes use creating, available, in_use, busy, deleting and error; backups use creating, available, restoring, busy, deleting and error. Treat any value you don’t recognise as “something else”, since new values may be added.

Safe retries

POST requests that create something (servers, volumes, backup restores) accept an Idempotency-Key header. Send a unique value, such as a UUID, with each new request, and the same value when you retry it:
  • A retry with the same key and the same request gets the first response back, with the header Idempotent-Replayed: true. Nothing is created twice.
  • The same key with a different request is refused with invalid_argument.
  • A retry while the first request is still running gets conflict; wait and retry.
  • Keys are kept for 24 hours.
The command line and the Terraform provider send one for you.

Pages of results

Lists answer {"data": [...], "next_cursor": "..."}. Ask for up to 200 items with ?limit= (default 50). When next_cursor isn’t null, pass it as ?cursor= to get the next page.

Limits

  • 10 requests a second per API key, with bursts of up to 30.
  • 5 server launches a minute per project.
Over a limit you get 429 rate_limited and a Retry-After header.

Sites

Each server type runs at one site, shown as site on the type. Volumes are created at a site and attach only to servers at the same site; a backup restores at its own site. GET /server-types lists the types, and so the sites, your project can use. The server types available to you depend on your agreement.

API keys

Create, scope and revoke keys.

Command line

The ic command for your terminal.

Terraform

Servers and volumes as code.

API reference

Every endpoint, request and response.