dallEDescriptionToImage ( string decription , string api_key , string _size , string _model ) : string
Allows you to generate an image from a description of this image. Dall-E is used for this, on which you can do tests.
To control your costs, please consult this page: https://openai.com/api/pricing/
Example
generatedImage = dallEDescriptionToImage("an eskimo on a terrace", "sk-CymZ59RdjCszGAVncT3BlfsdtAr5jq7caW7gBFj")
Parameters
decription
the description of the image you want to get as you would write it in Dall-E. Example: "create a product image for an e-commerce website for a powerful chainsaw"
api_key
the Dall-E API token, you can have it here.
_size (optional)
the image size (only square). Possible values:
- 256x256
- 512x512 (default)
- 1024x1024
_model (optional)
Default: "image-alpha-001". The artificial intelligence model that will understand what you write and will generate the image.
Return value
The function returns the path of the file containing the generated image.