Install vapi and improve API generation logic