Update API.js

Corrected spelling mistakes.