In Settings → Website → Configuration → AI tools section, select your AI system (OpenAI or OpenRouter), enter your API key, set maximum tokens and choose your preferred AI model.
Click the “Edit” button to open the Website Editor Sidebar.
Click AI Generated to view the Add Snippet Dialog.
Click Generate with AI to open the Generate Snippet with AI dialog box.
Enter the snippet name and prompt, and click Generate.
You can view the newly created snippet in the Add Snippet dialog box.
Instantly generate custom website snippets from text prompts using OpenAI or OpenRouter.
Create, preview, and insert AI-generated snippets directly within Odoo’s website editor.