Enhancing API Security with AI-Driven Solutions