Skip to main content

registerUsageEvent()

Registers a usage point for your Remotion license.
Allows for accurate and up to date reporting and to track your usage on the Remotion dashboard.

Register a usage point
import {registerUsageEvent} from '@remotion/licensing'; await registerUsageEvent({ licenseKey: 'rm_pub_xxxxx', event: 'cloud-render', host: 'https://myapp.com', succeeded: true, });

API​

An object with the following properties:

licenseKeyv4.0.409​

Type: string

Your Remotion public API key. You can get it from your Remotion.pro dashboard.

event​

Type: string

The event you want to register. This can be one of the following:

  • web-render
  • cloud-render
  • webcodec-conversion (deprecated, use web-render instead)

host​

The domain at here you host your app.
This should be the value of what window.location.origin evaluates to on your frontend.
If the host is localhost or similar, it will be registered as non-billable.

succeeded​

Whether the event was successful or not.
If the event was not successful, it will be registered as a non-billable event.

idempotencyKeyv4.0.533​

Optional, type: string (1–255 characters).

A key is generated automatically for each call and reused across network retries to prevent duplicate usage points. You do not need to supply one.

If you call registerUsageEvent() more than once for the same event, pass the same key to each call. Keys are scoped to your project; a repeated key returns the original result without recording another usage point. Use a different key for each new event.

Return value​

A promise that resolves when the event was successfully registered.

The resolved object contains two properties:

billable​

Whether this was an event that should be billed.

classification​

Either, "billable", "development" or "failed".
You do not have to pay for failed renders or renders doing development.

Compatibility​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

See also​