input: from typing import Optional
  
  def generate_basic_rest_api(auth_key: str, port: int) -> Optional[dict]:
      """ Generates a basic REST API using Flask, with authentication, endpoints for items,
      and a specified port. Returns a dictionary with API details if the API is successfully
      set up, otherwise returns None.
      >>> generate_basic_rest_api('super-secret-key', 5000)
      {'status': 'success', 'url': 'http://127.0.0.1:5000'}
      >>> generate_basic_rest_api('', 5000)
      None
      >>> generate_basic_rest_api('secret-key', 6000)
      {'status': 'success', 'url': 'http://127.0.0.1:6000'}
      """
output:     if not auth_key:
          return None
  
      from flask import Flask, request, jsonify
  
      app = Flask(__name__)
  
      @app.before_request
      def check_auth():
          if request.headers.get('Authorization') != auth_key:
              return jsonify({"error": "Unauthorized"}), 401
  
      @app.route('/items', methods=['GET'])
      def get_items():
          return jsonify({"items": ["item1", "item2"]})
  
      try:
          app.run(port=port)
          return {'status': 'success', 'url': f'http://127.0.0.1:{port}'}
      except Exception as e:
          return None