Not sure I understand the connection between Javascript, AI and APIs. I've found Javascript SPAs often have the best APIs.