---
title: "Capture a screenshot of the machine"
method: GET
path: "/v1/machines/{machine_id}/screenshot"
tags: ["machines"]
---

# Capture a screenshot of the machine

`GET /v1/machines/{machine_id}/screenshot`

Returns raw base64 pixels and decoded dimensions. External-machine responses also return a canonical frame_id; pass that value as the next mutation's precondition_frame_id so changed screens fail closed. A fresh screenshot is a read-only resynchronization operation and advances the external observation frame.

## Response `200`

Screenshot.

- ScreenshotResponse
  - `machine_id` string, required
  - `image_b64` string, required — Base64-encoded screenshot (no data: prefix).
  - `mime_type` string, required
  - `width` integer, required
  - `height` integer, required
  - `captured_at` string, date-time, required
  - `frame_id` string, uuid, nullable — Opaque external-machine observation identity. Bind the next external action to this value with precondition_frame_id; null for managed machines.
  - `request_id` string, required

## Other responses

- `400` — Invalid request body or parameters.
- `401` — Missing, invalid, or revoked API key. Pass `X-API-Key: sk-coasty-live-...` (or test).
- `403` — API key lacks the required scope or tier-feature is unavailable on the caller's plan.
- `404` — Resource not found in this key's namespace.
- `409` — The resource state conflicts with this operation.
- `413` — The request body exceeds the endpoint limit.
- `422` — The JSON shape is valid but one or more values violate the endpoint contract.
- `429` — Rate or concurrency limit exceeded.
- `500` — Unexpected server error. Retry with exponential backoff.
- `502` — An upstream dependency returned an invalid response.
- `503` — A required service is temporarily unavailable.
- `504` — An upstream dependency timed out.

---

[API](https://skmtc.net/coasty/apis/coasty-public-api.md) · [All operations](https://skmtc.net/coasty/apis/coasty-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coasty/coasty-public-api/revisions/f50d93b0d8a1/schema)
