Raster analysis tasks that have the snap  property in their context  parameter will adjust the extent of output rasters so that they match the cell alignment of the specified snap raster.
Snap Raster syntax:
{"snapRaster": {
  "url": "https://organization.example.com/<context>/rest/services/<servicename>/ImageServer"}
}