I was looking for something similar to docstrings in Python, to make an API
static html documentation for

JSDoc seems to fill the bill,
and generates an API documentation similar to what I would get with JavaDoc
or Epydoc.

See an example

It is also used by tools like

(Post originally written by Tarek Ziadé on the old Nuxeo blogs.)