Docs
API
Every endpoint. JSON in, JSON out, bearer key on every call.
Base URL https://boxport.dev. Send Authorization: Bearer bk_…. Errors are {"error": "…", "next": "…"}, where next says what to do about it.
| Method and path | Does |
|---|---|
PUT /v1/providers/:id/key | Store a vendor key, sealed. DELETE removes it. Keys are never returned. |
GET /v1/providers | Your providers with metering and live health. |
POST /v1/templates | Build a template on every provider. {"name","image"}; only "default" images for now. |
GET /v1/quote | Cost per session on each provider. Query: template, vcpu, mem, minutes, busy. |
POST /v1/place | Dry run of a create. |
POST /v1/sandboxes | Create. Body: template, size, shape, policy. Header Idempotency-Key makes retries safe. |
POST /v1/sandboxes/:id/exec | Run {"cmd"}; returns exit code, stdout, stderr. |
POST /v1/sandboxes/:id/files | Write {"path", "content"}: UTF-8, absolute path, 5 MiB at most (413 above). |
GET /v1/sandboxes/:id/files?path= | Read a file as UTF-8 text. |
POST /v1/sandboxes/:id/processes | Start {"cmd"} in the background; returns {"handle"}. |
GET /v1/sandboxes/:id/processes/:handle | Output so far (last 1 MiB), exited and exitCode. |
POST /v1/sandboxes/:id/ports | URL for {"port"}. 501 where the vendor can't (Modal, Vercel, Sprites other than 8080). |
DELETE /v1/sandboxes/:id | Kill. |
GET /v1/spend | Your estimated spend. Query days. |
PUT /v1/spend/caps | Set {"daily","perSandbox"} in dollars; null clears. |
PUT /v1/spend/credits | Vendor credit or prepaid commit you hold, e.g. {"daytona":{"amount":5000,"expires":"2027-06-30"}}. Replaces the list; 0 removes one. A session that fits in a vendor's remaining credit is placed as if it cost nothing, so credit is spent first while speed and health still count. Each closed sandbox's estimate is taken off the balance; caps still use list price. GET /v1/spend shows what is left. |
GET /v1/scoreboard | Public provider health and prices. No key. |
Defaults
size is {"vcpu":2,"memGiB":4} and shape is {"minutes":30,"busy":0.15} when left out.
Status codes
| Code | Means |
|---|---|
| 401 | Missing or wrong Boxport key. |
| 402 | A spend cap would be exceeded. |
| 404 | Unknown sandbox or route. |
| 503 | No provider could take it; attempts lists each try. |