Refactor build_choc.sh using global api key