MODULATE API Endpoint

Version 2.197 (Release Notes ↗)

Description

Control brightness, saturation, and hue with MODULATE. Hue rotates from current position; 50 rotates counter-clockwise 90°, 150 rotates clockwise 90°, and 0 or 200 rotate 180°.

Control the brightness, saturation, and hue. Hue is the percentage of absolute rotation from the current position. For example 50 results in a counter-clockwise rotation of 90 degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees.

HTTP Methods

GET, POST

HTTP Parameters

Required

Fields Type Description
img URL Input image URL. If uploading directly from your app, submit a multipart/form-data POST request.
brightness Float Desired brightness (Max: 500.00).
saturation Float Desired saturation (Max: 500.00).
hue Float Percentage of absolute rotation from current position (Max: 360.00).
key String Your PixLab API Key ↗. Alternatively, embed it in WWW-Authenticate: header.

Optional

Fields Type Description
blob Boolean Returns image binary instead of JSON link when set to true.

POST Request Body

For direct uploads (alternative to GET requests):

Allowed Content-Types:

  • multipart/form-data
  • application/json

Use multipart/form-data for direct image uploads (see REST API code samples). For JSON, the image must be pre-uploaded (use store endpoint first).

HTTP Response

Fields Type Description
status Integer Status code 200 indicates success, any other code indicates failure.
link URL Link to the image output which is usually stored on the pixlab.xyz storage server unless you set your own S3 keys (refer to your dashboard ↗ on how to do that).
id String Unique image ID.
error String Error message if status != 200.

The API returns application/json if the optional blob parameter is not set.

This endpoint returns a JSON Object after each call unless the blob parameter is specified, in which case the raw image binary is returned. The JSON response structure is documented above.

Code Samples

# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
← Return to API Endpoint Listing