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:

async retrieve(id: string, options: RequestOptions = {}): Promise<Models.Engine>`
const retrievedEngine = await client.engine.retrieve('pegasus1.1')
console.log(`Author: ${retrievedEngine.author}`);
console.log(`Allowed engine options: ${retrievedEngine.allowedEngineOptions}`);
console.log(`Ready: ${retrievedEngine.ready}`);
console.log(`Finetune: ${retrievedEngine.finetune}`);

Parameters:

NameTypeRequiredDescription
idstringYesThe unique identifier of the engine to retrieve.
optionsRequestOptionsNoAdditional options for the request. Defaults to {}.

Return value: Returns a Promise that resolves to a Models.Engine instance.

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:

async list(options: RequestOptions = {}): Promise<Models.Engine[]>
const engines = await client.engine.list();
engines.forEach((engine, index) => {
  console.log(`Engine ID ${engine.id}:`);
  console.log(`  Author: ${engine.author}`);
  console.log(`  Allowed engine options: ${engine.allowedEngineOptions}`);
  console.log(`  Ready: ${engine.ready}`);
  console.log(`  Finetune: ${engine.finetune}`);

Parameters:

NameTypeRequiredDescription
optionsRequestOptionsNoAdditional options for the request. Defaults to {}.

Return value: Returns a Promise that resolves to an array of Models.Engine instances.

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