Navigating Uncertainty: Optimizing API Dependency for Hallucination Reduction in Closed-Book Question Answering