We are working on updating our documentation, but I can provide a short summary:
toJson(opt_appId, opt_revision) converts a Realtime model to a JSON representation in the same format as returned by the export REST endpoint (https://developers.google.com/drive/v2/reference/realtime/get). You can upload that JSON to the import REST endpoint (https://developers.google.com/drive/v2/reference/realtime/update) to update an existing Realtime document or create a new document. If you supply opt_appId or opt_revision, they are passed through to the returned JSON. The export REST endpoint supplies these values automatically, but the import endpoint ignores them, so they are optional and purely for your reference.
gapi.drive.realtime.loadFromJson(json) creates a in-memory Realtime document from JSON. The JSON can come either from toJson() or from the export REST endpoint. An in-memory document never communicates with the Realtime server (isInGoogleDrive is always false) so you are responsible for persisting the contents using toJson() and any storage you want (e.g. HTML5 local storage, storage on your server, or anything else which can store JSON).
gapi.drive.realtime.newInMemoryDocument() creates a new blank in-memory document. As with loadFromJson() this in-memory document is not synchronized to Google Drive, so you are responsible for persisting it.
In-memory documents fire event listeners like any other Realtime document and most of th API works normally, including undo/redo. However, there is no collaboration, data is not automatically stored, and some features (such as getCollaborators()) return generic data instead of user-specific data.
We will be releasing additional documentation soon, but this is a supported feature, not an internal API.