AutoFeedback: An LLM-based Framework for Efficient and Accurate API Request Generation