Created
May 20, 2025 12:38
-
-
Save sandalsoft/83edcd52a6b3e37f920955e5e495bc68 to your computer and use it in GitHub Desktop.
leonardo-api LLMs.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model llms-full.txt | |
## Generate Images with Leonardo | |
Follow this recipes to generate images using the Leonardo Phoenix model. | |
🖼️ | |
Generate Images Using Leonardo Phoenix Model in Ultra Mode | |
Open Recipe | |
🖼️ | |
Generate Images Using Leonardo Phoenix Model in Quality Mode | |
Open Recipe | |
* * * | |
The guide will recreate the following functionality in the Web UI via API. | |
 | |
### Sample Request [Skip link to Sample Request](https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model\#sample-request) | |
```rdmd-code lang- theme-light | |
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 ' | |
{ | |
"modelId": "de7d3faf-762f-48e0-b3b7-9d0ac3a3fcf3", | |
"contrast": 3.5, | |
"prompt": "an orange cat standing on a blue basketball with the text PAWS", | |
"num_images": 4, | |
"width": 1472, | |
"height": 832, | |
"alchemy": true, | |
"styleUUID": "111dc692-d470-4eec-b791-3475abac4c46", | |
"enhancePrompt": false | |
} | |
' | |
``` | |
### Sample Output [Skip link to Sample Output](https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model\#sample-output) | |
 | |
