POST
/
image
/
generate
Generate an image using a design template
curl --request POST \
  --url https://api.imagior.com/image/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "templateId": "<string>",
  "elements": {}
}'
{
  "status": "success",
  "statusCode": 200,
  "message": "Image generated and credits updated",
  "imageURL": "<string>",
  "details": {
    "dimensions": {
      "width": 123,
      "height": 123
    },
    "format": "png"
  },
  "usage": {
    "previousCredits": 123,
    "creditsUsed": 123,
    "remainingCredits": 123
  },
  "requestCompletionTime": "<string>",
  "timestamp": "2023-11-07T05:31:56Z"
}
Very Important: This operation will use your account credits. Each image generated will reduce your credits by one (1 image = 1 credit), proceed with caution.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Details required for generating an image

templateId
string
required

ID of the design template to use.

elements
object

Modifications to apply to the template elements.

Response

Image successfully generated

status
string
Example:

"success"

statusCode
integer
Example:

200

message
string
Example:

"Image generated and credits updated"

imageURL
string

URL of the generated image

details
object
usage
object
requestCompletionTime
string

Time taken to complete the request

timestamp
string<date-time>