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.
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"]}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=/workPOST /v1/instances/:id/extend {"seconds":1800}
DELETE /v1/instances/:id| Size | vCPU | Memory | Disk | Compute hours per hour |
|---|---|---|---|---|
| mini | 0.5 | 512 MB | 2 GB | 0.5 |
| small | 1 | 1 GB | 5 GB | 1 |
| medium | 2 | 4 GB | 10 GB | 2 |
| large | 4 | 8 GB | 20 GB | 4 |
network: none (no network), limited (allowed hosts only) or open, when your plan includes the internet.
| POST | /v1/instances | size, network, timeoutSec, env, metadata; waitSec to wait for room instead of a 503 |
| GET | /v1/instances | yours that run; ?all=1 for stopped ones too |
| GET | /v1/instances/:id | |
| POST | /v1/instances/:id/extend | seconds |
| DELETE | /v1/instances/:id | |
| POST | /v1/instances/:id/exec | command, cwd, env, timeoutSec |
| PUT · GET | /v1/instances/:id/files?path= | |
| GET | /v1/instances/:id/list?path= | |
| GET | /v1/usage | this month: instances, running time, compute hours, your limits |
| GET | /v1/templates | ready-made apps: what each asks for (no key needed); appsOpen: false while apps are closed (a new app is then refused with 403) |
| POST | /v1/instances | an app: persistent: true, network, app: { command, port } (or template, inputs); its address is app.url |
| GET | /v1/instances/:id/app/logs | the app's latest output |
| POST | /v1/instances/:id/app/restart | |
| PATCH | /v1/instances/:id | app: { command } starts it again with a new start command; env: { NAME: 'value', OLD: null } sets and removes its environment variables (apps only), then starts it again |
| Code | When |
|---|---|
| 400 | Something sent is wrong; the message says what |
| 401 | No key, or a wrong or revoked one |
| 402 | This month's compute hours are used up (plan and hour packs) |
| 403 | Not in your plan or key: a bigger size, the internet, a longer life |
| 404 | No such instance for this key |
| 409 | The instance has stopped |
| 429 | Too many instances at once for this key or plan |
| 503 | No server has room for that size right now: try again shortly |