Computer API
Persistent personal computers for agents. A machine is the core resource: a durable computer that can be stopped and started without losing its files.
Authentication. Every request carries either an organization API key as Authorization: Bearer sk_..., or the first-party computer_session cookie a browser gets from POST /v1/auth/login. There is no third way in.
Errors. Every non-2xx response is the same envelope: { error: { code, message, request_id, details?, quota? } }. Switch on code, which is a closed set; message is written for a person and may be reworded.
Repeating a request. Any unsafe request accepts an Idempotency-Key header, and that is what makes retrying one safe: a repeat replays the first response instead of creating a second machine. Reusing a key with a different body is a conflict.
Lists. Every list is cursor-paginated and answers { data, next_cursor, has_more }. A cursor is opaque; pass back what the last page returned and never construct one.
https://api.raster.sh/v1auth
Signup, login, logout and browser sessions. First-party: there is no hosted auth provider anywhere in this product.
- POSTcreate a user and their personal organization
/v1/auth/signup - POSTstart a browser session
/v1/auth/login - POSTrevoke the current browser session
/v1/auth/logout - GETthe authenticated principal and its active organization
/v1/auth/me - GETlist browser sessions
/v1/auth/sessions - DELETErevoke a browser session
/v1/auth/sessions/{auth_session_id} - POSTchange the active organization
/v1/auth/switch-organization
organizations
The unit every machine, key and bill belongs to. A user gets a personal one at signup and may belong to more.
- GETorganizations the user belongs to
/v1/organizations - POSTcreate an organization
/v1/organizations - GETget an organization
/v1/organizations/{organization_id}
members
Membership, roles and invitations within the active organization.
- GETlist members of the active organization
/v1/members - DELETEremove a member
/v1/members/{membership_id} - PATCHchange a member's role
/v1/members/{membership_id} - GETlist pending invitations
/v1/invitations - POSTinvite someone to the organization
/v1/invitations - DELETErevoke an invitation
/v1/invitations/{invitation_id} - POSTaccept an invitation
/v1/invitations/accept
api-keys
Organization API keys and their scopes. The secret is returned once, at creation, and never again.
- GETlist api keys
/v1/api-keys - POSTcreate an api key, returning the secret once
/v1/api-keys - DELETErevoke an api key
/v1/api-keys/{api_key_id}
machines
The core resource. Creating one boots a computer; stopping it keeps the disk and deleting it destroys it. Forking copies a disk into a second machine that owes the first nothing afterwards.
- GETlist machines
/v1/machines - POSTcreate a machine
/v1/machines - GETget a machine
/v1/machines/{machine_id} - DELETEdelete a machine
/v1/machines/{machine_id} - PATCHupdate a machine
/v1/machines/{machine_id} - POSTstart a stopped machine
/v1/machines/{machine_id}/start - POSTstop a machine, keeping its files
/v1/machines/{machine_id}/stop - POSTstop and start a machine
/v1/machines/{machine_id}/restart - POSTfork a running machine
/v1/machines/{machine_id}/fork - GETlist a machine's events
/v1/machines/{machine_id}/events
images
The server-owned catalog of base disk images a machine boots from. machines.create accepts any id listed here and uses the image marked default when a request names none. Deprecated images stay listed, with deprecated_at set, because existing machines still reference them.
computer
Driving a machine the way a person would: its screen, pointer, keyboard, clipboard, terminals, files and browser. Every coordinate is in the pixel space of the machine’s current display, and one outside it is rejected rather than clamped.
- GETcapture the machine's screen
/v1/machines/{machine_id}/screenshot - GETthe machine's current display geometry
/v1/machines/{machine_id}/display - POSTrun a command on the machine
/v1/machines/{machine_id}/exec - GETread the machine's clipboard
/v1/machines/{machine_id}/clipboard - PUTwrite the machine's clipboard
/v1/machines/{machine_id}/clipboard - POSTmint a short-lived ticket for a realtime connection
/v1/machines/{machine_id}/connect - POSTmove the pointer
/v1/machines/{machine_id}/mouse/move - POSTclick the pointer
/v1/machines/{machine_id}/mouse/click - POSTdrag the pointer
/v1/machines/{machine_id}/mouse/drag - POSTscroll the wheel
/v1/machines/{machine_id}/mouse/scroll - POSTtype text
/v1/machines/{machine_id}/keyboard/type - POSTpress one key
/v1/machines/{machine_id}/keyboard/key - POSTpress a key combination
/v1/machines/{machine_id}/keyboard/hotkey - POSTresize the machine's display
/v1/machines/{machine_id}/display/resize - GETlist the machine's terminals
/v1/machines/{machine_id}/terminals - POSTopen a terminal on the machine
/v1/machines/{machine_id}/terminals - DELETEclose a terminal
/v1/machines/{machine_id}/terminals/{terminal_id} - GETlist a directory on the machine
/v1/machines/{machine_id}/files - GETread a file from the machine
/v1/machines/{machine_id}/files/content - PUTwrite a file to the machine
/v1/machines/{machine_id}/files/content - POSTopen a url in the machine's browser
/v1/machines/{machine_id}/browser/open - GETlist the browser's open tabs
/v1/machines/{machine_id}/browser/tabs
sessions
A connection to a machine, and the single input lease that hangs off it. At most one session may send input at a time, which is what makes human takeover safe rather than interleaved.
- GETlist sessions
/v1/sessions - POSTopen a session on a machine
/v1/sessions - DELETEclose a session
/v1/sessions/{session_id} - GETread the current input lease
/v1/machines/{machine_id}/input-lease - POSTacquire or renew the input lease
/v1/machines/{machine_id}/input-lease - DELETErelease the input lease
/v1/machines/{machine_id}/input-lease
templates
Named starting states. A template is a snapshot with a name and an organization behind it, so a team can agree on what its standard box is.
- GETlist templates
/v1/templates - POSTcreate a template
/v1/templates - GETget a template
/v1/templates/{template_id} - DELETEdelete a template
/v1/templates/{template_id}
snapshots
Captured disks. A capture holds files, installed software and browser profile data, and holds no RAM and no live process state. Captures of one machine form a chain and only the newest can be deleted.
- GETlist snapshots
/v1/snapshots - POSTcapture a machine's disk
/v1/snapshots - GETget a snapshot
/v1/snapshots/{snapshot_id} - DELETEdelete a snapshot
/v1/snapshots/{snapshot_id} - POSTrestore a machine from a snapshot
/v1/machines/{machine_id}/restore
ports
Publishing a guest port at its own https hostname. Private by default; the credential is in the response that creates it and nowhere else.
- GETlist a machine's published ports
/v1/machines/{machine_id}/ports - POSTpublish a port on the machine at its own https url
/v1/machines/{machine_id}/ports - GETget a published port
/v1/machines/{machine_id}/ports/{preview_id} - DELETEstop publishing a port
/v1/machines/{machine_id}/ports/{preview_id} - GETlist published ports
/v1/ports
secrets
Values delivered into tmpfs inside a machine. A stored value is never returned - there is no read route here and no field one could travel in - and a snapshot, fork or template does not carry it.
- GETlist a machine's secret names
/v1/machines/{machine_id}/secrets - PUTstore a secret for the machine
/v1/machines/{machine_id}/secrets - DELETErevoke a secret
/v1/machines/{machine_id}/secrets/{name} - GETlist secret names
/v1/secrets
usage
The metered record behind a bill: raw records for a period, and the same records bucketed for charting. This is the source of truth, not the provider’s copy.
plans
The server-owned catalog of plans, entitlements and rates. No price, allowance or weight is hardcoded in any client, so an older SDK can display a newer catalog.
billing
The organization’s account, checkout, customer portal and current-period summary.