input: Write a function to create a web API with Python and Flask that returns the current date and time in the format "YYYY-MM-DD HH:MM:SS". The function should include setting up the Flask application and defining the route to serve the current date and time.
  assert create_api()
  assert get_datetime().startswith("20")
output: 
  from flask import Flask
  from datetime import datetime
  
  def create_api():
      app = Flask(__name__)
  
      @app.route('/datetime')
      def get_datetime():
          now = datetime.now()
          return now.strftime("%Y-%m-%d %H:%M:%S")
  
      return app
  