Metered Licensing

Introduction

Metered licensing is a licensing mechanism that can be used alongside existing licensing methods. If you want to be billed based on your usage of Aspose.Slides API features, choose metered licensing.

Apply Metered Keys

  1. Create an instance of the Metered class.

  2. Pass your public and private keys to the setMeteredKey method.

  3. Do some processing (perform tasks).

  4. Call the getConsumptionQuantity method of the Metered class.

You should see the amount/quantity of API requests you have consumed so far.

This sample code shows you how to use metered licensing:

import jpype
import asposeslides

if not jpype.isJVMStarted():
    jpype.startJVM()

from asposeslides.api import Metered

# Create an instance of the Metered class.
metered = Metered()

try:
    # Pass the public and private keys to the Metered object.
    metered.setMeteredKey("<valid public key>", "<valid private key>")

    # Get the consumed quantity before API calls.
    amount_before = Metered.getConsumptionQuantity()
    print("Amount consumed before:", amount_before)

    # Do something with the Aspose.Slides API here.
    # ...

    # Get the consumed quantity after API calls.
    amount_after = Metered.getConsumptionQuantity()
    print("Amount consumed after:", amount_after)
except Exception as error:
    print(error)

FAQ

Can I use a metered license together with a regular one (perpetual or temporary) in the same application?

Yes. Metered is an additional licensing mechanism that can be used alongside existing licensing methods. You choose which mechanism to apply when the application starts.

What exactly counts as consumption under a metered license: operations or files?

API usage is counted, meaning the number of requests or operations. You can obtain the current consumption via consumption-tracking methods.

Is metered suitable for microservices and serverless environments where instances restart frequently?

Yes. Since accounting is done at the API-call level, scenarios with frequent cold starts are compatible, provided there is stable network access for metered calculations.

Does the library’s functionality differ when using a metered license compared to a perpetual license?

No. This is only about the licensing and billing mechanism; the product’s capabilities are the same.

How does metered relate to the trial version and the temporary license?

The trial version has limitations and watermarks, the temporary license removes limitations for 30 days, and metered removes limitations and charges based on actual usage.

Can I control the budget by automatically reacting when a consumption threshold is exceeded?

Yes. A common practice is to periodically read current consumption via tracking methods and implement your own limits or alerts at the application or monitoring level.