Plan with the Pricing Calculator
Pricing Calculator on the Web App
The Pricing Calculator helps you plan out how many API credits different generations use. You can use it to test out various configurations and see how many API credits might be consumed.
In the example below, we use the following settings:
- Number of images = 4
- Image Dimensions = 512 x 512
- Step Count = 10
This results in a cost of 7 API credits.
Tip
The cost of generating 1 image versus multiple images may be the same. You can leverage this in your design. For example, if you notice that your end users are regenerating multiple times, you may consider increasing the Number of Images parameter and offer them a selection of images upfront.
Pricing Calculator on the API
The Pricing Calculator is also available on the API: Calculating API Cost.
The use cases include:
- Programmatically getting API credit cost for a list of settings
- Checking the API credit cost for settings that don't appear yet on the web app
Although the Pricing Calculator API can be used interactively within your web app, this endpoint will contribute to your total number of requests. For more information on default rate limits, see API Rate Limits. To avoid rate limiting, the best practice is to keep a copy of the API credit cost in your own database if you'd like use this information within your app.
Estimated Pricing Table
Caution
Refer to the table below for an estimate of credit costs. To confirm the cost, do a test request and check the Pricing Calculator and apiCreditCost parameter in the response.
SDXL Finetuned Model, PhotoReal v1, and SD Finetuned Model
Request | 4 images, 512 x 512 | 4 images, 1024 x 1024 |
---|---|---|
Lighting SDXL Finetune Model + Alchemy v2 (Leonardo Lightning XL) | 15 credits | 40 credits |
SDXL Finetune Model + Alchemy v2 (Leonardo Diffusion XL) | 24 credits | 66 credits |
PhotoReal v1 + Alchemy v1 | 23 credits | 63 credits |
SD Finetune Model + Alchemy v1 (DreamShaper v7) | 16 credits | 44 credits |
SD 1.5 and SD 2.1
Request | 4 images, 512 x 512 | 4 images, 1024 x 1024 |
---|---|---|
Stable Diffusion 1.5 | 7 credits | 12 credits |
Stable Diffusion 2.1 | 7 credits | 12 credits |
Stable Diffusion 1.5 + PM v2 | 7 credits | 12 credits |
Stable Diffusion 2.1 + PM v2 | 7 credits | 12 credits |
Stable Diffusion 1.5 + PM v3 + Alchemy | 24 credits | 63 credits |
Stable Diffusion 2.1 + PM v3 + Alchemy | 24 credits | 63 credits |
Fixed Costs
Request | API Credit Cost |
---|---|
Upscales (Creative Upscale) | 15 credits |
Unzooms | 15 credits |
Remove Background | 5 credits |
Motion | 45 credits |
3D Model Texturing | 150 credits |
3D Texturing Preview | 30 credits |
Model Training (512px) | 750 credits |
Model Training (768px) | 1500 credits |
For Universal Upscale, see here.
Realtime Canvas (LCM Generations)
Credits will increase based on image dimensions
Request | 512x512 | 1024x1024 |
---|---|---|
LCM generation | 1 credit | 4 credits |
Instant Refine | 1 credit | 4 credits |
Inpainting | 1 credit | 4 credits |
Alchemy Upscale | 8 credits | 8 credits |
Monitoring and Tracking API Credits
The Create a Generation of Images API endpoint returns apiCreditCost
in the response. You can use this to monitor and track your API credits usage.
Sample Response:
{
"sdGenerationJob": {
"generationId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"apiCreditCost": 11
}
}
On the Leonardo web app, you can also observe the changes in your API credits on the API Access Page.
If you need help with budgeting or would like to learn more about our Custom API plans, please contact us.
Check remaining API Credits and Web Tokens
Use the Get User API endpoint to view your remaining API credits. This can be used to check how many credits you still have and/or set up alerting.
Sample Response:
{
"user_details": [
{
"user": {
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"username": <YOUR_USERNAME>
},
"tokenRenewalDate": null,
"paidTokens": 38500,
"subscriptionTokens": 1005,
"subscriptionGptTokens": 1000,
"subscriptionModelTokens": 5,
"apiConcurrencySlots": 5,
"apiPaidTokens": 45677,
"apiSubscriptionTokens": 13,
"apiPlanTokenRenewalDate": null
}
]
}
Tip
- The Remaining Web Tokens seen in your top left hand corner will be a combination of
paidTokens
andsubscriptionTokens
- The Remaining Credits seen in your API tab under Usage will be a combination of
apiPaidTokens
andapiSubscriptionTokens
.
Web Tokens
From the example above:
"paidTokens": 38500,
"subscriptionTokens": 1005,
38,500 + 1005 = 39,505 Remaining Web Tokens as shown in the top left hand of your account.
API Credits
From the example above:
"apiPaidTokens": 45677,
"apiSubscriptionTokens": 13,
45,677+13 = 45,690 Remaining Credits as shown in the API Usage tab below.
If you would like to increase your concurrency or increase your monthly credit limit, or learn more about our Custom API plans, please contact us.
Updated 4 months ago