POST
/
v1
/
images
/
imagine
curl --request POST \
  --url https://api.img-processing.com/v1/images/imagine \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "example-image",
  "prompt": "A beautiful sunset over the ocean.",
  "negative_prompt": "No people in the image.",
  "seed": 42
}'
{
  "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 imagine endpoint allows you to create a new image using AI. At the moment, there is support for the models: ByteDance SDXL-Lightning and Flux, which generates good quality images from text descriptions.

The images generated by the endpoint has a resolution of 1024x1024 pixels and are saved in JPEG format.

Cat image generated by the endpoint


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.