TTMSMCPCustomCloudImageAI Class
Base class for the non-visual component that generates and edits images through a cloud image service.
API unit family: TMS.MCP.CloudImageAI
Inherits from: TTMSMCPCloudBase
Implements: ITMSMCPCustomCloudImageAIProperties
Syntax
TTMSMCPCustomCloudImageAI = class(TTMSMCPCloudBase, ITMSMCPCustomCloudImageAIProperties)
Remarks
Configure the key, optionally the model and extra parameters, pick a service, then start an operation. Every operation is asynchronous: the call returns as soon as the request has been handed to a background task, and the outcome arrives later through the image or error event, both of which are raised on the main thread. Only one operation should be in flight per component instance, because each call clears and reuses the same request. Starting an operation without a key raises an exception on the calling thread rather than reporting an error through the event. Descendants publish the settings and events they want to expose at design time; this class keeps them protected.
Properties
| Name | Description |
|---|---|
| Images | Reference images sent together with the prompt when an image is generated. |
Methods
| Name | Description |
|---|---|
| Execute | Starts creating an image from a prompt. |
| RemoveBackground | Starts removing the background of a base64-encoded image. |
| ReplaceBackground | Starts placing the subject of one base64-encoded image onto the background of another. |