Generate Images Using Alchemy
The guide will recreate the following functionality in the Web UI via API.
Tip
There is no need to specify which version of Alchemy is required, the models will automatically apply the appropriate Alchemy version.
Generating with Alchemy will produce a higher Output Resolution than the Input dimensions specified in the API body. Find out your Image dimension via the Web App like this.
Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v1/generations \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '
{
"height": 512,
"prompt": "A beautiful sleeping white cat",
"modelId": "aa77f04e-3eec-4034-9c07-d0f619684628",//Leonardo Kino XL model
"width": 512,
"alchemy": true,
"presetStyle": "CINEMATIC",
}
'
Models and Alchemy Version
This is not a full comprehensive list of all Models. To view all platform models, use the List Platform Models endpoint.
Alchemy Applied | Example Models |
---|---|
V2 | Leonardo Lightning XL Leonardo Anime XL Leonardo Kino XL Leonardo Vision XL Leonardo Diffusion XL AlbedoBase XL SDXL 1.0 SDXL 0.9 |
V1 | Absolute Reality v1.6 Anime Pastel Dream Dreamshaper v7 Stable Diffusion 1.5 Stable Diffusion 2.1 |
An easy way to view which Alchemy pipeline will be used for your model is to view it on the Web. Any XL model will be using Alchemy v2. A list of all models on the Web can also be found here.
Updated 7 months ago