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 licensetsx
import {getUsage } from '@remotion/licensing';constusage = awaitgetUsage ({apiKey : 'rm_sec_xxxxx',since :Date .now () - 1000 * 60 * 60 * 24 * 30, // 30 days ago});console .log (usage );/*{"webcodecConversions": {"billable": 10,"development": 5,"failed": 2},"cloudRenders": {"billable": 10,"development": 5,"failed": 2},}*/
Get the current usage of your licensetsx
import {getUsage } from '@remotion/licensing';constusage = awaitgetUsage ({apiKey : 'rm_sec_xxxxx',since :Date .now () - 1000 * 60 * 60 * 24 * 30, // 30 days ago});console .log (usage );/*{"webcodecConversions": {"billable": 10,"development": 5,"failed": 2},"cloudRenders": {"billable": 10,"development": 5,"failed": 2},}*/
API
An object with the following properties:
apiKey
Type: string
Your Remotion secret API 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
).
Return value
An object with the following properties:
webcodecConversions
An object with the following properties:
billable
: The number of billable webcodec conversions.development
: The number of development webcodec conversions (onlocalhost
or other local environments).failed
: The number of failed webcodec conversions (you don't need to pay for them).
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.