export
DocumentsFull
Write an item to a file the way its editor's Export… does. An image: its edited picture (annotations, crop, background and frame, the free tier's mark when the user edited it) as png, jpeg or webp, sized, padded and watermarked, or every page as a pdf, or a SuperCapture archive (scap). An image file in SuperCapture's temp folder (path) is written as the file is, beside itself unless output_path says. A video's edited project (cuts, speeds, crops, annotations, zooms, camera, stage, captions, the audio mix) encoded as a video (on the free tier an mp4 or mov ends with a ~2 s SuperCapture card, counted in duration_ms), an animated picture, its audio alone (m4a), a SuperCapture archive (scap), or one frame as a png at at_ms; an audio recording's edited track as m4a, mp3, wav or scap; a scancode as png, svg, pdf, jpeg, webp or eps; a font as its own file (font). Those three take format and output_path only. An animated picture plays as many times as the video's loop says (doc_edit set document loop). bookmarks, with no item, writes every bookmark and browser capture's address as a browser-importable bookmarks file. clipboard puts an item's edited render on the clipboard (a picture as a picture, anything else as its file); print shows the system print panel for an image, PDF or bookmark, where the user prints or cancels. Both take the item only. Into output_path, which must be in a folder the user approved (made if missing) and is required for an item; bookmarks without one refreshes the library's bookmarks.html. Reports progress; a long video takes minutes. The result names the file (output_path).
Needs the Full level, which is the default for any client holding the bearer token.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | no | The item's id. |
path | string | no | Or its path or name; or an image file in the temp folder. |
format | string one of "mp4", "mov", "gif", "webp", "apng", "m4a", "mp3", "wav", "scap", "png", "svg", "pdf", "jpeg", "eps", "font", "bookmarks", "clipboard", "print" | yes | What to write. |
codec | string one of "h264", "hevc", "prores_422", "prores_4444" | no | mp4: h264 (default) or hevc (smaller). mov: h264 (default), prores_422 or prores_4444 (macOS). |
quality | integer | no | Percent (default 80 for a video, the user's export quality for an image). Not for ProRes, m4a, scap, pdf or png. |
fps | integer | no | Frames per second: 30, 24, 15 or 10, or 0 for the recording's own (default: 0 for mp4 and mov, 15 for gif, webp and apng). |
include_audio | boolean | no | mp4 and mov: the sound (default true). |
long_edge | integer | no | The output's long side in pixels, its shape kept (default: full size). A video is never made larger; an image may be. |
width | integer | no | An image: the width of the box it is fitted into, its shape kept (alone: scaled to this width). |
height | integer | no | An image: the box's height (alone: scaled to this height). |
pad | boolean | no | An image: fill out the width × height box, the picture centred (default false: the file is the fitted picture). |
pad_color | string | no | pad: the padding's colour, #RRGGBB, #AARRGGBB or a CSS name (default transparent; a jpeg has no transparency, so it shows black). |
frame | boolean | no | An image: include its frame and background (default: as the image shows it). |
watermark | string | no | An image: a line of text stamped on the picture. |
watermark_at | string one of "top_left", "top_right", "bottom_left", "bottom_right", "center" | no | watermark: where (default bottom_right). |
watermark_opacity | number | no | watermark: 0 to 1 (default 0.6). |
watermark_color | string | no | watermark: #RRGGBB, #AARRGGBB or a CSS name (default white). |
watermark_size | number | no | watermark: the text's size in pixels (default about 4% of the picture's short side). |
watermark_margin | integer | no | watermark: pixels from the picture's edge (default 16). |
page | integer | no | A multi-page image as png, jpeg or webp: which page, 1 for the first (default 1). |
at_ms | integer | no | A video as png: the moment, in ms of the edited video (default 0). |
output_path | string | no | The file to write, in an approved folder. |
Example
A JSON-RPC call to POST http://localhost:21516/mcp with the bearer token, filling in the required parameters:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "export", "arguments": { "format": "mp4" } }}See the MCP server overview for how to connect a client and where the token lives.