How to start using our API on one of the embedded models on your site.
To begin using the API with an embedded model:
Import the API as a module.
Create an API instance and pass the DOM id of the iframe containing the embed (web component coming soon).
id
iframe
web component
Wait for the instance to initialize.
Use the available methods to interact with the model.
A new API instance is required for each embedded model.
All API communication is handled using postMessagearrow-up-right events. As a result, all methods return Promises.
postMessage
Errors returned by API methods reject the corresponding Promise. Rejection includes a standardized error format for consistent handling.
Last updated 9 months ago
{ status: "error", error?: string }