---
title: "Apply processing to one or more images"
method: POST
path: "/rest_api/process_result"
---

# Apply processing to one or more images

`POST /rest_api/process_result`

It's convenient method that returns the url to the result immediately if the processing time is less than 25 seconds. Otherwise it will return a job hash and the result will be available via "result" method.

## Headers

- `X-API-KEY` string, required

## Request body

- object
  - `url` string, uri — The URL of the input image
  - `background` object — Settings for background removal
    - `remove` 'auto' | 'human' | 'item' — The method of background removal to use
    - `color` 'hexcolor' | 'auto' | 'transparent', color — The color to use for the background if it's removed
    - `replace` string, uri — The URL of an image to replace the background with
  - `width` integer — The desired width of the output image
  - `height` integer — The desired height of the output image
  - `enhancements` string[] — The list of enhancements to apply to the image
  - `light_parameters` object — Settings for the light enhancement
    - `type` 'hdr_light_advanced' | 'hdr_light' | 'contrast' — The type of light enhancement to use
    - `level` number, float — The strength of the light enhancement
  - `color_parameters` object — Settings for the color enhancement
    - `type` 'hdr_light_advanced' | 'hdr_light' | 'contrast' — The type of color enhancement to use
    - `level` number, float — The strength of the color enhancement
  - `white_balance_parameters` object — Settings for the white balance enhancement
    - `level` number, float — The strength of the white balance enhancement
  - `output_format` 'jpeg' | 'png' | 'webp' — The desired output format of the image
  - `caption` object — Settings for adding a caption to the image
    - `url` string — The URL of the caption image
    - `position` 'TL' | 'TC' | 'TR' | 'ML' | 'MC' | 'MR' | 'BL' | 'BC' | 'BR' — The position of the caption image relative to the output image
    - `target_width_percentage` integer — The percentage of the output image width that the caption image should occupy
    - `padding` integer — The amount of padding to add between the caption image and the output image
    - `opacity` integer — The opacity of the caption image
  - `fit` object — Settings for fitting the input image into the output image
    - `crop` 'content' | 'center' | 'item' — The method of fitting to use
  - `quality` integer — The desired output image quality
  - `max_file_size` string — The maximum file size of the output image for JPEG or WEBP formats

## Response `200`

Job processed successfuly

- object
  - `status` string
  - `job` string
  - `result_url` string

## Other responses

- `400` — Error messages include 'Email has not been confirmed', 'User does not have access to this application', 'No such application'
- `403` — Error messages include 'No x-api-key header is provided', 'No x-application-name header is provided', 'No more requests are available. Next requests available DATE'
- `404` — Error messages include 'No user found for provided token', 'No plan found PLAN_NAME'
- `429` — API rate limit has been reached

---

[API](https://skmtc.net/deep-image/apis/image-processing-api.md) · [All operations](https://skmtc.net/deep-image/apis/image-processing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deep-image/image-processing-api/revisions/9ed46fbb4479/schema)
