Adobe Creative Suite · Arazzo Workflow

Adobe Photoshop Remove Background

Version 1.0.0

Submit a Sensei background-removal job, poll until it finishes, and return the cutout output URL.

1 workflow 1 source API 1 provider
View Spec View on GitHub CreativeDesignGraphicsPhotographyVideoArazzoWorkflows

Provider

adobe-creative-suite

Workflows

remove-background
Submit a background-removal job and poll until it succeeds or fails.
Submits a cutout job for an input image, polls the job status to completion, and returns the cutout output rendition URL on success.
4 steps inputs: inputHref, inputStorage, outputHref, outputStorage, outputType outputs: errors, jobId, outputUrl
1
submitCutout
removeBackground
Submit the background-removal job referencing the input image and the output destination. The API queues the job and returns a job id.
2
pollStatus
getJobStatus
Poll the job status, repeating while it is pending or running and branching once it succeeds or fails.
3
reportSuccess
getJobStatus
Surface the cutout output rendition URL from the succeeded job.
4
reportFailure
getJobStatus
Surface the error details from the failed cutout job.

Source API Descriptions

Arazzo Workflow Specification

adobe-creative-suite-photoshop-remove-background-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Adobe Photoshop Remove Background
  summary: Submit a Sensei background-removal job, poll until it finishes, and return the cutout output URL.
  description: >-
    Removes the background from an image using the Adobe Photoshop API and Adobe
    Sensei AI. The workflow submits a cutout job referencing an input image and
    an output location in cloud storage, polls the job status endpoint until the
    job reaches a terminal state, and branches on the result to return either
    the cutout rendition URL or the error details. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: photoshopApi
  url: ../openapi/adobe-creative-suite-photoshop-openapi.yml
  type: openapi
workflows:
- workflowId: remove-background
  summary: Submit a background-removal job and poll until it succeeds or fails.
  description: >-
    Submits a cutout job for an input image, polls the job status to completion,
    and returns the cutout output rendition URL on success.
  inputs:
    type: object
    required:
    - inputHref
    - inputStorage
    - outputHref
    - outputStorage
    - outputType
    properties:
      inputHref:
        type: string
        description: URL or path of the input image in cloud storage.
      inputStorage:
        type: string
        description: Cloud storage provider of the input (adobe, external, azure, or dropbox).
      outputHref:
        type: string
        description: URL or path where the cutout output should be written.
      outputStorage:
        type: string
        description: Cloud storage provider of the output.
      outputType:
        type: string
        description: MIME type of the output file (e.g. image/png).
  steps:
  - stepId: submitCutout
    description: >-
      Submit the background-removal job referencing the input image and the
      output destination. The API queues the job and returns a job id.
    operationId: removeBackground
    requestBody:
      contentType: application/json
      payload:
        input:
          href: $inputs.inputHref
          storage: $inputs.inputStorage
        output:
          href: $inputs.outputHref
          storage: $inputs.outputStorage
          type: $inputs.outputType
    successCriteria:
    - condition: $statusCode == 202
    outputs:
      jobId: $response.body#/jobId
  - stepId: pollStatus
    description: >-
      Poll the job status, repeating while it is pending or running and branching
      once it succeeds or fails.
    operationId: getJobStatus
    parameters:
    - name: jobId
      in: path
      value: $steps.submitCutout.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
    onSuccess:
    - name: jobSucceeded
      type: goto
      stepId: reportSuccess
      criteria:
      - context: $response.body
        condition: $.status == "succeeded"
        type: jsonpath
    - name: jobFailed
      type: goto
      stepId: reportFailure
      criteria:
      - context: $response.body
        condition: $.status == "failed"
        type: jsonpath
    - name: stillRunning
      type: retry
      stepId: pollStatus
      retryAfter: 5
      retryLimit: 30
      criteria:
      - context: $response.body
        condition: $.status == "pending" || $.status == "running"
        type: jsonpath
  - stepId: reportSuccess
    description: Surface the cutout output rendition URL from the succeeded job.
    operationId: getJobStatus
    parameters:
    - name: jobId
      in: path
      value: $steps.submitCutout.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.status == "succeeded"
      type: jsonpath
    outputs:
      outputUrl: $response.body#/outputs/0/_links/renditions/0/href
      outputs: $response.body#/outputs
    onSuccess:
    - name: done
      type: end
  - stepId: reportFailure
    description: Surface the error details from the failed cutout job.
    operationId: getJobStatus
    parameters:
    - name: jobId
      in: path
      value: $steps.submitCutout.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      errors: $response.body#/errors
  outputs:
    jobId: $steps.submitCutout.outputs.jobId
    outputUrl: $steps.reportSuccess.outputs.outputUrl
    errors: $steps.reportFailure.outputs.errors