Document the API in an automated manner, e.g. via jsdoc comments in the source code.
See; http://code.google.com/p/jsdoc-toolkit/