input: 
  def current_datetime_api() -> str:
      """
      Create a web API with Python and Flask to give the current date and time.
      
      Example:
      # The API should return a formatted datetime string like "2023-10-05 14:30:45" when accessed via the '/datetime' route.
      """
      from flask import Flask
      import datetime
  
      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 "Flask web API created to return current date and time."
  
output:     from flask import Flask
      import datetime
  
      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 "Flask web API created to return current date and time."