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:

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

{
  "preset": "https://example.com/path/to/preset.xmp"
}

Apply XMP: Pass XMP content inline

{
  "xmp": "<xmp_content>"
}

Code implementation

Here is a detailed implementation example.

data-slots=heading, code

Request example

curl -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>"
        }
    ]
}'
data-slots=heading, code

Response example

{
    "_links": {
        "self": {
            "href": "https://image.adobe.io/lrService/status/<JOB_ID>"
        }
    }
}