---
title: "Async Image Edit"
method: POST
path: "/v1/image/edit/async"
tags: ["Image"]
---

# Async Image Edit

`POST /v1/image/edit/async`

Specifies: 
- what image will be processed (`input`)
- how it will be processed (`operations`)
- where it will be stored (`output`)

## Request body

- AsyncEditRequest
  - `input` string, uri, required — URL of the input image. Should be from 1 to 512 characters. Image must be accessible by our system.
  - `operations` ImageOperations, required
    - `restorations` RestorationsOptions
      - `decompress` 'moderate' | 'strong' | 'auto' — Selects the restoration mode. | Value | Description | | --- | --- | | `null` | DEFAULT. No restoration applied.| | `"moderate"` | Removes JPEG artifacts from the image.| | `"strong"` | Removes JPEG artifacts more aggressively than `"moderate"`.| | `"auto"` | Automatically detects and remove JPEG artifacts if needed.|
      - `upscale` union — The upscale operation allows you to improve the overall quality of an image by rendering out new pixels. The upscale operation works along with resizing through numeric or percentage values for upscaling.
        - 'smart_enhance' | 'smart_resize' | 'faces' | 'digital_art' | 'photo' — Upscales the image with specified type of image upscaling neural network. | Value | Description | | --- | --- | | `null` | DEFAULT. Interpolation. Used when output image resolution is smaller than the input resolution.| | `"smart_enhance"` | Used for small low quality product, real estate and food images.| | `"smart_resize"` | Used for high quality images.| | `"faces"` | Used for images containing persons.| | `"digital_art"` | Used for drawings, illustrations, paintings, cartoons, anime, etc.| | `"photo"` | Used for images taken by mobile devices or digital camera of people, nature, architecture, etc.|
        - UpscalePhotoOptions
          - `type` 'photo', required
          - `version` '1' | '2' | '3', required — Upscales the image with specified version of photo upscaling neural network. | Value | Description | | --- | --- | | `"1"` | Is deprecated and not recommended.| | `"2"` | Used for restoring image quality that is taken by mobile devices or digital camera.| | `"3"` | Used for restoring image quality, a bit more aggressively than `"2"`.|
      - `polish` boolean — If `true`, polishes an image
    - `adjustments` AdjustmentsOptions
      - `hdr` union — Balances out colors and lighting. Allows to turn on `stitching` for stitched 360 photos.
        - integer — HDR effect intensity.
        - HdrOptions
          - `intensity` integer — HDR effect intensity.
          - `stitching` boolean — Set to true for seamless HDR effect on stitched 360 photos.
      - `exposure` integer — Decrease (negative integer) or increase (positive integer) exposure.
      - `saturation` integer — Decrease (negative integer) or increase (positive integer) saturation.
      - `contrast` integer — Decrease (negative integer) or increase (positive integer) contrast.
      - `sharpness` integer — Increase sharpness.
    - `background` BackgroundOptions
      - `remove` union — Allows to turn on and configure image background removal.
        - boolean — If `true`, removes background
        - BackgroundRemovalOptions
          - `clipping` boolean — If `true` image will be cropped up to the edges of the foreground object.
          - `selective` BackgroundSelectiveOptions
            - `object_to_keep` string, required — Specify an object to keep on the image.
          - `category` 'general' | 'cars' | 'products' — Selects the category of objects on the image: | Value | Description | | --- | --- | | `"general"` | The category that is suitable for all objects and is used by default.| | `"cars"` | The advanced category that will have better results for removing the background with cars on foreground.| | `"products"` | The advanced category that will have better results for background removal of various types of products and groceries.|
      - `color` union — Color as a hexadecimal. Sets a background color. Defaults to the `#ffffff` (white) color, or `transparent` if an input image has transparency.
        - string — Color as a hexadecimal. Paints the background of the image. Examples: `"#ffffff"`, `"#000000"`.
        - 'transparent' — Makes the background of the image transparent, only works for `"png"` output format.
      - `blur` union — Allows to turn on and configure image background blurring.
        - boolean — If `true`, blurs background. Defaults to `false`.
        - BackgroundBlurOptions
          - `selective` BackgroundSelectiveOptions
            - `object_to_keep` string, required — Specify an object to keep on the image.
          - `category` 'general' | 'cars' | 'products' — Selects the category of objects on the image: | Value | Description | | --- | --- | | `"general"` | The category that is suitable for all objects and is used by default.| | `"cars"` | The advanced category that will have better results for removing the background with cars on foreground.| | `"products"` | The advanced category that will have better results for background removal of various types of products and groceries.|
          - `type` 'regular' | 'lens' — Selects the type of blur: | Value | Description | | --- | --- | | `"regular"` | Gaussian blur. Creates an effect of laying a translucent material like vellum on top of the image background.| | `"lens"` | Lens blur with linear focus. Mimics the blur applied to a photo when a wide aperture is used to achieve a narrow depth of field, so that the foreground objects stands out.|
          - `level` 'low' | 'medium' | 'high' — Selects the level of blur strength: | Value | Description | | --- | --- | | `"low"` | Low blur strength.| | `"medium"` | Medium blur strength.| | `"high"` | High blur strength.|
    - `resizing` ResizingOptions
      - `width` union — Width of output image. Should be of the same type as `height`, or `"auto"`.
        - integer — Width in pixels.
        - 'auto' — `width` will have the same value as `height`, if `height` is defined in pixels or percentages; and vice versa.
        - string — Percentage as a string. E.g. `"200%"` means that the `width` will double relative to the input image. If you express `width` as a percentage, `height` must have the same value or set to `"auto"`. Examples: `"60%"`, `"40%"`
      - `height` union — Height of output image. Should be of the same type as `width`, or `"auto"`.
        - integer — Height in pixels.
        - 'auto' — `width` will have the same value as `height`, if `height` is defined in pixels or percentages; and vice versa.
        - string — Percentage as a string. E.g. `"200%"` means that the `height` will double relatively to the input image. If you express `height` as a percentage, `width` must have the same value or set to `"auto"`. Examples: `"60%"`, `"40%"`
      - `fit` union — The fit parameter controls how the image will be constrained within the provided size, relative to the `width` and `height`. By default, `fit` mode is `"crop"`.
        - 'crop' | 'cover' | 'bounds' | 'canvas' | 'outpaint' — Selects the fit mode: (Note: All fit modes preserve the original image aspect ratio. Meaning, the image can be cropped but it won't be stretched or squeezed.) | Value | Description | | --- | --- | | `"crop"` | Scales an image until it fully covers the specified dimensions, the rest gets cropped. Fit `crop` support `"center"` and `"smart"` modes for cropping.| | `"cover"` | Resize the image to entirely cover the specified region, making one dimension larger if needed.| | `"bounds"` | Resize the image to fit entirely within the specified region, making one dimension smaller if needed. | | `"canvas"` | Input image will be placed on the canvas established by `width` and `height`. Extra space will be filled with the background `color`.| | `"outpaint"` | Extra space will be generated with the coherent background.|
        - CropOptions
          - `type` 'crop', required
          - `crop` 'center' | 'smart' — Selects the crop mode: | Value | Description | | --- | --- | | `"center"` | Cropping relative to the center of the image.| | `"smart"` | Content aware image cropping.|
        - CoverOptions
          - `type` 'cover', required
        - BoundsOptions
          - `type` 'bounds', required
        - CanvasOptions
          - `type` 'canvas', required
        - OutpaintOptions
          - `type` 'outpaint', required
          - `feathering` string — Percentage in string format. Examples: `"60%"`, `"200%"`
          - `outpaint_by` string — The amount of outpainting to be applied to the image. Should be a string with one or two values separated by space. Each value can be in pixels (e.g. `"100px"`) or in percentages (e.g. `"20%"`). If two values are provided, the first value is for the width and the second value is for the height. If only one value is provided, it will be applied to both width and height. If not provided, the outpainting will be applied in one direction only based on `fit.width` and `fit.height`. Examples: `"10%"`, `"5% 15%"`, `"5% 0%"`, `"1024px"`, `"1024px 512px"`, `"0px 1024px"`.
    - `padding` string — Add a space around the object equally to each of 4 sides, or for height&width separately. Can not be bigger than half of image width/height. By default, padding is not applied.
    - `privacy` PrivacyOptions
      - `blur_car_plate` boolean — If `true`, blurs car plate.
      - `identity_crop` boolean — Removes a person's face from the image by cutting everything above the mouth.
    - `generative` GenerativeOptions
      - `style_transfer` StyleTransferOptions
        - `style_reference_image` string, required — URL of the image to be used as a style reference.
        - `prompt` string — Text prompt to adjust the style transfer output.
        - `depth_strength` number — The denoising strength determines the degree of overall composition and shape preservation.
        - `denoising_strength` number — The denoising strength determines the degree of color and texture modification.
        - `style_strength` number — The style strength determines the degree of overall style intensity as taken from the reference.
  - `output` union — Customize the result output.
    - ImageOutputOptions
      - `format` union — Converts an image to one of the following formats: `"jpeg"`, `"png"`, `"webp"`, `"avif"`. Selecting *Jpeg Options* allows to specify quality.
        - 'jpeg' | 'png' | 'webp' | 'avif' | 'tiff' — Converts the image into specified format. Examples: `"jpeg"`, `"png"`.
        - FormatJpegOptions
          - `type` 'jpeg', required — Must have value `"jpeg"`
          - `quality` integer
          - `progressive` boolean — Progressive JPEG loads in a browser in successive waves until a clear picture is formed. This improves image's loading speed.
        - FormatPngOptions
          - `type` 'png', required — Must have value `"png"`
          - `compression` 'fast' | 'best' | 'optimal' — Indicates compression effort. | Value | Description | | --- | --- | | `"fast"` | Used to apply minimum compression resulting in a bigger image size but less processing time.| | `"best"` | Used to apply maximum compression resulting in a smaller image size but more processing time.| | `"optimal"` | DEFAULT. Used to balance between compression effort and the processing time.|
        - FormatWebpOptions
          - `type` 'webp', required — Must have value `"webp"`
          - `compression` union — The WEBP codec supports both lossless and lossy modes of operation, so you can select the one that is appropriate for your goals. Lossy compression allows you to reduce the size of the image significantly in exchange for some loss of data, reducing the quality of an image. You can specify the amount of loss you are willing to accept. By default it's set to to 75. Lossless compression allows you to save maximum image details in exchange for a significantly increased file size.
            - 'lossy' | 'lossless' — Selects the WEBP compression type: | Value | Description | | --- | --- | | `"lossy"` | Lossy compression allows you to reduce the size of the image significantly in exchange for some loss of data, reducing the quality of an image.| | `"lossless"` | Lossless compression allows you to save maximum image details in exchange for a significantly increased file size.|
            - WebpLossyCompressionOptions
              - …
            - WebpLosslessCompressionOptions
              - …
        - FormatAvifOptions
          - `type` 'avif', required — Must have value `"avif"`
          - `compression` union — The AVIF codec supports both lossless and lossy modes of operation, so you can select the one that is appropriate for your goals. Lossy compression allows you to reduce the size of the image significantly in exchange for some loss of data, reducing the quality of an image. You can specify the amount of loss you are willing to accept. Lossless compression allows you to save maximum image details in exchange for a significantly increased file size.
            - 'lossy' | 'lossless' — Selects the AVIF compression type: | Value | Description | | --- | --- | | `"lossy"` | Lossy compression allows you to reduce the size of the image significantly in exchange for some loss of data, reducing the quality of an image.| | `"lossless"` | Lossless compression allows you to save maximum image details in exchange for a significantly increased file size.|
            - AvifLossyCompressionOptions
              - …
            - AvifLosslessCompressionOptions
              - …
        - FormatTiffOptions
          - `type` 'tiff', required — Must have value `"tiff"`
          - `compression` union — The TIFF codec supports both lossless and lossy modes of operation, so you can select the one that is appropriate for your goals. Lossy JPEG compression allows you to reduce the size of the image significantly in exchange for some loss of data, reducing the quality of an image. You can specify the amount of loss you are willing to accept. By default it's set to to 75. Lossless LZW (Lempel-Ziv-Welch) compression allows you to save maximum image details in exchange for a significantly increased file size.
            - 'lossy' | 'lossless' — Selects the TIFF compression type: | Value | Description | | --- | --- | | `"lossy"` | Lossy JPEG compression allows you to reduce the size of the image significantly in exchange for some loss of data, reducing the quality of an image.| | `"lossless"` | Lossless LZW (Lempel-Ziv-Welch) compression allows you to save maximum image details in exchange for a significantly increased file size.|
            - TiffLossyCompressionOptions
              - …
            - TiffLosslessCompressionOptions
              - …
      - `destination` string, uri — URL of the output image. If `output` is not defined, we store the output image on our bucket and return the temporary URL. The name of the output file remains the same as the input file. Images are stored for one day.
      - `metadata` MetadataOptions
        - `dpi` integer — Dots per inch.
        - `color_space` union — Specifies desirable color space of the output image. By default, preserves the color space of the original image.
          - 'RGB' | 'CMYK' — Selects the type of color space: | Value | Description | | --- | --- | | `"RGB"` | Is the color space for digital images. Use the RGB color mode if your image is supposed to be displayed on any kind of screen.| | `"CMYK"` | Is the color space for printed materials. Use CMYK for any image that will be physically printed, not viewed on a screen.|
          - RGBColorSpaceOptions
            - `type` 'RGB', required
          - CMYKColorSpaceOptions
            - `type` 'CMYK', required
            - `color_profile` 'ISO_Coated' | 'ISO_Uncoated' | 'USWeb_Coated' | 'USWeb_Uncoated' — Selects the type of color space profile: | Value | Description | Paper | Max. total ink (TAC) | Characterisation data | | --- | --- | --- | --- | --- | | `"ISO_Coated"` | (Coated FOGRA39, ISO 12647-2:2004) Is used by default. Standard for glossy and matte coated paper. | Grades 1 and 2, gloss and matte coated. | 330% | FOGRA39 | | `"ISO_Uncoated"` | (Uncoated FOGRA29, ISO 12647-2:2004) Standard for uncoated white natural paper. | Grade 4, uncoated white offset. | 300% | FOGRA29 | | `"USWeb_Coated"` | (SWOP2006_Coated3v2) Standard for glossy and matte coated paper in the United States. | Grades 1, 2 and 3 gloss coated, matte coated and uncoated paper. | 300% | CGATS TR003 | | `"USWeb_Uncoated"` | (GRACoL 2013 Uncoated) Standard for uncoated white natural paper in the United States. | Grade 4, uncoated white offset. | 260% | CGATS21-2-CRPC3 |
    - string, uri

## Response `200`

Successful Response

- ResponseAsyncAcceptedResponse — Wrapper for responses
  - `data` AsyncAcceptedResponse
    - `id` integer, required
    - `status` 'ACCEPTED' | 'WAITING' | 'PROCESSING' | 'DONE' | 'ERROR' | 'CANCELLED' | 'PAUSED', required — An enumeration.
    - `result_url` string, uri
    - `created_at` string, date-time, required
    - `request` union, required
      - BatchEditRequest
        - `input` union, required — URL of the input file or folder. Should be from 1 to 512 characters. Must be accessible by our system.
          - BatchEditInputOptions
            - `source` string, uri, required — URL of the input file or folder. Should be from 1 to 512 characters. Must be accessible by our system.
            - `recursive` boolean — If `true`, recursively processes all images in subfolders as well, works only if source is folder.
          - string, uri
          - string[]
        - `operations` ImageOperations, required
          - `restorations` RestorationsOptions
            - `decompress` 'moderate' | 'strong' | 'auto' — Selects the restoration mode. | Value | Description | | --- | --- | | `null` | DEFAULT. No restoration applied.| | `"moderate"` | Removes JPEG artifacts from the image.| | `"strong"` | Removes JPEG artifacts more aggressively than `"moderate"`.| | `"auto"` | Automatically detects and remove JPEG artifacts if needed.|
            - `upscale` union — The upscale operation allows you to improve the overall quality of an image by rendering out new pixels. The upscale operation works along with resizing through numeric or percentage values for upscaling.
              - …
            - `polish` boolean — If `true`, polishes an image
          - `adjustments` AdjustmentsOptions
            - `hdr` union — Balances out colors and lighting. Allows to turn on `stitching` for stitched 360 photos.
              - …
            - `exposure` integer — Decrease (negative integer) or increase (positive integer) exposure.
            - `saturation` integer — Decrease (negative integer) or increase (positive integer) saturation.
            - `contrast` integer — Decrease (negative integer) or increase (positive integer) contrast.
            - `sharpness` integer — Increase sharpness.
          - `background` BackgroundOptions
            - `remove` union — Allows to turn on and configure image background removal.
              - …
            - `color` union — Color as a hexadecimal. Sets a background color. Defaults to the `#ffffff` (white) color, or `transparent` if an input image has transparency.
              - …
            - `blur` union — Allows to turn on and configure image background blurring.
              - …
          - `resizing` ResizingOptions
            - `width` union — Width of output image. Should be of the same type as `height`, or `"auto"`.
              - …
            - `height` union — Height of output image. Should be of the same type as `width`, or `"auto"`.
              - …
            - `fit` union — The fit parameter controls how the image will be constrained within the provided size, relative to the `width` and `height`. By default, `fit` mode is `"crop"`.
              - …
          - `padding` string — Add a space around the object equally to each of 4 sides, or for height&width separately. Can not be bigger than half of image width/height. By default, padding is not applied.
          - `privacy` PrivacyOptions
            - `blur_car_plate` boolean — If `true`, blurs car plate.
            - `identity_crop` boolean — Removes a person's face from the image by cutting everything above the mouth.
          - `generative` GenerativeOptions
            - `style_transfer` StyleTransferOptions
              - …
        - `output` union — URL of the output folder. If `output` is not defined, we store the output image on our bucket and return the temporary URL. The name of the output file remains the same as the input file. Images are stored for one day.
          - ImageOutputOptions
            - `format` union — Converts an image to one of the following formats: `"jpeg"`, `"png"`, `"webp"`, `"avif"`. Selecting *Jpeg Options* allows to specify quality.
              - …
            - `destination` string, uri — URL of the output image. If `output` is not defined, we store the output image on our bucket and return the temporary URL. The name of the output file remains the same as the input file. Images are stored for one day.
            - `metadata` MetadataOptions
              - …
          - string, uri
      - AsyncEditRequest
        - `input` string, uri, required — URL of the input image. Should be from 1 to 512 characters. Image must be accessible by our system.
        - `operations` ImageOperations, required
          - `restorations` RestorationsOptions
            - `decompress` 'moderate' | 'strong' | 'auto' — Selects the restoration mode. | Value | Description | | --- | --- | | `null` | DEFAULT. No restoration applied.| | `"moderate"` | Removes JPEG artifacts from the image.| | `"strong"` | Removes JPEG artifacts more aggressively than `"moderate"`.| | `"auto"` | Automatically detects and remove JPEG artifacts if needed.|
            - `upscale` union — The upscale operation allows you to improve the overall quality of an image by rendering out new pixels. The upscale operation works along with resizing through numeric or percentage values for upscaling.
              - …
            - `polish` boolean — If `true`, polishes an image
          - `adjustments` AdjustmentsOptions
            - `hdr` union — Balances out colors and lighting. Allows to turn on `stitching` for stitched 360 photos.
              - …
            - `exposure` integer — Decrease (negative integer) or increase (positive integer) exposure.
            - `saturation` integer — Decrease (negative integer) or increase (positive integer) saturation.
            - `contrast` integer — Decrease (negative integer) or increase (positive integer) contrast.
            - `sharpness` integer — Increase sharpness.
          - `background` BackgroundOptions
            - `remove` union — Allows to turn on and configure image background removal.
              - …
            - `color` union — Color as a hexadecimal. Sets a background color. Defaults to the `#ffffff` (white) color, or `transparent` if an input image has transparency.
              - …
            - `blur` union — Allows to turn on and configure image background blurring.
              - …
          - `resizing` ResizingOptions
            - `width` union — Width of output image. Should be of the same type as `height`, or `"auto"`.
              - …
            - `height` union — Height of output image. Should be of the same type as `width`, or `"auto"`.
              - …
            - `fit` union — The fit parameter controls how the image will be constrained within the provided size, relative to the `width` and `height`. By default, `fit` mode is `"crop"`.
              - …
          - `padding` string — Add a space around the object equally to each of 4 sides, or for height&width separately. Can not be bigger than half of image width/height. By default, padding is not applied.
          - `privacy` PrivacyOptions
            - `blur_car_plate` boolean — If `true`, blurs car plate.
            - `identity_crop` boolean — Removes a person's face from the image by cutting everything above the mouth.
          - `generative` GenerativeOptions
            - `style_transfer` StyleTransferOptions
              - …
        - `output` union — Customize the result output.
          - ImageOutputOptions
            - `format` union — Converts an image to one of the following formats: `"jpeg"`, `"png"`, `"webp"`, `"avif"`. Selecting *Jpeg Options* allows to specify quality.
              - …
            - `destination` string, uri — URL of the output image. If `output` is not defined, we store the output image on our bucket and return the temporary URL. The name of the output file remains the same as the input file. Images are stored for one day.
            - `metadata` MetadataOptions
              - …
          - string, uri
      - object
    - `errors` BatchPipelineError[]
      - `error` string, required
      - `created_at` string, required
      - `input_object` PipelineInputObjectInError
        - `ext` string, required — File extension. Can have values: `"jpg"`, `"png"`, `"avif"`
        - `mps` number, required — Megapixel count
        - `mime` string, required — MIME type (also known as ‘media type’)
        - `format` string, required — File format. Can have values: `"jpeg"`, `"png"`, `"avif"`
        - `width` integer, required — Image width in pixels
        - `height` integer, required — Image height in pixels
    - `result` AsyncPipelineResultItem
      - `input_object` PipelineInputObject, required
        - `ext` string, required — File extension. Can have values: `"jpg"`, `"png"`, `"avif"`
        - `mps` number, required — Megapixel count
        - `mime` string, required — MIME type (also known as ‘media type’)
        - `format` string, required — File format. Can have values: `"jpeg"`, `"png"`, `"avif"`
        - `width` integer, required — Image width in pixels
        - `height` integer, required — Image height in pixels
      - `output_object` PipelineOutputObject, required
        - `ext` string, required — File extension. Can have values: `"jpg"`, `"png"`, `"avif"`
        - `mps` number, required — Megapixel count
        - `mime` string, required — MIME type (also known as ‘media type’)
        - `format` string, required — File format. Can have values: `"jpeg"`, `"png"`, `"avif"`
        - `width` integer, required — Image width in pixels
        - `height` integer, required — Image height in pixels
        - `tmp_url` string — Temporal URL of a processed image
        - `object_key` string — Path to a processed image in a bucket
        - `object_bucket` string — Bucket name
        - `object_uri` string — URI of a processed image in a bucket
        - `claid_storage_uri` string — URI of a processed image in a storage

## Other responses

- `401` — Authorization is required.
- `402` — No API calls left.
- `403` — Not enough permissions.
- `422` — Unprocessable Entity.
- `429` — Too many requests.

---

[API](https://skmtc.net/claid/apis/claid-rest-api.md) · [All operations](https://skmtc.net/claid/apis/claid-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/claid/claid-rest-api/revisions/410fc0db9665/schema)
