I noticed that Google accepts transliteration and IME requests in any language through the url:
https://inputtools.google.com/request?text=$&itc=$&num=$\
Whatever. I created my own plugin that uses it for Chinese, and can be extended easily: https://bitbucket.org/purohit/jquery.intlkeyboard.js.