Just forgot to include api.js.