How can I setup api for mailchimp

If you open the console in the browser by pressing F12, you will see the reason why this does not work in the browser preview.