input: def get_current_datetime_api():
      """
      Create a web API using Python and Flask to provide the current date and time.
      The API should have a route '/datetime' that returns the current date and time 
      formatted as 'YYYY-MM-DD HH:MM:SS'.
  
      >>> # Example API test using Flask's built-in test client
      >>> 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")
      >>> with app.test_client() as client:
      ...     response = client.get('/datetime')
      ...     assert response.status_code == 200
      ...     assert len(response.data.decode()) == 19  # YYYY-MM-DD HH:MM:SS
      True
      """
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")