Overview
Official SDKs wrap the OctaSpace API with typed models, typed errors, safe automatic retries and helpers for waiting on sessions.
Language | Package | Requirements | Source |
|---|---|---|---|
Go | github.com/octaspace/go-sdk | Go 1.20+, standard library only | GitHub, pkg.go.dev |
JavaScript / TypeScript | @octaspace/sdk | Node.js 22+, Deno, Bun or a browser; no dependencies | |
React with TanStack Query | @octaspace/sdk-query | TanStack Query v5 | npm |
React without TanStack Query | @octaspace/sdk-react | React 18+ | npm |
What every SDK does for you
- Authentication: pass the API key once when you create the client.
- Typed errors: one error type per status (validation, authentication, not found, conflict, rate limit, server, network), with the API message and the request ID.
- Safe retries: read requests are retried on network errors and temporary server errors with backoff, honouring Retry-After. Starts, restarts and price changes are never retried, so they cannot run twice.
- Session helpers: wait until a session is ready, with progress callbacks.
- Money helpers: format and convert micro-USD amounts.
- Several hosts: an ordered list of API hosts for failover when one cannot be reached.
Feature coverage
Feature | Go | JavaScript |
|---|---|---|
Balance | ✓ | ✓ |
Compute: list, start, batch start, restart | ✓ | ✓ |
Compute apps | | ✓ |
Render: list, start, batch start | ✓ | ✓ |
VPN: list, start | | ✓ |
Sessions: list, get, logs, stop, wait until ready | ✓ | ✓ |
Sessions: wait until stopped | | ✓ |
Hosting: list nodes, set prices | ✓ | ✓ |
Hosting: get one node | | ✓ |
Hosting: maintenance | ✓ | |
Network: now | ✓ | ✓ |
Network: history | | ✓ |
GPU statistics: current, history, locations | ✓ | ✓ |
Mining statistics | | ✓ |
Raw JSON responses | ✓ (...Raw methods) | Responses are plain objects with every field |
For anything not covered yet, call the endpoint directly; it is listed in the API reference.
Versioning
The SDKs follow Semantic Versioning. Until version 1.0, a minor release can contain breaking changes; each package's changelog marks them as Breaking. Pin a version in production and read the changelog before you upgrade.