Skip to main content
  1. In the bot’s settings, add the target site’s origin under Allowed sites → Allowed origins. For example: https://example.com. Do not include a path.
  2. Enable Publish chatbot and save the settings.
  3. Copy the code shown under Embed on your site.
  4. Paste it just before </body> on the target page.
  5. Open the chat on your site and check a question and answer.
The embed code has this format. Replace BOT_ID with the actual bot ID shown in the dashboard. If you copy the code from the dashboard, no replacement is needed.
The embed code does not contain your Anthropic API key. If your site uses a Content Security Policy (CSP), allow Genkeychat as a script and iframe source in the applicable script-src-elem or script-src directive and in frame-src. Sites using a nonce with 'strict-dynamic' must add the page’s nonce to the embed script too. API requests occur inside the iframe, so you do not need to add Genkeychat to the target site’s connect-src.
Register a public HTTPS origin for your target site. HTTP origins on localhost or 127.0.0.1 are allowed only during local development.

Set the language for each site

The standard embed code uses the Default bot language. To fix the language for a particular page, add data-lang="en" or data-lang="ja".
The selected language applies to that widget’s display and AI answers. Enter the English title, welcome message, and suggested questions in the bot’s settings. Specifying a language in the embed code does not translate your existing text.