Apply XMP inline
Apply Lightroom presets inline using XMP.
The Apply XMP endpoint allows you to apply Lightroom adjustments by passing the XMP preset contents directly in your API request, rather than referencing a stored preset file. This is useful when you want to:
- Apply adjustments without storing preset files in cloud storage
- Dynamically generate preset values on the fly
- Integrate preset generation into your application workflow
How it differs from applying presets
While the Apply Presets process requires you to store XMP files in cloud storage and reference them by URL, Apply XMP allows you to pass the XMP content directly inline in your API request.
Apply Presets: Reference a stored .xmp file
Copied to your clipboard{"preset": "https://example.com/path/to/preset.xmp"}
Apply XMP: Pass XMP content inline
Copied to your clipboard{"xmp": "<xmp_content>"}
Code implementation
Here is a detailed implementation example.
Copied to your clipboardcurl -X POST \https://image.adobe.io/lrService/xmp \-H "Authorization: Bearer ${TOKEN}" \-H "x-api-key: ${API_KEY}" \-H "Content-Type: application/json" \-d '{"inputs": {"source": {"href": "<SIGNED_GET_URL>","storage": "<STORAGE_LOCATION>"}},"options": {"xmp": "<XMP_CONTENT>","orientation": "<ORIENTATION>"},"outputs": [{"href": "<SIGNED_POST_URL>","storage": "<STORAGE_LOCATION>","type": "<TYPE>"}]}'
Copied to your clipboard{"_links": {"self": {"href": "https://image.adobe.io/lrService/status/<JOB_ID>"}}}


