Document Creation Migration

This guide helps you migrate from the v1 /pie/psdService/documentCreate endpoint to the v2 /create-composite endpoint for creating new blank documents from parameters.

Overview

In v1, the /documentCreate endpoint was used to create new blank Photoshop documents with specified dimensions, resolution, color mode, and other properties.

V1 Endpoint:

POST /pie/psdService/documentCreate

V2 Endpoint:

POST /v2/create-composite
data-variant=info
data-slots=header,text
Note:
For artboard-based documents, use the separate /v2/create-artboard endpoint. See the Artboard Migration guide.

Key differences

When to use document creation

Use Document Creation when:

Use Format Conversion when:

Use Document Operations when:

Use Composite Operations when:

Creating a basic blank document

Key points:

V2 Approach:

curl -X POST \
  https://photoshop-api.adobe.io/v2/create-composite \
  -H "Authorization: Bearer $token" \
  -H "x-api-key: $apiKey" \
  -H "Content-Type: application/json" \
  -d '{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "transparent",
    "mode": "rgb",
    "depth": 8
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}'

Document parameters

Required parameters

width

height

resolution

Optional parameters

fill

data-variant=warning
data-slots=header,text
The fill field changed between V1 and V2
Two breaking differences: (1) "backgroundColor" was renamed to "background_color" — the V1 string enum "backgroundColor" is invalid in V2. Use "background_color" (with underscore). (2) Custom solid colors require the object form in V2 — V1 only supported the three string shortcuts, V2 adds {"solidColor": {"rgb": {"red": R, "green": G, "blue": B}}} for arbitrary custom colors.

mode

depth

mode
Supported depths
bitmap
1
grayscale
8, 16, 32
rgb
8, 16, 32
hsb
8, 16, 32
cmyk
8, 16
lab
8, 16
multichannel
8, 16
indexed
8 only
duotone
8 only

pixelScaleFactor

iccProfile

name

Examples by use case

Web graphics document

Create a document optimized for web graphics:

{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "transparent",
    "mode": "rgb",
    "depth": 8
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}

Create a high-resolution document for print:

{
  "image": {
    "width": 2550,
    "height": 3300,
    "resolution": {"unit": "density_unit", "value": 300},
    "fill": "white",
    "mode": "cmyk",
    "depth": 8
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}

Social media template

Create a square canvas for social media:

{
  "image": {
    "width": 1080,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "white",
    "mode": "rgb",
    "depth": 8
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}

Create a wide banner document:

{
  "image": {
    "width": 3000,
    "height": 600,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "transparent",
    "mode": "rgb",
    "depth": 8
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}

Document with custom ICC profile

Create a document with a custom .icc profile for specialized color workflows:

{
  "image": {
    "width": 2550,
    "height": 3300,
    "resolution": {"unit": "density_unit", "value": 300},
    "fill": "white",
    "mode": "rgb",
    "depth": 8,
    "iccProfile": {
      "type": "custom",
      "name": "DCI P3 D65",
      "source": {
        "url": "<PRESIGNED_URL_TO_ICC_FILE>"
      },
      "imageMode": "rgb"
    }
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}

Creating with initial layers

You can create a document and add initial content layers in the same request:

curl -X POST \
  https://photoshop-api.adobe.io/v2/create-composite \
  -H "Authorization: Bearer $token" \
  -H "x-api-key: $apiKey" \
  -H "Content-Type: application/json" \
  -d '{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "white",
    "mode": "rgb",
    "depth": 8
  },
  "edits": {
    "layers": [
      {
        "type": "layer",
        "name": "Background Image",
        "image": {
          "source": {
            "url": "<IMAGE_URL>"
          }
        },
        "operation": {
          "type": "add",
          "placement": {
            "type": "bottom"
          }
        }
      },
      {
        "type": "text_layer",
        "name": "Title",
        "text": {
          "content": "Hello World",
          "characterStyles": [
            {
              "characterStyle": {
                "fontSize": 72,
                "fontColor": {
                  "type": "rgb",
                  "red": 0,
                  "green": 0,
                  "blue": 0
                }
              }
            }
          ]
        },
        "operation": {
          "type": "add"
        }
      }
    ]
  },
  "outputs": [
    {
      "destination": {
        "url": "<SIGNED_POST_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    }
  ]
}'

Background fill options

White background

{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "white"
  }
}

Transparent background

{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "transparent"
  }
}

Custom background color

{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "background_color"
  }
}
data-variant=info
data-slots=text
When using "background_color", the default Photoshop background color will be used. To use a specific color, add a solid color layer during document creation.

Color modes explained

RGB (Red, Green, Blue)

{
  "mode": "rgb"
}

CMYK (Cyan, Magenta, Yellow, Black)

{
  "mode": "cmyk"
}

Grayscale

{
  "mode": "grayscale"
}

Lab color

{
  "mode": "lab"
}

Bit depth explained

depth is an integer. Valid values depend on mode (see the mode/depth table above).

1-bit

{
  "mode": "bitmap",
  "depth": 1
}

8-bit

{
  "depth": 8
}

16-bit

{
  "depth": 16
}

32-bit

{
  "depth": 32
}

Multiple outputs

Create a document and immediately export it in multiple formats:

curl -X POST \
  https://photoshop-api.adobe.io/v2/create-composite \
  -H "Authorization: Bearer $token" \
  -H "x-api-key: $apiKey" \
  -H "Content-Type: application/json" \
  -d '{
  "image": {
    "width": 1920,
    "height": 1080,
    "resolution": {"unit": "density_unit", "value": 72},
    "fill": "white",
    "mode": "rgb",
    "depth": 8
  },
  "outputs": [
    {
      "destination": {
        "url": "<PSD_URL>"
      },
      "mediaType": "image/vnd.adobe.photoshop"
    },
    {
      "destination": {
        "url": "<JPEG_URL>"
      },
      "mediaType": "image/jpeg",
      "quality": "high"
    }
  ]
}'

