The TwelveLabs class

The TwelveLabs class is the main entry point for the SDK. It initializes the client and provides access to all the resources.

Methods

The constructor

Description: The constructor creates a new instance of the TwelveLabs class.

Function signature and example:

1constructor({ apiKey }: {
2 apiKey?: string;
3});

Parameters:

NameTypeRequiredDescription
apiKeystringNoYour TwelveLabs API key. If not provided, the TWELVE_LABS_API_KEY environment variable will be used.

Return value: Implicitly returns the newly created instance.