SETRESOLUTION API Endpoint

Version 2.197 (Release Notes ↗)

Description

SETRESOLUTION API endpoint sets image resolution, essential for developers and creators optimizing visual content. Sets image resolution.

HTTP Methods

GET, POST

HTTP Parameters

Required

Fields Type Description
img URL Input media URL. If uploading directly from your app, submit a multipart/form-data POST request.
xr Integer X Resolution (16-300).
yr Integer Y Resolution (16-300).
key String Your PixLab API Key ↗. Alternatively, embed it in the WWW-Authenticate: header.

Optional

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

POST Request Body

This section details the requirements for using a POST request instead of a simple GET request.

Allowed Content-Types:

  • multipart/form-data
  • application/json

For direct file uploads, use multipart/form-data (see REST API code samples). For JSON, ensure media is already hosted (upload via store if needed).

HTTP Response

Fields Type Description
status Integer Status code 200 indicates success, any other code indicates failure.
link URL Link to the media output stored on the pixlab.xyz storage server unless custom S3 keys are configured (see console.pixlab.io for setup).
id String Unique media identifier.
error String Error message if status != 200.

The endpoint returns application/json unless the blob parameter is specified, in which case the raw media binary is returned. JSON responses include the fields 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