The TwelveLabs class

The TwelveLabs class is the main entry point for the SDK. It initializes the client and provides access to resources for uploading videos, managing indexes, performing searches, creating embeddings, and analyzing videos.

Methods

The initializer

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

Function signature and example:

1def __init__(
2 self,
3 *,
4 api_key: typing.Optional[str] = None,
5 **kwargs,
6)

Parameters:

NameTypeRequiredDescription
api_keytyping.Optional[str]YesYour TwelveLabs API key. If not provided, the TWELVE_LABS_API_KEY environment variable will be used.
**kwargsdictNoAdditional parameters to pass to the base client.

Return value: None. This method initializes the instance.