input: 
  from flask import Flask
  import datetime
  
  def current_datetime_api() -> str:
      """ Create a web API using Flask that returns the current date and time in the format 'YYYY-MM-DD HH:MM:SS'.
      >>> current_datetime_api()
      '2023-10-05 14:30:45'
      >>> current_datetime_api()
      '2023-10-06 09:15:30'
      """
      app = Flask(__name__)
  
      @app.route('/datetime')
      def get_datetime():
          return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
      if __name__ == '__main__':
          app.run()
      return "Web API for current date and time created successfully."
  
output:     
      app = Flask(__name__)
  
      @app.route('/datetime')
      def get_datetime():
          return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  
      if __name__ == '__main__':
          app.run()
      return "Web API for current date and time created successfully."
  