30 atoms
Base tier

About

This API lets you apply various filters to images plus other adjustments such as image rotation, brightness adjustments, flipping(horizontal/vertical) and Gaussian blur effect . The API accepts input images in multiple formats, including WebP, JPG, JPEG, PNG, BMP, GIF, and TIFF.
The API is ideal for applications that allow photo editing, and applications that allow users to enhance their images by providing an intuitive interface for applying artistic effects, adjusting color balances, and fine-tuning image attributes such as brightness, contrast, and saturation.
Try out the API in the API playground and see how this free image filters API can help you save time and improve image processing with a simple API call.
Select API Endpoints
Input
Output

API Playground

API Documentation

input file: output file
POST
https://api.apyhub.com/processor/image/filter/file

Request example

1
curl --location --request POST 'https://api.apyhub.com/processor/image/filter/file?output=test-sample&filter=convolution_emboss&preserve_format=true' \
2
--header 'apy-token: {{token}}' \
3
--form 'image=@"stock-photo.jpg"'
Method: POST
Content Type: multipart/form-data
Query Parameter(s)
AttributeTypeMandatoryDescription
outputStringNoThe name of the output file, defaults to output.png
filterIntegerYesThe filter that you want to apply on the image. The available options are given below
preserve_formatBooleanNoTo preserve the format of the output image file, set it to true. The default is false, which returns a jpeg image.
Available options for filter
OptionsDescription
rotate_45This will rotate the image by 45°
rotate_90This will rotate the image by 90°
rotate_135This will rotate the image by 135°
rotate_180This will rotate the image by 180°
rotate_225This will rotate the image by 225°
rotate_270This will rotate the image by 270°
rotate_315This will rotate the image by 315°
maximumThis removes negative outlier noise from the image
minimumThis removes positive outlier noise from the image
brightness_decreaseThis decreases the overall brighness of the image
brightness_increaseThis increases the overall brighness of the image
gaussian_blurThis mutes the noise and blur the image
flip_verticalThis flips the image vertically
flip_horizontalThis flips the image horizontally
gamma_0.5This reduces the gamma value to 0.5, images becomes darker with high contrast and low brightness
Request Body
AttributeTypeMandatoryDescription
imageFileYesThe source image file in supported formats such as png, jpeg, jpg, bmp, tiff, gif, or webp.
Sample Response
A successful request returns the generated file in the output parameter specified. If the request fails, the response contains an error code and a message to help determine what went wrong.

HTTP Response Codes

The method may return one of the following HTTP status codes:
Status CodeDescription
200The request was successful.
401Required authentication information is either missing or not valid for the resource.
400Invalid input - the image file is corrupt or the filter attribute is not provided.
500If any unexpected error occurs while processing the request.

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.