Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Apply rectangular edge-percentage crop to an image.- Operation ID:
images.crop - API member path:
editor.doc.images.crop(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns an ImagesMutationResult; reports NO_OP if unchanged.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
crop | object | yes | |
crop.bottom | number | no | |
crop.left | number | no | |
crop.right | number | no | |
crop.top | number | no | |
imageId | string | yes |
Example request
Output fields
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | no | |
image | object | no | |
success | boolean | no |
Example response
Pre-apply throws
TARGET_NOT_FOUNDAMBIGUOUS_TARGETINVALID_TARGETCAPABILITY_UNAVAILABLEINVALID_INPUT
Non-applied failure codes
NO_OP
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

