docstr: Delete an API.
  
  Args:
      api_name: Name of the API to delete.
      keep_cache: Whether to retain the cached data for this API.
docstr_tok: ["Delete","an","API",".","Args",":","api_name",":","Name","of","the","API","to","delete",".","keep_cache",":","Whether","to","retain","the","cached","data","for","this","API","."]
code: def delete(self, api_name: str, keep_cache: bool = False):
      """
      Delete an API.
  
      Args:
          api_name: Name of the API to delete.
          keep_cache: Whether to retain the cached data for this API.
      """
      args = [
          "delete",
          api_name,
          "--env",
          self.env_name,
          "--force",
          "-o",
          "json",
      ]
  
      if keep_cache:
          args.append("--keep-cache")
  
      run_cli(args, hide_output=True)
  
file_path: cortex/python/client/cortex/client.py
imports: import json
  import os
  import shutil
  import time
  import yaml
  from typing import List, Dict, Any
  from cortex import util
  from cortex.binary import run_cli
  from cortex.telemetry import sentry_wrapper
label_desc: Use image node_id 8 for calling the Client obj's underlying member method code with example usage: obj.delete(api_name, keep_cache) without return types