export_photo
Write the finished photo: every live filter is baked in and ALL metadata (EXIF, XMP, IPTC, GPS, thumbnail) is stripped. jpg, png, webp and tiff are flattened. psd keeps the layers (masks, opacity, blend modes, groups) for finishing in Photoshop or another editor: text becomes pixels, a group carrying its own filter is merged into one layer, and the result lists layers that may blend slightly differently in Photoshop. A PSD is large (about 50 MB per full-size layer on a 24 MP photo), and a download here is capped at 100 MiB. It is for finishing elsewhere: open_photo does not take a PSD. Returns a download_url (valid 24 hours) plus a preview of what was exported. The link is for the user, and also downloads with a plain GET (e.g. curl -sS -o <dest> <download_url>). Transparency is flattened onto white unless keep_alpha is true (png or webp only), which keeps it, e.g. for a cut-out. The color profile is not metadata and is kept: a wide-gamut photo (a phone's Display P3) is written in its own color space with the profile embedded, so it keeps its full color. color_profile srgb converts to sRGB instead, the safest choice for a viewer that ignores profiles; adobe-rgb converts to Adobe RGB (color photos only). The resultreports the space written (color_profile).
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": {
"image": "<image>"
},
"name": "export_photo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Image id, as returned by open_photo. | |
| format | No | Output format. | jpg |
| quality | No | JPEG/WebP quality, 1-100 (higher = better/larger). Ignored for png/tiff. WebP itself accepts 0 too, but JPEG's own bound is 1-100, so this schema uses the tighter bound. | |
| filename | No | Optional name for the downloaded file, e.g. "harbour-warm". The extension is added for you; anything but letters, digits, dot, dash and underscore is replaced. | |
| lossless | No | WebP only: lossless encoding. Ignored for other formats. | |
| bit_depth | No | PNG/TIFF/PSD only: output bit depth. JPEG/WebP are always 8-bit. | |
| keep_alpha | No | PNG/WebP only: keep transparency. The visible layers are merged onto a transparent canvas, so areas no layer covers (a cut-out, say) stay transparent. Default false flattens onto white. Refused for JPEG and TIFF. | |
| color_profile | No | 'keep' writes the image in its own color space with that profile embedded, so a phone's Display P3 photo keeps its full color. 'srgb' converts to sRGB first, the safest choice for viewers that ignore profiles; 'adobe-rgb' converts to Adobe RGB (RGB images only). Plain sRGB is written with no profile, which viewers assume. | keep |
| png_compression | No | PNG only: compression level, 0 (fastest, largest) to 9 (slowest, smallest). The default is lower than the maximum because level 9 is far slower for negligible size gain on a typical photo. Ignored for other formats. | |
| tiff_compression | No | TIFF only: compression scheme (lzw and adobe_deflate are lossless; jpeg is lossy). Ignored for other formats. | none |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | No | ||
| width | No | ||
| format | No | ||
| height | No | ||
| layers | No | psd only: layers in the file, groups included. | |
| filename | No | ||
| expires_at | No | ||
| download_url | No | ||
| color_profile | No | The image's color space: space is srgb, display-p3, dci-p3, adobe-rgb, prophoto-rgb, rec2020, gray or other; name is the profile's own name (null for plain sRGB); wide_gamut is true when the space holds colors sRGB cannot show. | |
| merged_groups | No | psd only: groups merged into one layer to keep their filter. | |
| mindset_notes | No | ||
| rasterized_text | No | psd only: text layers written as pixels. | |
| may_blend_differently | No | psd only: visible layers below 100% opacity or with a blend mode, which Photoshop may render slightly differently. |