A non-crappy AJAX API.