Adobe Photoshop Background Removal API

Remove backgrounds from images and create masks using AI-powered subject detection.

OpenAPI Specification

adobe-photoshop-background-removal-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Adobe Photoshop Actions Background Removal API
  description: A cloud-based REST API that provides programmatic access to Photoshop's image editing capabilities without requiring a local installation. Part of Adobe Firefly Services, the API supports PSD document operations including layer editing, Smart Object replacement, text layer editing, rendition creation, and artboard management. It also provides AI-powered features such as background removal, mask creation, product crop, and depth blur. All operations are asynchronous, returning a polling URL to check job status.
  version: 2.0.0
  contact:
    name: Adobe Developer Support
    url: https://developer.adobe.com/
  license:
    name: Proprietary
    url: https://www.adobe.com/legal/terms.html
  x-logo:
    url: https://www.adobe.com/content/dam/cc/icons/photoshop-appicon-256.png
servers:
- url: https://image.adobe.io
  description: Adobe Photoshop API Production
security:
- BearerAuth: []
  ApiKeyAuth: []
tags:
- name: Background Removal
  description: Remove backgrounds from images and create masks using AI-powered subject detection.
paths:
  /v2/remove-background:
    post:
      operationId: removeBackgroundV2
      summary: Adobe Photoshop Remove Background from an Image
      description: Removes the background from an image using AI-powered subject detection. Supports cutout mode (transparent background) and mask mode (grayscale mask output). Can optionally apply a background color, trim whitespace, and perform color decontamination.
      tags:
      - Background Removal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveBackgroundRequest'
      responses:
        '202':
          $ref: '#/components/responses/AsyncJobAccepted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/QuotaExceeded'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    RemoveBackgroundRequest:
      type: object
      required:
      - image
      - output
      properties:
        image:
          type: object
          required:
          - source
          properties:
            source:
              type: object
              required:
              - url
              properties:
                url:
                  type: string
                  description: Pre-signed GET URL of the source image.
        mode:
          type: string
          enum:
          - cutout
          - mask
          default: cutout
          description: cutout removes the background, mask returns a grayscale mask.
          example: cutout
        output:
          type: object
          properties:
            mediaType:
              type: string
              enum:
              - image/jpeg
              - image/png
              description: Output format.
        trim:
          type: boolean
          default: false
          description: Whether to trim whitespace around the subject.
          example: true
        backgroundColor:
          type: object
          description: Optional replacement background color.
          properties:
            red:
              type: integer
              minimum: 0
              maximum: 255
            green:
              type: integer
              minimum: 0
              maximum: 255
            blue:
              type: integer
              minimum: 0
              maximum: 255
            alpha:
              type: number
              minimum: 0
              maximum: 1
        colorDecontamination:
          type: integer
          minimum: 0
          maximum: 1
          description: Level of color decontamination to apply.
          example: 1920
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: Error type code.
          example: image
        title:
          type: string
          description: Human-readable error description.
          example: example_value
        code:
          type: integer
          description: HTTP status code.
          example: 1920
        details:
          type: object
          properties:
            reason:
              type: string
            name:
              type: string
              description: Parameter name causing the error.
  responses:
    QuotaExceeded:
      description: Trial quota exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    AsyncJobAccepted:
      description: Job accepted for asynchronous processing.
      content:
        application/json:
          schema:
            type: object
            properties:
              _links:
                type: object
                properties:
                  self:
                    type: object
                    properties:
                      href:
                        type: string
                        description: URL to poll for job status.
    Unauthorized:
      description: Authentication failed or token expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded. Retry after the period in the retry-after header.
      headers:
        retry-after:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth Server-to-Server access token obtained from Adobe IMS at https://ims-na1.adobelogin.com/ims/token/v3 using client_credentials grant type.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Adobe Developer Console Client ID.
externalDocs:
  description: Adobe Photoshop API Documentation
  url: https://developer.adobe.com/firefly-services/docs/photoshop/