Export Image
photopea_export_imageExport the active Photopea document as a flattened PNG, JPG, WebP, PSD, or SVG file to a local path. Create or open a document first, then save the final image.
Instructions
Export the active document to a file and save it to the local filesystem. The entire document is flattened and exported in the chosen format. Use create_document or open_file to set up the document before exporting.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"format": "<format>",
"outputPath": "<outputPath>"
},
"name": "photopea_export_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | Output format: 'png' for lossless, 'jpg' for compressed photos, 'webp' for web, 'psd' for Photoshop, 'svg' for vector | |
| quality | No | Compression quality for JPG and WebP (1 = smallest file, 100 = best quality). Ignored for other formats. | |
| outputPath | Yes | Absolute local file path where the exported file will be saved (e.g. /Users/me/output.png) |