DeepLearnAI
Developer Platform
Get API Key

Generate Images

POST https://api.deep-learn.ai/v1/images/generate

Given a prompt and a style, the DeepLearn model generates an image based on the description and returns a URL to the generated image. Images are 1024px x 1024px. URLs will work for 24 hours after generating, if you want to keep an image download it to your servers.

Request body

prompt
string
Required
Max 1000 characters

The text prompt used to generate the image.

style
string
Optional
Defaults to "illustration"

The style of the image, choose from: "photo", "illustration", or "cartoon".

Returns

imageUrl
string

The URL of the generated image.

success
boolean

Indicates if the request was successful.

errorCode
number or null

The error code if the request was not successful.

errorMessage
string or null

The error message if the request was not successful.