Manage engines

The resources.Engine class provides methods to manage the video understanding engines available in your account.

Methods

Retrieve an engine

Description: This method retrieves an engine.

Function signature and example:

retrieve(self, id: str, **kwargs) -> models.Engine
retrieved_engine = client.engine.retrieve(id="pegasus1.1")
print(f"Author: {retrieved_engine.author}")
print(f"Allowed engine options: {retrieved_engine.allowed_engine_options}")
print(f"Ready: {retrieved_engine.ready}")
print(f"Finetune: {retrieved_engine.finetune}")

Parameters:

NameTypeRequiredDescription
idstrYesThe unique identifier of the engine to retrieve.
**kwargs**dictNoAdditional keyword arguments for the request.

Return value: Returns a models.Engine object representing the retrieved video understanding engine.

API Reference: For a description of each field in the request and response, see the Retrieve an engine page.

List engines

Description: This method lists all the video understanding engines that are available in your account.

Function signature and example:

def list(self, **kwargs) -> RootModelList[models.Engine]
engines = client.engine.list()
for i, engine in enumerate(engines, 1):
    print(f"Engine ID: {engine.id}")
    print(f"  Author: {engine.author}")
    print(f"  Allowed Engine Options: {engine.allowed_engine_options}")
    print(f"  Ready: {engine.ready}")
    print(f"  Finetune: {engine.finetune}")

Parameters:

NameTypeRequiredDescription
**kwargs[dict]NoAdditional keyword arguments for the request.

Return value: Returns a RootModelList containing models.Engine objects.

API Reference: For a description of each field in the request and response, see the List engines page.