A clean, efficient client-side javascript API.