Image Transformation

This api helps you to resize, compress, and convert images.

Authentication

Authentication for this API is done using an x-api-key header.

x-api-key: YOUR_API_KEY

API Endpoints

GET https://api.goonlinetools.com/api/image-transformation

Parameters:

  • image (required) - The image URL (e.g., https://goonlinetools.com/logo.png).
  • quality - The image quality (1 - 100): A lower number results in higher compression.
  • height - The image height (numeric). To make this work, you must also provide the width.
  • width - The image width (numeric). To make this work, you must also provide the height.
  • format - The image format (webp, png, jpeg).

Headers:

  • x-api-key (required) - Your API Key.

Response:

Rendered Image 

Nodejs Sample Request

const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://goonlinetools.com/api/image-transformation?image=https://goonlinetools.com/logo.png&format=webp&height=500&width=500&quality=90',
  headers: { 
    'x-api-key': 'Your API Key', 
    ...data.getHeaders()
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Credit Consumption

Each successful request to the API consumes 1 credit.

Important Information

This API is manually enabled for your domain. Please contact us to enable