Skip to content

Two hosts serve the API. The control API at https://api.slashinfra.com creates, lists and deletes VMs and API keys. Each VM has its own API at https://<id>.slashinfra.dev, which runs programs and reads and writes files. A preview of a port uses https://<port>-<id>.slashinfra.dev.

Send your key with every request:

Authorization: Bearer si_...

On a preview host, send the key in X-Si-Authorization, because the app keeps Authorization for itself. A key starts with si_. si login saves a device key for the CLI. The dashboard creates an organization key and shows its secret once. DELETE /keys/current or si auth logout revokes a device key. Delete an organization key on the API keys page. A revoked key stops working within 30 seconds.

GET, PUT and DELETE are idempotent. POST runs the program again, so retry a POST only when a second run is safe.

Control API errors are JSON with error and code. The VM API answers text unless you send Accept: application/json. Branch on the code. See Errors.

List endpoints return one page at a time. Pass limit, then send the next_cursor of the previous reply as cursor. GET /svms takes limit from 1 to 200, 100 by default. The last page returns next_cursor as null. GET /audit also takes limit and cursor, with 50 by default.

Endpoint reference: