Skip to content

Desktop endpoints

REST reference for the public /v1/desktops/* surface: read, lifecycle, control, and chat. Bearer auth on every call.

3 min read

All desktop routes live under /v1/desktops/* and require Authorization: Bearer sk_live_... on every request. Each route also requires a specific capability on the calling key. If the key is valid but missing the capability, the response is 403 Forbidden. See API capabilities for the full mapping and how to scope a key.

Read

RouteCapabilityPurpose
GET /v1/desktopsdesktop:readList desktops you own. Destroyed desktops are excluded.
GET /v1/desktops/:iddesktop:readFetch one desktop with status, tier, IP, agent readiness.

Lifecycle

RouteCapabilityPurpose
POST /v1/desktops/:id/startdesktop:lifecycleBoot a stopped desktop. Returns once the boot is queued; poll /v1/desktops/:id for status and agentReady to know when it is callable.
POST /v1/desktops/:id/stopdesktop:lifecycleShut the desktop down.
POST /v1/desktops/:id/restartdesktop:lifecycleStop then start.

Control

These routes drive the desktop directly. They require the desktop to be running with agentReady: true; otherwise the response is 503.

RouteCapabilityPurpose
POST /v1/desktops/:id/clickdesktop:controlMouse click at given coordinates.
POST /v1/desktops/:id/dragdesktop:controlMouse drag from a start to an end point.
POST /v1/desktops/:id/scrolldesktop:controlScroll the desktop viewport.
POST /v1/desktops/:id/typedesktop:controlType a string of text.
POST /v1/desktops/:id/keydesktop:controlSend a single key or key combination.
POST /v1/desktops/:id/bashdesktop:controlRun a multi-line bash script.
POST /v1/desktops/:id/execdesktop:controlRun a single shell command. Response includes stdout, stderr, exitCode.
GET /v1/desktops/:id/screenshotdesktop:controlReturn a PNG of the current display.

Chat

RouteCapabilityPurpose
POST /v1/desktops/:id/chatdesktop:chatSend a message to the on-desktop AI agent and wait for the full response.

Example

curl https://lebureau.talentai.fr/v1/desktops \
  -H "Authorization: Bearer sk_live_..."

A request with no Authorization header returns 401. A request with a key missing the route's capability returns 403 with required and held in the body.

What is not exposed yet

The public API in this release does not cover desktop creation or deletion, file management, resource metrics, or real-time streams (status, activity, chat token streaming). Manage these from the dashboard for now. A larger public surface is planned but is not yet committed to a date.