Currently, the only way to call the API from javascript is to use JSONP, however this can be cumbersome and has security issues. Cross origin resource sharing is included in most modern browsers in some form, but needs to be enabled by headers for security reasons.
Similar features have already been enabled in Flash and Silverlight, and doing the same for javascript would be useful.