class_docstr: This integration seamlessly combines MindsDB and Leonardo AI to create a powerful
  AI-driven solution for creative content generation.
  
  Content Generation with Leonardo AI: Harness the power of advanced generative
  models for creative content production. From realistic images to artistic text, Leonardo
  AI opens up new possibilities for content creators.
class_docstr_tok: ["This","integration","seamlessly","combines","MindsDB","and","Leonardo","AI","to","create","a","powerful","AI-driven","solution","for","creative","content","generation",".","Content","Generation","with","Leonardo","AI",":","Harness","the","power","of","advanced","generative","models","for","creative","content","production",".","From","realistic","images","to","artistic","text",",","Leonardo","AI","opens","up","new","possibilities","for","content","creators","."]
docstr: Returns a list of available model based on the API key provided
docstr_tok: ["Returns","a","list","of","available","model","based","on","the","API","key","provided"]
code: def _get_platform_model(self, args):
      """
      Returns a list of available model based on the API key provided
      """
      model_ids = []
  
      args = self.model_storage.json_get("args")
      api_key = self._get_leonardo_api_key(args, self.engine_storage)
  
      self.connection = requests.get(
          "https://cloud.leonardo.ai/api/rest/v1/platformModels",
          headers={
              "accept": "application/json",
              "authorization": f"Bearer {api_key}",
          },
      )
  
      models = self.connection.json()
  
      # extract the model ids from the response
      model_ids = [model["id"] for model in models["custom_models"]]
  
      return model_ids
  
file_path: mindsdb/mindsdb/integrations/handlers/leonardoai_handler/leonardo_ai_handler.py
imports: import os
  import requests
  import time
  from typing import Dict, Optional
  from mindsdb.integrations.libs.llm_utils import get_completed_prompts
  import pandas
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.utilities import log
  from mindsdb.interfaces.storage.model_fs import HandlerStorage
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 5 for calling the LeonardoAIHandler obj's underlying member method code with example usage: obj._get_platform_model(args) and returns: model_ids