
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@imgly/plugin-ai-sticker-generation-web
Advanced tools
AI sticker generation plugin for the CE.SDK editor
A plugin for integrating AI sticker generation capabilities into CreativeEditor SDK.
The @imgly/plugin-ai-sticker-generation-web package enables users to generate stickers using AI directly within CreativeEditor SDK. This plugin leverages the fal.ai platform to provide high-quality sticker generation from text prompts using optimized icon styles.
Features include:
npm install @imgly/plugin-ai-sticker-generation-web
To use the plugin, import it and configure it with your preferred providers:
import CreativeEditorSDK from '@cesdk/cesdk-js';
import StickerGeneration from '@imgly/plugin-ai-sticker-generation-web';
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 sticker generation plugin with fal.ai provider
cesdk.addPlugin(
StickerGeneration({
// Text-to-sticker provider
text2sticker: FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
headers: {
'x-custom-header': 'value',
'x-client-version': '1.0.0'
},
// Optional: Configure default property values
properties: {
style: { default: 'broken_line' }, // Default icon style for stickers
image_size: { default: 'square' }, // Default size
n_colors: { default: 2 } // Default color count
}
}),
// Optional configuration
debug: false,
dryRun: false
})
);
});
You can configure multiple providers for text-to-sticker generation, and users will see a selection box to choose between them:
import CreativeEditorSDK from '@cesdk/cesdk-js';
import StickerGeneration from '@imgly/plugin-ai-sticker-generation-web';
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 sticker generation plugin with multiple providers
cesdk.addPlugin(
StickerGeneration({
// Multiple text-to-sticker providers
text2sticker: [
FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
headers: {
'x-custom-header': 'value',
'x-client-version': '1.0.0'
}
})
// Add more providers as they become available
],
// Optional configuration
debug: false,
dryRun: false
})
);
});
The plugin comes with pre-configured providers for fal.ai models:
A specialized text-to-sticker model from fal.ai with icon style support optimized for sticker generation:
text2sticker: FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
headers: {
'x-custom-header': 'value',
'x-client-version': '1.0.0'
}
})
Key features:
Available icon styles:
broken_line: Clean broken line stylecolored_outline: Colored outline stylecolored_shapes: Filled colored shapescolored_shapes_gradient: Gradient filled shapesdoodle_fill: Doodle-style filldoodle_offset_fill: Offset doodle filloffset_fill: Offset fill styleoutline: Simple outline styleoutline_gradient: Gradient outlineuneven_fill: Uneven fill styleThe plugin accepts the following configuration options:
| Option | Type | Description | Default |
|---|---|---|---|
text2sticker | Provider | Provider[] | Provider(s) for text-to-sticker generation. When multiple providers are provided, users can select between them | undefined |
debug | boolean | Enable debug logging | false |
dryRun | boolean | Simulate generation without API calls | false |
middleware | Function[] | Array of middleware functions to extend the generation process | undefined |
The middleware option allows you to add pre-processing and post-processing capabilities to the generation process:
import StickerGeneration from '@imgly/plugin-ai-sticker-generation-web';
import FalAiSticker from '@imgly/plugin-ai-sticker-generation-web/fal-ai';
import { loggingMiddleware, rateLimitMiddleware } from '@imgly/plugin-ai-generation-web';
// Create middleware functions
const logging = loggingMiddleware();
const rateLimit = rateLimitMiddleware({
maxRequests: 10,
timeWindowMs: 60000, // 1 minute
onRateLimitExceeded: (input, options, info) => {
console.log(`Rate limit exceeded: ${info.currentCount}/${info.maxRequests}`);
return false; // Reject request
}
});
// Apply middleware to plugin
cesdk.addPlugin(
StickerGeneration({
text2sticker: FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
}),
middleware: [logging, rateLimit] // Apply middleware in order
})
);
Built-in middleware options:
Middleware can suppress default UI feedback behaviors using options.preventDefault():
const customErrorMiddleware = async (input, options, next) => {
try {
return await next(input, options);
} catch (error) {
// Prevent default error notification
options.preventDefault();
// Show custom error notification
options.cesdk?.ui.showNotification({
type: 'error',
message: `Sticker generation failed: ${error.message}`,
action: {
label: 'Try Again',
onClick: () => {/* retry logic */}
}
});
throw error;
}
};
What gets prevented:
What is NOT prevented:
For more details, see the @imgly/plugin-ai-generation-web documentation.
For security reasons, it's recommended to use a proxy server to handle API requests to fal.ai. The proxy URL is required when configuring providers:
text2sticker: FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy',
headers: {
'x-custom-header': 'value',
'x-client-version': '1.0.0'
}
})
The headers option allows you to include custom HTTP headers in all API requests. This is useful for:
You'll need to implement a proxy server that forwards requests to fal.ai and handles authentication.
StickerGeneration(options: PluginConfiguration): EditorPlugin
Creates and returns a plugin that can be added to CreativeEditor SDK.
interface PluginConfiguration {
// Provider(s) for text-to-sticker generation
text2sticker?: AiStickerProvider | AiStickerProvider[];
// Enable debug logging
debug?: boolean;
// Skip actual API calls for testing
dryRun?: boolean;
// Extend the generation process
middleware?: GenerationMiddleware;
}
FalAiSticker.Recraft20b(config: {
proxyUrl: string;
headers?: Record<string, string>;
debug?: boolean;
})
The plugin automatically registers the following UI components:
ly.img.ai.sticker-generationly.img.ai.fal-ai/recraft/v2/text-to-stickerGenerated stickers are automatically stored in asset sources with the following IDs:
fal-ai/recraft/v2/text-to-sticker.historyThe plugin automatically registers a dock component with a sparkle icon that opens the sticker generation panel. To customize the component's position in the dock, use the setDockOrder method:
// Add the AI Sticker component to the beginning of the dock
cesdk.ui.setDockOrder([
'ly.img.ai.sticker-generation.dock',
...cesdk.ui.getDockOrder()
]);
// Or add it at a specific position
const currentOrder = cesdk.ui.getDockOrder();
currentOrder.splice(2, 0, 'ly.img.ai.sticker-generation.dock');
cesdk.ui.setDockOrder(currentOrder);
The sticker generation plugin integrates seamlessly with the AI Apps plugin:
import AIApps from '@imgly/plugin-ai-apps-web';
import FalAiSticker from '@imgly/plugin-ai-sticker-generation-web/fal-ai';
cesdk.addPlugin(
AIApps({
providers: {
// Other providers...
text2sticker: FalAiSticker.Recraft20b({
proxyUrl: 'http://your-proxy-server.com/api/proxy'
})
}
})
);
When integrated with AI Apps, the sticker generation functionality appears in the main AI interface alongside other AI generation capabilities.
For customization and localization, see the translations.json file which contains provider-specific translation keys for sticker generation interfaces.
This plugin is part of the IMG.LY plugin ecosystem for CreativeEditor SDK. Please refer to the license terms in the package.
FAQs
AI sticker generation plugin for the CE.SDK editor
We found that @imgly/plugin-ai-sticker-generation-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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers