getUsage()
Allows you to get the current usage of your Remotion license.
This requires your secret key that you can obtain from the remotion.pro dashboard.
You should only call this API from the backend to avoid exposing your secret key to the client.
Get the current usage of your licenseimport {getUsage } from '@remotion/licensing'; constusage = awaitgetUsage ({licenseKey : 'rm_sec_xxxxx',since :Date .now () - 1000 * 60 * 60 * 24 * 30, // 30 days ago });console .log (usage ); /* { "webRenders": { "billable": 10, "development": 5, "failed": 2 }, "cloudRenders": { "billable": 10, "development": 5, "failed": 2 }, } */
API
An object with the following properties:
licenseKeyv4.0.409
Type: string
Your Remotion license key. You can get it from your Remotion.pro dashboard.
since
Type: number
The timestamp since when you want to get the usage.
The default is since the beginning of the current month in UTC.
The lowest timestamp you can use is 90 days ago (Date.now() - 90 * 24 * 60 * 60 * 1000).
apiKey
apiKeydeprecated in v4.0.409
Type: string
Your Remotion secret API key. You can get it from your Remotion.pro dashboard.
Return value
An object with the following properties:
webRendersv4.0.428
An object with the following properties:
billable: The number of billable web renders.development: The number of development web renders (onlocalhostor other local environments).failed: The number of failed web renders (you don't need to pay for them).
webcodecConversions
webcodecConversionsdeprecated - use webRenders instead
Same as webRenders.
cloudRenders
An object with the following properties:
billable: The number of billable cloud renders.development: The number of development cloud renders.failed: The number of failed cloud renders.