---
title: "Take screenshot"
method: POST
path: "/boxes/{boxId}/actions/screenshot"
tags: ["UI Action"]
---

# Take screenshot

`POST /boxes/{boxId}/actions/screenshot`

Captures a screenshot of the current box screen

## Path parameters

- `boxId` string, required

## Request body

- Screenshot — Screenshot capture action configuration
  - `outputFormat` 'base64' | 'storageKey' — Type of the URI. default is base64.
  - `presignedExpiresIn` string — Presigned url expires in. Only takes effect when outputFormat is storageKey. Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: "500ms", "30s", "5m", "1h" Default: 30m
  - `saveToAlbum` boolean — Whether to save the screenshot to the device screenshot album
  - `scrollCapture` ScreenshotScrollCapture — Scroll capture parameters
    - `maxHeight` number — Maximum height of the screenshot in pixels. Limits the maximum height of the automatically scrolled content. Useful for managing memory usage when capturing tall content like long web pages. Default: 4000px
    - `scrollBack` boolean — Whether to scroll back to the original position after capturing the screenshot
  - `clip` ScreenshotClip — Clipping region for screenshot capture
    - `x` number, required — X coordinate of the clip
    - `y` number, required — Y coordinate of the clip
    - `width` number, required — Width of the clip
    - `height` number, required — Height of the clip

## Response `200`

- ScreenshotResult — Result of screenshot capture action
  - `uri` string, required — URL of the screenshot
  - `presignedUrl` string — Presigned url of the screenshot

## Changes

- **2025-09-10** `52205909bf89` — 4 info
  - the request property `scrollCapture/allOf[subschema #1: Screenshot Scroll Capture]/maxHeight` became optional
  - the request property `scrollCapture/allOf[subschema #1: Screenshot Scroll Capture]/scrollBack` became optional
  - the `maxHeight` request property default value `4000` was added
  - the `scrollBack` request property default value `false` was added

[Change history](https://skmtc.dev/babelcloud/apis/gbox-open-api/changes/boxes/:boxId/actions/screenshot/post.md)

---

[API](https://skmtc.dev/babelcloud/apis/gbox-open-api.md) · [All operations](https://skmtc.dev/babelcloud/apis/gbox-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/babelcloud/gbox-open-api/revisions/d655577fa915/schema)