Common dimension templates

Social media sizes

Instagram Post (Square)

{ "width": 1080, "height": 1080 }

Instagram Story

{ "width": 1080, "height": 1920 }

Facebook Cover

{ "width": 820, "height": 312 }

Twitter Header

{ "width": 1500, "height": 500 }

LinkedIn Banner

{ "width": 1584, "height": 396 }

Standard print sizes (at 300 DPI)

4x6 inches

{ "width": 1200, "height": 1800, "resolution": {"unit": "density_unit", "value": 300} }

5x7 inches

{ "width": 1500, "height": 2100, "resolution": {"unit": "density_unit", "value": 300} }

8x10 inches

{ "width": 2400, "height": 3000, "resolution": {"unit": "density_unit", "value": 300} }

8.5x11 inches (Letter)

{ "width": 2550, "height": 3300, "resolution": {"unit": "density_unit", "value": 300} }

Web sizes

Full HD

{ "width": 1920, "height": 1080, "resolution": {"unit": "density_unit", "value": 72} }

4K/UHD

{ "width": 3840, "height": 2160, "resolution": {"unit": "density_unit", "value": 72} }

Desktop Wallpaper (Wide)

{ "width": 2560, "height": 1440, "resolution": {"unit": "density_unit", "value": 72} }

Common migration issues

Resolution format

Problem: Using plain integer for resolution (invalid format in V2).

{
  "resolution": 72
}

Solution: Use object format with unit and value.

{
  "resolution": {"unit": "density_unit", "value": 72}
}

Resolution value too low

Problem: Using resolution value less than 1.

{
  "resolution": {"unit": "density_unit", "value": 0}
}

Solution: Use value >= 1.

{
  "resolution": {"unit": "density_unit", "value": 1}
}

Invalid pixelScaleFactor

Problem: Using zero or negative pixelScaleFactor.

{
  "pixelScaleFactor": 0
}

Solution: Use positive value, minimum 0.1.

{
  "pixelScaleFactor": 1.0
}

Invalid color mode (gray vs grayscale)

Problem: Using deprecated or invalid mode value.

{
  "mode": "gray"
}

Solution: Use "grayscale" (not "gray"). Supported values: rgb, bitmap, grayscale, indexed, hsb, cmyk, lab, duotone, multichannel.

{
  "mode": "grayscale"
}

Invalid depth for color mode

Problem: Depth not supported for the selected mode (e.g., 32-bit for CMYK).

{
  "mode": "cmyk",
  "depth": 32
}

Solution: Use a valid depth for the mode. For bitmap, use 1. For cmyk/lab use 8 or 16. For indexed/duotone use 8 only. For rgb/grayscale/hsb use 8, 16, or 32.

{
  "mode": "cmyk",
  "depth": 16
}

Invalid fill option

Problem: Using invalid fill value.

{
  "fill": "black"
}

Solution: Use valid fill options: "white", "transparent", "background_color", or the object form {"solidColor": {"rgb": {"red": R, "green": G, "blue": B}}}.

{
  "fill": "white"
}

Dimensions too large

Problem: Dimensions exceed the maximum.

{
  "width": 35000,
  "height": 35000
}

Solution: Stay within 1-32000 pixel range.

{
  "width": 32000,
  "height": 32000
}

Next steps