module

This interface has all the APIs used to embed our editing modules in your own application.

createImageFromText

createImageFromText: (appConfig?: TextToImageAppConfig, exportConfig?: ExportOptions, containerConfig?: ContainerConfig): void

All the properties in this object are optional.

Property
Type
Description
appConfig
TextToImageAppConfig
Pass a text prompt to preload in the Generate Image editor
exportConfig
ExportOptions[]
Configure export options. If no export options are specified, the editor falls back to the default layout options.
containerConfig
ContainerConfig
Properties to configure the SDK container

TextToImageAppConfig

TextToImageAppConfig allows you to pass a prompt into the editor, and configure callback functions.

Property
Type
Description
promptText
string
Optional string to launch the Generate Image module with a prompt
callbacks
Callbacks
Callback functions

editImage

editImage: (docConfig: EditImageDocConfig, exportConfig?: ExportOptions, containerConfig?: ContainerConfig): void

The only required property is docConfig.

Property
Type
Description
docConfig
EditImageDocConfig
Pass an asset to preload into the Edit Image module
exportConfig
ExportOptions[]
Configure export options. If no export options are specified, the editor falls back to the default layout options.
containerConfig
ContainerConfig
Properties to configure the SDK container

EditImageDocConfig

Property
Type
Description
asset
Asset
Asset object that contains the base64-encoded image data you want the editor to open.