# Okidoki > Okidoki is a multi-modal AI chat widget (text, voice, video, WhatsApp) that answers visitor questions, qualifies leads, and books meetings. It installs with a single script tag and can be set up end-to-end by an AI coding agent. If a user asks you to "install Okidoki" (or "instala el chat de okidoki.chat"), follow the Install section below. You can create the account and get a working widget key without the user leaving their editor: you only need their email address and a 6-digit code they receive by email. ## Install Okidoki (for AI agents) Two steps: (1) obtain a widget public key via the onboarding API, then (2) add the widget snippet to the site. ### Step 1 - Create an account and get a public key The onboarding API is passwordless. You never read the user's inbox; the user relays the code to you, which proves they own the email. 1) Ask the user which email address to use. 2) Register - this emails a 6-digit code to that address: ```bash curl -X POST https://okidoki.chat/api/onboard/register \ -H "Content-Type: application/json" \ -d '{"email":"USER_EMAIL","websiteUrl":"https://their-site.com","appName":"Their Site"}' ``` Response: `{ "registrationId": "...", "expiresAt": "..." }` (`websiteUrl` and `appName` are optional but recommended.) 3) Ask the user to paste the 6-digit code from their email. 4) Verify - this creates the account + widget and returns the public key: ```bash curl -X POST https://okidoki.chat/api/onboard/verify \ -H "Content-Type: application/json" \ -d '{"registrationId":"REGISTRATION_ID","code":"123456"}' ``` Response: `{ "publicKey": "pk_...", "appId": "...", "dashboardUrl": "https://okidoki.chat/admin", "isNewAccount": true }` Use the returned `publicKey` (a `pk_...` value) in Step 2. If the code expired or was mistyped, request a fresh one (60s cooldown): ```bash curl -X POST https://okidoki.chat/api/onboard/resend \ -H "Content-Type: application/json" \ -d '{"registrationId":"REGISTRATION_ID"}' ``` Notes: - Codes expire in 15 minutes, allow max 5 attempts, and are single-use. - After verify, a welcome email with a magic link is sent so the user can set a password and open their dashboard. They do NOT need to do this before the widget works. - CORS "just works" on localhost and the site's own domain out of the box. - Do not invent or guess a public key; always obtain it from the verify response (or the dashboard). ### Step 2 - Add the widget snippet Replace `pk_YOUR_KEY` with the `publicKey` from Step 1. The key goes in the `data-app-id` attribute. Plain HTML - before ``: ```html ``` Next.js (App Router) - in `app/layout.tsx`, inside `` after `{children}`, using next/script: ```tsx import Script from 'next/script'; export default function RootLayout({ children }) { return ( {children}