Leonardo Phoenix with the prompt "an orange cat standing on a blue basketball with the text PAWS" | |
### Required Parameters [Skip link to Required Parameters](https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model\#required-parameters) | |
- **modelId** | |
| Phoenix Model | Model ID | | |
| --- | --- | | |
| Leonardo Phoenix 1.0 | de7d3faf-762f-48e0-b3b7-9d0ac3a3fcf3 | | |
| Leonardo Phoenix 0.9 | 6b645e3a-d64f-4341-a6d8-7a3690fbf042 | | |
- **prompt** \- Text prompt to use for generation. | |
- **contrast** | |
| Contrast | Value | | |
| --- | --- | | |
| Low | 3 | | |
| Medium | 3.5 | | |
| High | 4 | | |
Accepts \[1.0, 1.3, 1.8, 2.5, 3, 3.5, 4, 4.5\]. If alchemy is true, contrast needs to be 2.5 or higher. | |
### Supported Parameters [Skip link to Supported Parameters](https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model\#supported-parameters) | |
- **alchemy** (Generation Mode - Fast / Quality) | |
| Generation Mode | Value | | |
| --- | --- | | |
| Fast | `alchemy:false` | | |
| Quality | `alchemy:true` | | |
Generation Mode uses the alchemy pipeline. | |
- **enhancePrompt** (Prompt Enhance) | |
- For OFF, set to false. | |
- For ON, set to true and do not specify **enhancePromptInstruction**. | |
- For Edit with AI, set to true and specify `enhancePromptInstruction: "INSTRUCTION_AS_STRING"`. | |
- **height** \- Height input resolution. | |
- **num\_images** \- Number of images. | |
- **styleUUID** (Preset Style) | |
| Preset Style | UUID | | |
| --- | --- | | |
| 3D Render | debdf72a-91a4-467b-bf61-cc02bdeb69c6 | | |
| Bokeh | 9fdc5e8c-4d13-49b4-9ce6-5a74cbb19177 | | |
| Cinematic | a5632c7c-ddbb-4e2f-ba34-8456ab3ac436 | | |
| Cinematic Concept | 33abbb99-03b9-4dd7-9761-ee98650b2c88 | | |
| Creative | 6fedbf1f-4a17-45ec-84fb-92fe524a29ef | | |
| Dynamic | 111dc692-d470-4eec-b791-3475abac4c46 | | |
| Fashion | 594c4a08-a522-4e0e-b7ff-e4dac4b6b622 | | |
| Graphic Design Pop Art | 2e74ec31-f3a4-4825-b08b-2894f6d13941 | | |
| Graphic Design Vector | 1fbb6a68-9319-44d2-8d56-2957ca0ece6a | | |
| HDR | 97c20e5c-1af6-4d42-b227-54d03d8f0727 | | |
| Illustration | 645e4195-f63d-4715-a3f2-3fb1e6eb8c70 | | |
| Macro | 30c1d34f-e3a9-479a-b56f-c018bbc9c02a | | |
| Minimalist | cadc8cd6-7838-4c99-b645-df76be8ba8d8 | | |
| Moody | 621e1c9a-6319-4bee-a12d-ae40659162fa | | |
| None | 556c1ee5-ec38-42e8-955a-1e82dad0ffa1 | | |
| Portrait | 8e2bc543-6ee2-45f9-bcd9-594b6ce84dcd | | |
| Pro B&W photography | 22a9a7d2-2166-4d86-80ff-22e2643adbcf | | |
| Pro color photography | 7c3f932b-a572-47cb-9b9b-f20211e63b5b | | |
| Pro film photography | 581ba6d6-5aac-4492-bebe-54c424a0d46e | | |
| Portrait Fashion | 0d34f8e1-46d4-428f-8ddd-4b11811fa7c9 | | |
| Ray Traced | b504f83c-3326-4947-82e1-7fe9e839ec0f | | |
| Sketch (B&W) | be8c6b58-739c-4d44-b9c1-b032ed308b61 | | |
| Sketch (Color) | 093accc3-7633-4ffd-82da-d34000dfc0d6 | | |
| Stock Photo | 5bdc3f2a-1be6-4d1c-8e77-992a30824a2c | | |
| Vibrant | dee282d3-891f-4f73-ba02-7f8131e5541b | | |
- **ultra** (Generation Mode - Ultra) - Set to `true` to turn on ultra. | |
- **width** \- Width input resolution. | |
### Cost [Skip link to Cost](https://docs.leonardo.ai/docs/generate-images-using-leonardo-phoenix-model\#cost) | |
Please refer to the [in-app Pricing Calculator](https://app.leonardo.ai/api-access/pricing-calculator), or use the [Pricing Calculator API](https://docs.leonardo.ai/reference/pricingcalculator) similar to below. | |
```rdmd-code lang- theme-light | |
curl --request POST \ | |
--url https://cloud.leonardo.ai/api/rest/v1/pricing-calculator \ | |
--header 'accept: application/json' \ | |
--header 'authorization: Bearer <YOUR_API_KEY>' \ | |
--header 'content-type: application/json' \ | |
--data ' | |
{ | |
"serviceParams": { | |
"IMAGE_GENERATION": { | |
"isUltra": false, | |
"imageHeight": 832, | |
"imageWidth": 1472, | |
"numImages": 4, | |
"inferenceSteps": 10, | |
"promptMagic": false, | |
"alchemyMode": true, | |
"highResolution": false, | |
"isModelCustom": false, | |
"isSDXL": false, | |
"isPhoenix": true | |
} | |
}, | |
"service": "IMAGE_GENERATION" | |
} | |
' | |
``` | |
> ## 🚧 Caution | |
> | |
> The [in-app Pricing Calculator](https://app.leonardo.ai/api-access/pricing-calculator) does not have a setting for adding image guidance (ControlNets). Please use the [Pricing Calculator API](https://docs.leonardo.ai/reference/pricingcalculator) or refer to the [apiCreditCost](https://docs.leonardo.ai/docs/plan-with-the-pricing-calculator#monitoring-and-tracking-api-credits) in the API response. | |
Updated6 days ago | |
* * * | |
Did this page help you? | |
Yes | |
No | |
🦉 | |
# Recipe Title | |
Recipe Description | |
x | |
``` | |
``` | |
1{"success":true} | |
🦉 | |
# Recipe Title | |
Recipe Description | |
x | |
``` | |
``` | |
1{"success":true} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment