Generate api.js to tie it all together