boxd.sh:9443. If your language doesnβt have a boxd SDK yet, generate one from the proto file and talk to it directly.
Endpoint
- Transport: HTTP/2 cleartext (h2c). No TLS on this port β auth is short-lived JWTs.
- Reflection: gRPC server reflection is enabled, so tools like
grpcurlwork without the proto file. - Service:
boxd.api.v1.BoxdApi
The proto
Copy the full service definition into a localapi.proto, then generate stubs with protoc, buf, grpc_tools, or @grpc/proto-loader. The proto is proto3 with no external imports β generation is one command.
You donβt strictly need the file: since server reflection is on, grpcurl and buf curl work directly against the endpoint, and grpcurl -plaintext boxd.sh:9443 describe boxd.api.v1.BoxdApi dumps the schema on demand.
Authentication
Two-step: long-lived API key β short-lived JWT β bearer token on every gRPC call.1. Create an API key
API keys are issued from the boxd console. Sign in at boxd.sh, open the API keys page, and create one. The raw key is shown once β copy it immediately. Format:bxd_ followed by ~40 base62 characters.
You can also create them via the CLI once youβre logged in:
2. Exchange for a JWT
Send the API key to the exchange endpoint over HTTPS:3. Send it on every gRPC call
Hello world
- grpcurl
- Go
- Node / TypeScript
- Python
Easiest way to verify auth and reachability β no proto file needed (server reflection is on).Install:
brew install grpcurl or github.com/fullstorydev/grpcurl.Errors
Standard gRPC status codes. The most common ones youβll hit:| Code | When |
|---|---|
UNAUTHENTICATED | Missing/malformed/expired JWT, or authorization metadata not set |
NOT_FOUND | VM, disk, template, or domain doesnβt exist |
RESOURCE_EXHAUSTED | Per-user VM quota reached |
INVALID_ARGUMENT | Bad request shape (e.g. invalid VM name, conflicting fields) |
INTERNAL | Server-side error |
Status.message() is human-readable and safe to surface to users.
Streaming RPCs
Two RPCs use streams:StreamLogsβ server-streaming, emitsLogChunkmessages as the VM produces output. Setfollow=trueto keep the stream open after current logs flush.Execβ bidirectional. First message must containvm_idandcommand; subsequent client messages withstdin=truepipe stdin, orwindow_change=truewithcols/rowsresize a PTY. Server messages carrydatawithis_stderrset totruefor stderr chunks andfalse(default) for stdout. PTY-mode execs merge stderr into stdout at the kernel, sois_stderris only set for non-PTY execs. Final server message hasexit_codeset. Clients close their send half of the bidi stream to signal stdin EOF to the subprocess (the proxy translates this toCHANNEL_EOFon the underlying SSH channel).
Whatβs next
CLI
Same API, no codegen β useful for shell scripting and one-offs.
Primitives: Machines
Concepts behind
CreateVm / ForkVm / SuspendVm.