Plan with the Pricing Calculator

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.

Pricing Calculator for Production API

Pricing Calculator for Production API

πŸ“˜

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.

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

Request4 images, 512 x 5124 images, 1024 x 1024
SDXL Finetune Model + Alchemy v2 (Leonardo Diffusion XL)24 credits66 credits
PhotoReal v1 + Alchemy v123 credits63 credits
SD Finetune Model + Alchemy v1 (DreamShaper v7)16 credits44 credits

SD 1.5 and SD 2.1

Request4 images, 512 x 5124 images, 1024 x 1024
Stable Diffusion 1.57 credits12 credits
Stable Diffusion 2.17 credits12 credits
Stable Diffusion 1.5 + PM v27 credits12 credits
Stable Diffusion 2.1 + PM v27 credits12 credits
Stable Diffusion 1.5 + PM v3 + Alchemy24 credits63 credits
Stable Diffusion 2.1 + PM v3 + Alchemy24 credits63 credits

Fixed Costs

RequestAPI Credit Cost
Upscales15 credits
Unzooms15 credits
Remove Background5 credits
Motion45 credits
3D Model Texturing150 credits
3D Texturing Preview30 credits
Model Training (512px)750 credits
Model Training (768px)1500 credits

Realtime Canvas (LCM Generations)

Credits will increase based on image dimensions

Request512x5121024x1024
LCM generation1 credit4 credits
Instant Refine1 credit4 credits
Inpainting1 credit4 credits
Alchemy Upscale8 credits8 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 and subscriptionTokens
  • The Remaining Credits seen in your API tab under Usage will be a combination of apiPaidTokens and apiSubscriptionTokens.

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.