
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@imgly/plugin-ai-apps-web
Advanced tools
A plugin for orchestrating all AI generation capabilities in CreativeEditor SDK.
The @imgly/plugin-ai-apps-web
package provides a unified interface for accessing and organizing all AI generation features within the CreativeEditor SDK. It combines image, video, audio, and text generation capabilities into a single cohesive user experience.
npm install @imgly/plugin-ai-apps-web
To use the plugin, import it and configure it with your preferred providers:
import CreativeEditorSDK from '@cesdk/cesdk-js';
import AiApps from '@imgly/plugin-ai-apps-web';
// Import providers from individual AI generation packages
import { AnthropicProvider } from '@imgly/plugin-ai-text-generation-web/anthropic';
import FalAiImage from '@imgly/plugin-ai-image-generation-web/fal-ai';
import FalAiVideo from '@imgly/plugin-ai-video-generation-web/fal-ai';
import ElevenLabs from '@imgly/plugin-ai-audio-generation-web/elevenlabs';
import FalAiSticker from '@imgly/plugin-ai-sticker-generation-web/fal-ai';
// Initialize CreativeEditor SDK
CreativeEditorSDK.create(domElement, {
license: 'your-license-key'
// Other configuration options...
}).then(async (cesdk) => {
// Add the AI Apps plugin
cesdk.addPlugin(
AiApps({
providers: {
// Text generation
text2text: AnthropicProvider({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
// Image generation
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
image2image: FalAiImage.GeminiFlashEdit({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
// Video generation (used in video mode)
text2video: FalAiVideo.MinimaxVideo01Live({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
image2video: FalAiVideo.MinimaxVideo01LiveImageToVideo({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
// Audio generation (used in video mode)
text2speech: ElevenLabs.MonolingualV1({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
text2sound: ElevenLabs.SoundEffects({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
// Sticker generation
text2sticker: FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
})
}
})
);
// Position the AI dock button in the dock order
cesdk.ui.setDockOrder(['ly.img.ai.apps.dock', ...cesdk.ui.getDockOrder()]);
});
The plugin accepts the following configuration options:
Option | Type | Description |
---|---|---|
providers | Providers | Object containing all AI providers to be used |
debug | boolean | Print debug messages |
The providers
object can include the following provider functions:
Provider | Type | Description |
---|---|---|
text2text | Provider<'text'> | Provider for text generation and transformation |
text2image | Provider<'image'> | Provider for text-to-image generation |
image2image | Provider<'image'> | Provider for image-to-image transformation |
text2video | Provider<'video'> | Provider for text-to-video generation (video mode only) |
image2video | Provider<'video'> | Provider for image-to-video generation (video mode only) |
text2speech | Provider<'audio'> | Provider for text-to-speech generation (video mode only) |
text2sound | Provider<'audio'> | Provider for sound effects generation (video mode only) |
text2sticker | Provider<'sticker'> | Provider for sticker generation |
The plugin intelligently selects which providers to use based on the current editor mode:
text2text
, text2image
, image2image
, text2sticker
text2video
, image2video
, text2speech
, text2sound
, text2sticker
You can configure multiple providers for the same generation type by passing an array. When multiple providers are configured, a selection box will be rendered in the AI app interface allowing users to choose between different providers:
import FalAiImage from '@imgly/plugin-ai-image-generation-web/fal-ai';
import OpenAiImage from '@imgly/plugin-ai-image-generation-web/open-ai';
cesdk.addPlugin(
AiApps({
providers: {
// Multiple image providers - selection box will be shown
text2image: [
FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
FalAiImage.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
OpenAiImage.GptImage1.Text2Image({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
})
],
// Other providers...
}
})
);
Pass custom headers and configuration to providers:
cesdk.addPlugin(
AiApps({
providers: {
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
headers: {
'x-client-version': '1.0.0',
'x-request-source': 'cesdk-plugin',
'x-user-id': 'user-123'
},
debug: true
})
},
debug: true
})
);
Providers support configuring default values for their properties. These defaults can be static or dynamic based on context:
cesdk.addPlugin(
AiApps({
providers: {
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
properties: {
// Static default
image_size: { default: 'square_hd' },
// Dynamic default based on locale
style: {
default: (context) => {
return context.locale === 'ja' ? 'anime' : 'realistic';
}
}
}
})
}
})
);
The plugin adds the following UI components to CreativeEditor SDK:
The main entry point for all AI features, accessible from the dock:
ly.img.ai.apps.dock
The plugin shows a card-based interface for different AI capabilities:
To position the AI dock button in your editor's dock, use the setDockOrder
method:
// Add the AI dock component to the beginning of the dock
cesdk.ui.setDockOrder(['ly.img.ai.apps.dock', ...cesdk.ui.getDockOrder()]);
// Or add it at a specific position
const currentOrder = cesdk.ui.getDockOrder();
currentOrder.splice(2, 0, 'ly.img.ai.apps.dock');
cesdk.ui.setDockOrder(currentOrder);
The plugin automatically integrates generated assets into the appropriate asset libraries. For each generation type, both a history asset source and a corresponding asset library entry are automatically created with the same ID:
ly.img.ai.image-generation.history
ly.img.ai.video-generation.history
ly.img.ai.audio-generation.history
ly.img.ai.sticker-generation.history
These asset library entries are automatically configured with:
To add these history sources to CE.SDK's default asset library entries, use the following approach:
// Add AI image history to the default image asset library
const imageEntry = cesdk.ui.getAssetLibraryEntry('ly.img.image');
if (imageEntry != null) {
cesdk.ui.updateAssetLibraryEntry('ly.img.image', {
sourceIds: [...imageEntry.sourceIds, 'ly.img.ai.image-generation.history']
});
}
// Add AI video history to the default video asset library
const videoEntry = cesdk.ui.getAssetLibraryEntry('ly.img.video');
if (videoEntry != null) {
cesdk.ui.updateAssetLibraryEntry('ly.img.video', {
sourceIds: [...videoEntry.sourceIds, 'ly.img.ai.video-generation.history']
});
}
// Add AI audio history to the default audio asset library
const audioEntry = cesdk.ui.getAssetLibraryEntry('ly.img.audio');
if (audioEntry != null) {
cesdk.ui.updateAssetLibraryEntry('ly.img.audio', {
sourceIds: [...audioEntry.sourceIds, 'ly.img.ai.audio-generation.history']
});
}
// Add AI sticker history to the default sticker asset library
const stickerEntry = instance.ui.getAssetLibraryEntry('ly.img.sticker');
if (stickerEntry != null) {
instance.ui.updateAssetLibraryEntry('ly.img.sticker', {
sourceIds: [...stickerEntry.sourceIds, 'ly.img.ai.sticker-generation.history']
});
}
This integration creates a seamless experience where users can easily find and reuse their AI-generated assets alongside other content.
The plugin automatically integrates with the quick actions system, providing context-sensitive AI operations directly in the canvas menu. You need to specify the children with the quick action order:
// Quick actions are automatically registered and will appear in canvas menus
cesdk.ui.setCanvasMenuOrder([
{
id: 'ly.img.ai.text.canvasMenu',
children: [
'ly.img.improve',
'ly.img.fix',
'ly.img.shorter',
'ly.img.longer',
'ly.img.separator',
'ly.img.changeTone',
'ly.img.translate',
'ly.img.separator',
'ly.img.changeTextTo'
]
},
{
id: 'ly.img.ai.image.canvasMenu',
children: [
'ly.img.styleTransfer',
'ly.img.artistTransfer',
'ly.img.separator',
'ly.img.editImage',
'ly.img.swapBackground',
'ly.img.createVariant',
'ly.img.combineImages',
'ly.img.separator',
'ly.img.remixPage',
'ly.img.separator',
'ly.img.createVideo'
]
},
...cesdk.ui.getCanvasMenuOrder()
]);
Quick actions provide:
Enable debug mode to get detailed logging information:
cesdk.addPlugin(
AiApps({
providers: {
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
debug: true // Provider-level debugging
})
},
debug: true // Plugin-level debugging
})
);
The AI Apps plugin acts as an orchestrator that:
initialize
methods are calledThe plugin is fully typed with TypeScript, providing excellent development experience:
import AiApps, { Providers } from '@imgly/plugin-ai-apps-web';
// Strongly typed provider configuration
const providers: Providers = {
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
// TypeScript will enforce correct provider types
};
cesdk.addPlugin(AiApps({ providers }));
This plugin works with the following IMG.LY AI generation packages:
import CreativeEditorSDK from '@cesdk/cesdk-js';
import AiApps from '@imgly/plugin-ai-apps-web';
import FalAiImage from '@imgly/plugin-ai-image-generation-web/fal-ai';
CreativeEditorSDK.create(domElement, {
license: 'your-license-key'
}).then(async (cesdk) => {
cesdk.addPlugin(
AiApps({
providers: {
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
})
}
})
);
cesdk.ui.setDockOrder(['ly.img.ai.apps.dock', ...cesdk.ui.getDockOrder()]);
});
import CreativeEditorSDK from '@cesdk/cesdk-js';
import AiApps from '@imgly/plugin-ai-apps-web';
import FalAiImage from '@imgly/plugin-ai-image-generation-web/fal-ai';
import FalAiVideo from '@imgly/plugin-ai-video-generation-web/fal-ai';
import ElevenLabs from '@imgly/plugin-ai-audio-generation-web/elevenlabs';
import { AnthropicProvider } from '@imgly/plugin-ai-text-generation-web/anthropic';
CreativeEditorSDK.create(domElement, {
license: 'your-license-key',
ui: {
elements: {
panels: {
settings: true
}
}
}
}).then(async (cesdk) => {
cesdk.addPlugin(
AiApps({
providers: {
text2text: AnthropicProvider({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
text2image: FalAiImage.RecraftV3({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
image2image: FalAiImage.GeminiFlashEdit({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
text2video: FalAiVideo.MinimaxVideo01Live({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
image2video: FalAiVideo.MinimaxVideo01LiveImageToVideo({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
text2speech: ElevenLabs.MonolingualV1({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
text2sound: ElevenLabs.SoundEffects({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
})
}
})
);
// Setup dock and canvas menus
cesdk.ui.setDockOrder(['ly.img.ai.apps.dock', ...cesdk.ui.getDockOrder()]);
cesdk.ui.setCanvasMenuOrder([
{
id: 'ly.img.ai.text.canvasMenu',
children: [
'ly.img.improve',
'ly.img.fix',
'ly.img.shorter',
'ly.img.longer',
'ly.img.separator',
'ly.img.changeTone',
'ly.img.translate',
'ly.img.separator',
'ly.img.changeTextTo'
]
},
{
id: 'ly.img.ai.image.canvasMenu',
children: [
'ly.img.styleTransfer',
'ly.img.artistTransfer',
'ly.img.separator',
'ly.img.editImage',
'ly.img.swapBackground',
'ly.img.createVariant',
'ly.img.combineImages',
'ly.img.separator',
'ly.img.remixPage',
'ly.img.separator',
'ly.img.createVideo'
]
},
...cesdk.ui.getCanvasMenuOrder()
]);
});
The AI Apps plugin uses translations from individual AI generation plugins. For customization, refer to the respective translation files:
This plugin is part of the IMG.LY plugin ecosystem for CreativeEditor SDK. Please refer to the license terms in the package.
FAQs
AI apps orchestration plugin for the CE.SDK editor
The npm package @imgly/plugin-ai-apps-web receives a total of 353 weekly downloads. As such, @imgly/plugin-ai-apps-web popularity was classified as not popular.
We found that @imgly/plugin-ai-apps-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.