Generate Images Using PhotoReal
Follow this recipe to generate images using PhotoReal v2
πΈ
Generate Images with PhotoReal v2
Open Recipe
PhotoReal v2
The guide will recreate the following functionality in the Web UI via API. This is the default version used in Presets with the current UI.
Specify PhotoReal v2 using "photoRealVersion":"v2"
, if not specified, the default PhotoReal version will be v1.
Tip
- Alchemy needs to be set to true (e.g
"alchemy": true
)modelId
for PhotoReal v2 needs to be specified as Leonardo Kino XL, Leonardo Diffusion XL or Leonardo Vision XLphotoRealStrength
is not required for PhotoReal v2
Preset Styles available
Style | Value |
---|---|
Bokeh | BOKEH |
Cinematic | CINEMATIC |
Cinematic (Closeup) | CINEMATIC_CLOSEUP |
Creative | CREATIVE |
Fashion | FASHION |
Film | FILM |
Food | FOOD |
HDR | HDR |
Long Exposure | LONG_EXPOSURE |
Macro | MACRO |
Minimalistic | MINIMALISTIC |
Monochrome | MONOCHROME |
Moody | MOODY |
Neutral | NEUTRAL |
Portrait | PORTRAIT |
Retro | RETRO |
Stock Photo | STOCK_PHOTO |
Vibrant | VIBRANT |
Unprocessed | UNPROCESSED |
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 majestic cat in the snow",
"negative_prompt": "trees",
"modelId": "aa77f04e-3eec-4034-9c07-d0f619684628",//Leonardo Kino XL model
"width": 512,
"alchemy": true,
"presetStyle": "DYNAMIC",
"photoReal": true,
"photoRealVersion":"v2"
}
'
PhotoReal v1
Follow this recipe to generate images using PhotoReal v1
π¦
Generate Images Using PhotoReal
Open Recipe
The guide will recreate the following functionality in the Web UI via API.
Tip
- Alchemy needs to be set to true (e.g
"alchemy": true
)modelId
does not need to be specified in the API body when using PhotoReal v1.
Preset Styles available
Style | Value |
---|---|
Cinematic | CINEMATIC |
Creative | CREATIVE |
Vibrant | VIBRANT |
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 cat staring at a window",
"width": 512,
"alchemy": true,
"photoReal": true,
"photoRealStrength": 0.5,
"presetStyle": "CINEMATIC"
}
'
Updated 2 months ago