Overview
Everything you can do in the control panel, you can do over HTTP. The API is how you script server creation, wire GalaxyGate into your own tools, and manage fleets of instances. This section walks the core loop most people need: create a server, control its power, and run code on it at boot.
Base URL
https://api.galaxygate.net/v1Every endpoint on this site is relative to that base. Requests and responses are JSON.
Authentication
Every call carries a bearer token in the Authorization header:
Authorization: Bearer <your-token>There are no exceptions. A request without a valid token is rejected. You get a token by logging in (a short-lived session token) or by creating a long-lived API token for scripts. See Authentication and tokens to mint one.
Workspaces
Most resources belong to a workspace. Your instances, SSH keys, and tokens all live inside one. Workspace-scoped endpoints include the workspace ID in the path as {wid}, for example:
POST /v1/workspaces/{wid}/instancesYou can find your workspace ID in the panel, or by listing your workspaces through the API. Endpoints that act on a single instance are addressed by instance ID instead, for example GET /v1/instances/{id}.
Asynchronous operations
Creating, deleting, and power-cycling an instance do not finish instantly. These endpoints return a workflow object right away and continue the work in the background. The response tells you a workflow has started. To watch the result, poll the resource itself, for example GET /v1/instances/{id}, until its state settles. Wherever a call behaves this way, the page for it says so.
Rate limiting
The API is rate limited per client. If you are bulk-creating or polling in a tight loop and start getting 429 Too Many Requests, back off and retry after a delay rather than hammering the endpoint. A short exponential backoff is the simplest approach that works.
What is in this section
- Authentication and tokens: log in for a session token, or mint a scoped API token for scripts.
- Create a server: provision an instance with
POST /v1/workspaces/{wid}/instances. - Power controls: power a server on or off, and act on many at once.
- Run code with cloud-init: install packages and run commands on first boot.
A larger surface exists
This section covers the operations most people use day to day. The panel is backed by a much larger REST surface: disks, snapshots, backups, IPs, firewall rules, and more. The patterns here (bearer auth, workspace scoping, workflow responses, and backing off on 429) apply across all of it.