Building with an AI tool?
Copy a prompt, paste it, done
Works in Lovable, Cursor, v0, Bolt, Windsurf or Claude. Pick what you want, copy the prompt and paste it into your builder. Signed in? Your Developers screen under Account fills in your real staff ID.
Add the Custard AI chat and voice widget to my app.
1. Load this script once on every page, just before </body>: <script src="https://custardai.dev/widget.js" data-agent="YOUR_STAFF_ID" async></script>
In React or Next.js you may instead install @custardai/react and render <CustardWidget agentId="YOUR_STAFF_ID" />.
2. When a user is signed in, call window.CustardWidget?.setContext({ userId, email, fullName }) with their details (flat values only, max 20 keys). Call it again when they sign in or out.
3. Do not show the widget on admin or login pages.
To open the chat from your own button (e.g. a native app header), add data-launcher="false" to the script tag and call window.CustardWidget?.open() (also close() and toggle()).
Do not add any API key in the browser. Guide: https://custardai.dev/docsWriting it yourself?
Pick your stack
Adds the chat and voice button to your site. No key needed; it only shows on the web addresses you allow.
<!-- Paste before </body> -->
<script src="https://custardai.dev/widget.js" data-agent="YOUR_STAFF_ID" async></script>Where are my keys?
- Sign in and open Account, Developers.
- Tap Show API key and Copy. Save it as
CUSTARD_API_KEYon your server. - Copy the staff ID of the staff member who should answer.
- Optional: paste your webhook link, tap Connect, then copy the signing secret as
CUSTARD_SIGNING_SECRET.
Stuck?
Write to hello@custardai.dev and we will help you connect it.