Demos
AI Design Generation
Generate designs using AI with a custom side panel for prompt input and provider selection
This feature is experimental.
Use the Polotno AI API to generate complete designs from text prompts. This demo shows how to build a custom side panel that integrates with the AI design generation endpoint.
Features
- Text prompt input — describe the design you want
- AI provider selection — choose between Gemini, Anthropic, or OpenAI
- Output mode — generate as Polotno JSON (full design) or SVG element
How it works
- User enters a design prompt in the custom AI Design side panel
- Selects an AI provider and output mode (JSON or SVG)
- The app sends a POST request to the Polotno AI API
- In JSON mode, the response is loaded via
store.loadJSON()replacing the current design - In SVG mode, the SVG is added as an element on the current page
API
The demo uses the AI design creation endpoint:
POST https://api.polotno.com/api/ai/design/create?KEY=<your-api-key>Request body:
{
"prompt": "A business card with blue gradient",
"provider": "gemini",
"type": "json"
}Each AI design generation request is billed at $0.20 per design