Added client-side script for API init