These docs describe the current Dante AI platform. On the earlier platform? Your API reference is api-v2.dante-ai.com/openapi.json, and your key goes in the x-api-key header.
Embedding your agent
Two lines of code, paste them onto your website, your agent appears. No deploy step on your end, no build pipeline, no CDN config.
Open your agent's Publish page, then go to the Install tab โ
Two ways to embed
- Floating AI agent. A circular launcher button appears in the bottom right corner of every page. Visitors click to open. This is what most customers use.
- Iframe embed. Drops the chat into your page as a full-page iframe (ChatGPT-style) or any size you want. Use this for a dedicated /contact page, a help centre, or any standalone chat layout.
Step by step
- Open your agent's Publish page and switch to the Install tab.
- Pick the embed type, Floating or Iframe.
- Add your website's hostname to Allowed domains (e.g.
example.com) so nobody else can run your snippet on their site. - Click Copy embed code.
- Paste the snippet into your website's HTML, right before the closing
</body>tag.
Where to paste it
- Webflow: Project settings, Custom code, Footer code.
- Squarespace: Settings, Advanced, Code injection, Footer.
- WordPress: Use the official Dante AI plugin (see below), or a "Header and Footer Scripts" plugin, or paste into your theme's
footer.php. - Wix: Settings, Custom code, Add custom code, set "Place code in" to "Body end".
- Shopify: Paste the snippet into your theme, usually just before
</body>intheme.liquid. That is the supported path and it works on every plan. - Hand-coded HTML: paste anywhere inside
<body>. The script loads asynchronously, so position doesn't matter.
The official WordPress plugin
If you run WordPress you can use the official Dante AI plugin instead of pasting the snippet. It connects with an API key rather than code, so you never touch your theme files.
Open Integrations in your dashboard and generate a WordPress API key, then paste it into the plugin settings. The key is available on every plan, including Free, and it is scoped to the read-only endpoints the plugin needs, so it cannot change anything in your workspace.
Is it live? Check the status card
The Install tab shows a Live status card right above the snippet so you never have to guess whether the paste worked. It updates the first time a real visitor loads your page with the snippet on it.
- Not detected yet. We haven't seen your AI agent load on a live site. Paste the snippet on your site, open the page, then click Check again (or reload the Install tab).
- Your AI agent is live. The snippet is working on your website. Nothing else to do.
- Detected on a sandbox site. We saw your AI agent load on a preview or sandbox host rather than your real website. Embed it on your real site to go live for your visitors.
Check again re-checks on demand, so you can paste the snippet, switch back to this tab, and confirm it went live without a full page reload.
Updating the snippet
You don't need to update the snippet when you change the agent's appearance, knowledge, or behaviour. Those updates apply automatically the next time a visitor opens the chat. The only times you'll repaste the snippet are after rotating the widget key (Security settings) or switching to a custom domain (Custom domains).
Letting visitors attach a file
Your agent can accept a file from a visitor inside the chat: a screenshot of an error, a photo of a part, a document with the details you need. It is off by default and you turn it on from the Publish page, under the widget settings.
It changes what a first message can carry. Instead of three exchanges working out which product a visitor means, they send you the picture. The attachment stays with the conversation, so it is there when you open the transcript later.
A few things worth knowing before you switch it on:
- It is part of the Advanced plan. There is no add-on for it, so if you are on Free or Starter the switch shows you what it does and what it costs rather than turning on.
- The limit is enforced on our side as well as in the widget, so a visitor cannot send a file to an agent that is not entitled to receive one, whatever the page looks like.
- Attachments count as part of the conversation, not as knowledge. Your agent does not learn from a file a visitor sends: to teach it something, add the file as a knowledge source instead.
On phones the chat opens full screen
When a visitor on a phone taps your launcher, the chat now takes over the whole screen, the way a messaging app does, instead of opening as a small floating card. Nothing to configure and nothing to repaste: it is part of the snippet you already have.
A few things that follow from it, so they don't surprise you when you test on your own phone:
- A close button appears in the top right of the chat header, next to the menu. That is how a visitor gets back to your page, so the launcher button hides itself while the chat is open rather than sitting on top of the message box.
- Your page stops scrolling behind the chat while it is open, and returns to exactly where the visitor left off when they close it.
- The chat respects the notch and the home indicator on phones that have them, and the strips around them are painted in the background colour you picked in Styling.
Tablets and desktops are unchanged: there the chat still opens as the floating panel in the bottom corner, and the launcher stays visible as the way to close it.
Widget not showing up on your site?
The most common cause is a domain that isn't on your allow list. If your widget tries to load from a site that isn't in Allowed domains, it is blocked on purpose so nobody else can run your snippet, and the launcher simply won't appear for visitors.
We make this visible for you: open
Publish, Install and look just under the
Allowed domains box. If we have seen a blocked load attempt,
you'll see a note like "We saw a load attempt from
your-site.com which isn't in your allowed
domains", with a one-click Add button. Click
it, save, and the widget starts working there right away.
?dante-debug=1 to your site's URL to see a small
owner-only message that names the exact domain to add.
Optimisation and caching plugins can break the widget
If the snippet is pasted correctly but the launcher still never
appears, the usual culprit is a performance plugin on your site.
WordPress optimisation and caching plugins "combine", "minify",
"defer", or "delay" JavaScript to speed up page loads. When one of
those features swallows our async loader, embed.js
either never runs or runs out of order, and the widget silently
fails to mount. Nothing in your Dante settings is wrong, the loader
just never got a chance to run.
Symptom. The launcher does not appear on your live site (often only after you installed or enabled a speed plugin), but it works in an incognito window with caching off, or on a copy of the site that does not have the plugin.
Fix. Tell the plugin to leave our loader alone. Exclude the Dante script from JS combine, minify, defer, and delay. The script URL to exclude is:
https://agents.dante-ai.com/embed.js
Most plugins accept a partial match, so just embed.js
or dante on its own works too. Here is where each of
the common plugins keeps that setting:
-
SiteGround Optimizer (SG Optimizer). WordPress
admin, SiteGround Optimizer, Frontend, JavaScript. In the
Combine JavaScript Files and Minify
JavaScript Files options use the "Exclude from JS
combination" / "Exclude from minification" box and add
embed.js. If Defer Render-blocking JavaScript is on, addembed.jsto its exclusion list as well. -
WP Rocket. Settings, WP Rocket, File
Optimization. Add
embed.jsto Excluded JavaScript Files. Then open Delay JavaScript Execution on the same page and addembed.jsto its excluded list (move it out of delay) so the loader is not held back until a visitor interacts with the page. -
Autoptimize. Settings, Autoptimize, JavaScript
Options. Add
embed.jsto Exclude scripts from Autoptimize, which is a comma-separated list, so "Aggregate JS-files" leaves the loader untouched. -
W3 Total Cache (W3TC). Performance, Minify, JS.
Under Minify, add
embed.jsto the Never minify the following JS files list (or turn JS minify off). If you use its defer / non-blocking option, exclude the script there too.
After changing any of these, purge the plugin's cache and reload
your page in a private window. The launcher should return within a
second. The same approach works for any other combine / minify /
defer / delay plugin (LiteSpeed Cache, Perfmatters, Hummingbird and
similar): find its JavaScript exclusion list and add
embed.js.
Widget appears but won't answer
Symptom. The launcher loads and opens and the welcome message shows, but every visitor message gets back "This AI agent is offline at the moment. Please contact the site owner directly for help." instead of a real reply.
Cause. The widget itself is healthy, only the reply step is paused. That wording means the workspace balance reached zero: replies cost credits, and when the monthly allowance plus any earned or purchased credits run out, the AI agent stops generating answers until the next reset or a top-up.
Fix. Confirm it first. Open Billing and read the balance. If it really is at zero you can add the Extra Credits add-on for an immediate top-up, switch the agent to a 1-credit model so each reply costs less, or upgrade the plan for a bigger monthly allowance. See Understanding credits for the full breakdown.
Widget says the agent hit its monthly limit
Symptom. Visitor messages come back as "This agent has reached its monthly credit limit." while the workspace balance is still healthy.
Cause. This is a separate, per-agent ceiling that somebody on your team set, not a billing state. Each AI agent has its own Monthly credit cap, and once this agent's widget replies have used that many credits it refuses new messages until the window resets. The workspace can be full of credits and this agent will still be paused.
Fix. Open Agent settings, Security and change Monthly credit cap for this AI agent. Raise it, or set it to 0 to remove the ceiling entirely. Buying credits does not lift this cap. See Security settings for what else lives on that page.
Trouble pasting? We're here.
If the launcher doesn't appear after pasting, send us your website URL and we'll tell you exactly where to put it.