> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genkeychat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed a chat on your site

> Register a target site, add the embed code, and check the chat

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.

```html theme={null}
<script src="https://genkeychat.com/widget.js" data-bot="BOT_ID" defer></script>
```

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`.

<Note>Register a public HTTPS origin for your target site. HTTP origins on localhost or 127.0.0.1 are allowed only during local development.</Note>

## Set the language for each site

The standard embed code uses the [Default bot language](/en/bots/customize). To fix the language for a particular page, add `data-lang="en"` or `data-lang="ja"`.

```html theme={null}
<script src="https://genkeychat.com/widget.js" data-bot="BOT_ID" data-lang="en" defer></script>
```

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.