First Steps
Your first interaction with the IMG Processing API
Getting an API Key
IMG Processing API is organized around REST principles. The API has predictable resource-oriented URLs, accepts JSON-encoded request bodies (except for file uploads), returns JSON-encoded responses, and uses standard HTTP response codes and methods.
Now let’s see how to getting start with IMG Processing. The first step is creating an account.
Create an account
Image Processing API. A picture is worth a thousand words. Integrate powerful image processing capabilities into your applications in minutes.
As soon as you sign up for the IMG Processing API, you will receive a test API key that you can use to make requests to the API. This key is for testing purposes only, since it has a limited rate limit, adds a watermark to the processed images, and images won’t be stored for more than 90 days.
Test images DO NOT count towards your monthly quota, so you can use them to test the API without worrying about your usage, you don’t even need a credit card to start processing images!
Making a Request
Once you get the api key, you can authenticate request to the API, just include your API key in the x-api-key header of your request. Here is an example of how to do this using curl:
If you prefer it, you can also fork the Postman Library and do the request from there:
Or you can use the playground in the documentation. For example, let’s create an image from a prompt using the documentation playground!
Imagine an Image
Create an image using AI
Creating an Image
All the images in IMG Processing, must be created. To create an image you can upload one from your computer, by an url from an allowed origin, or create one from a prompt. Let’s create an image from a prompt using the playground.
First copy your api key on the dashboard and paste it on the playground expanding the authorization accordion and setting the x-api-key
field. Then open the body accordion and set a custom name and prompt.
After doing it, just run send! This will return an image object in the response.
The unique identifier of the image. This identifier is used to reference the image in subsequent requests.
The name of the image. This name is provided when uploading the image and is the way the image is identified in your account. It is not unique, in fact, each transformation you make to an image will create a new image with the same name.
The public URL of the image. By default, this URL is not available and will be null
.
You can make the image public by using the publish endpoint.
Once the image is public, the URL will be updated with the public URL.
The width of the image in pixels.
The height of the image in pixels.
The format of the image. The format can be one of the following: jpeg
, png
, webp
.
The estimated size of the image in bytes. The size is an estimate and may not be exact since images can be compressed or optimized depending on the format and quality settings used during processing.
The date and time when the image was created. The date and time are in ISO 8601 format.
Downloading the Image
Do you want to check how it was uploaded? Just download the image going to the download endpoint and put the ID of the image to download!
Download Image
Download an image from the API
Here is everything you need to start. If you want to make more complex tasks, don’t hesitate to checkout the documentation.