class_docstr: The Twelve Labs API client for the Twelve Labs handler.
  This client is used for accessing the Twelve Labs API endpoints.
class_docstr_tok: ["The","Twelve","Labs","API","client","for","the","Twelve","Labs","handler",".","This","client","is","used","for","accessing","the","Twelve","Labs","API","endpoints","."]
docstr: Create an index.
  
  Parameters
  ----------
  index_name : str
      Name of the index to be created.
  
  index_options : List[str]
      List of that specifies how the platform will process the videos uploaded to this index.
  
  engine_id : str, Optional
      ID of the engine. If not provided, the default engine is used.
  
  addons : List[str], Optional
      List of addons that should be enabled for the index.
  
  Returns
  -------
  str
      ID of the created index.
docstr_tok: ["Create","an","index",".","Parameters","--","--","--","--","--","index_name",":","str","Name","of","the","index","to","be","created",".","index_options",":","List","[","str","]","List","of","that","specifies","how","the","platform","will","process","the","videos","uploaded","to","this","index",".","engine_id",":","str",",","Optional","ID","of","the","engine",".","If","not","provided",",","the","default","engine","is","used",".","addons",":","List","[","str","]",",","Optional","List","of","addons","that","should","be","enabled","for","the","index",".","Returns","--","--","--","-","str","ID","of","the","created","index","."]
code: def create_index(
      self,
      index_name: str,
      index_options: List[str],
      engine_id: Optional[str] = None,
      addons: Optional[List[str]] = None,
  ) -> str:
      """
      Create an index.
  
      Parameters
      ----------
      index_name : str
          Name of the index to be created.
  
      index_options : List[str]
          List of that specifies how the platform will process the videos uploaded to this index.
  
      engine_id : str, Optional
          ID of the engine. If not provided, the default engine is used.
  
      addons : List[str], Optional
          List of addons that should be enabled for the index.
  
      Returns
      -------
      str
          ID of the created index.
      """
  
      body = {
          "index_name": index_name,
          "engine_id": engine_id
          if engine_id
          else twelve_labs_handler_config.DEFAULT_ENGINE,
          "index_options": index_options,
          "addons": addons,
      }
  
      result = self._submit_request(
          method="POST",
          endpoint="indexes",
          data=body,
      )
  
      logger.info(f"Index {index_name} successfully created.")
      return result["_id"]
  
file_path: mindsdb/mindsdb/integrations/handlers/twelve_labs_handler/twelve_labs_api_client.py
imports: import time
  import requests
  from typing import Dict, List, Optional
  from requests_toolbelt.multipart.encoder import MultipartEncoder
  from mindsdb.utilities import log
  from mindsdb.integrations.handlers.twelve_labs_handler.settings import twelve_labs_handler_config
label_desc: Use image node_id 2 for calling the TwelveLabsAPIClient obj's underlying member method code with example usage: obj.create_index(index_name, index_options, engine_id, addons) and returns: result