Capture a screenshot of a remote desktop machine

Returns the machine's PRIMARY display as an image (macOS/Windows desktop app only). code may be an AIC- session code OR (with an API key) a saved alias/hostname like 'wearfits-m3'. Selecting a different monitor, and the capture metadata naming which display you got, exist on the MCP tool only — a raw image response has nowhere to put a caption — so this endpoint always returns the primary screen on a multi-monitor machine.

TWO THINGS MUST BOTH BE TRUE, and on macOS they are separate. (1) Screen sharing is OFF by default and must be enabled by the owner in the AI Commander tray ('Share Screen'); the grant lasts 24 hours then auto-disables. (2) On macOS the operating system's own Screen Recording permission must also be granted to AI Commander in System Settings ▸ Privacy & Security ▸ Screen Recording. The tray toggle does NOT grant it: macOS asks in a dialog on that machine, so on an unattended machine nobody is there to click Allow and every capture fails or comes back blank. GET /api/v1/status/{code} reports both — check it first. When either is missing, the machine is a headless Linux server, or the agent is offline, this returns a JSON error (403/503) rather than an image. Images are capped at 10 MB.

get/api/v1/screenshot/{code}

Request

  • Base URL: https://aicommander.dev
  • URL: https://aicommander.dev/api/v1/screenshot/{code}
  • Auth: one of:
    • none
    • HTTP bearer

Path parameters

codestring required
Example:AIC-7K3P-WX9M-RTBN

How the user named the machine, passed exactly as given: an AI Commander session code (AIC-…), or — with an API key — a saved machine alias/hostname the user calls it by (e.g. 'wearfits-m3', 'aic-wearfits', 'my-laptop'). A name is treated as an alias when it isn't an AIC- code.

Response

The screenshot image bytes.

Changes

No recorded changes to this operation across all 1 revision of this API.