POST
/
v1
/
images
curl --request POST \
  --url https://api.img-processing.com/v1/images \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "example-image",
  "url": "https://example.com/image.jpg"
}'
{
  "id": "image_etm0g3x5iap4cld1qcfsjvo2",
  "name": "Processed Image",
  "url": "https://storage.img-processing.com/images/image_etm0g3x5iap4cld1qcfsjvo2",
  "width": 460,
  "height": 460,
  "format": "jpeg",
  "size": 282000,
  "created_at": "2021-09-01T12:00:00.000Z"
}

Description

The first step to start processing images with the IMG Processing API is to create an Image Object. You can create an Image object by uploading an image file or by providing a URL to an existing image.

This endpoint allows you to create an Image object by providing a URL to an existing image. The API will download the image from the provided URL, so make sure the URL is accessible and the image is publicly available.


Allowed Origins

For security reasons, the API only accept images from the following origins:

IMG Processing Storage

Images published on IMG Processing has the following format:

https://storage.img-processing.com/*

Amazon S3

You can use either pre-signed (recommended) or publicly accessible URLs.

Amazon S3 URLs must match one of the following formats:

https://*.s3.*.amazonaws.com/*

https://*.s3.amazonaws.com/*

https://s3.amazonaws.com/*

Azure Blob Storage

You can use either pre-signed (recommended) or publicly accessible URLs.

Azure Blob Storage URLs must match the following format:

https://*.blob.core.windows.net/*

Cloudflare R2

You can use either pre-signed (recommended) or publicly accessible URLs.

Cloudflare R2 URLs must match the following format:

https://*.r2.dev/*

Dropbox

You can use publicly accessible URLs.

Dropbox URLs must must match the following format:

https://www.dropbox.com/*

Google Cloud Storage

You can use either pre-signed (recommended) or publicly accessible URLs.

Google Cloud Storage URLs must match the following format:

https://storage.googleapis.com/*

Google Drive

You can use publicly accessible URLs.

Google Drive URLs must must match the following format:

https://drive.google.com/*

OneDrive

You can use publicly accessible URLs.

OneDrive URLs must must match the following format:

https://1drv.ms/*


Authorizations

x-api-key
string
header
required

API Key for authentication

Body

application/json

Response

201
application/json

The API will return the created Image object in the response body.

The Image object represents an image processed using the IMG Processing API. The object contains information about the image, such as its URL, size, and format. The Image object is returned in the response body of all image processing requests.