DigiCompute

Quickstart

Make a key in the console, start an instance, run a command, stop it. Every call takes Authorization: Bearer dc_…. Base address https://compute.digibuffer.com.

1. Start an instance

curl -X POST https://compute.digibuffer.com/v1/instances \
  -H "Authorization: Bearer $DC_KEY" -H "Content-Type: application/json" \
  -d '{"size":"small","timeoutSec":600,"network":"none","env":{"MODE":"test"},"metadata":{"run":"4821"}}'

201 {"id":"inst_8f2k1q9vx3","status":"running","size":"small",
     "limits":{"cpus":1,"memoryMb":1024,"diskGb":5},"network":"none",
     "expiresAt":"…","envNames":["MODE"]}

2. Run a command, move files

POST /v1/instances/:id/exec   {"command":"python3 app.py","env":{"DEBUG":"1"},"timeoutSec":60}
PUT  /v1/instances/:id/files?path=/work/app.py   (the body is the file)
GET  /v1/instances/:id/files?path=/work/out.json
GET  /v1/instances/:id/list?path=/work

3. Extend or stop

POST   /v1/instances/:id/extend   {"seconds":1800}
DELETE /v1/instances/:id

Sizes

SizevCPUMemoryDiskCompute hours per hour
small11 GB5 GB1
medium24 GB10 GB2
large48 GB20 GB4

network: none (no network), limited (allowed hosts only) or open, when your plan includes the internet.

Every endpoint

POST/v1/instancessize, network, timeoutSec, env, metadata; waitSec to wait for room instead of a 503
GET/v1/instancesyours that run; ?all=1 for stopped ones too
GET/v1/instances/:id
POST/v1/instances/:id/extendseconds
DELETE/v1/instances/:id
POST/v1/instances/:id/execcommand, cwd, env, timeoutSec
PUT · GET/v1/instances/:id/files?path=
GET/v1/instances/:id/list?path=
GET/v1/usagethis month: instances, running time, compute hours, your limits

Errors

CodeWhen
400Something sent is wrong; the message says what
401No key, or a wrong or revoked one
402This month's compute hours are used up (plan and hour packs)
403Not in your plan or key: a bigger size, the internet, a longer life
404No such instance for this key
409The instance has stopped
429Too many instances at once for this key or plan
503No server has room for that size right now: try again shortly