Quick Start
Add two snippets before your closing </body> tag β that's all you need:
<script>
window.JamiiAIWidget = {
apiUrl: "https://api.jamiiai.com"
};
</script>
<script src="https://cdn.jamiiai.com/widget/jamiiai-widget.js"></script>
A floating chat button appears in the bottom-right corner of your page. The widget auto-injects its own CSS β no extra stylesheet needed.
How It Works
The chatbot widget follows a simple flow:
- Click the floating chat button to open the panel
- Sign in with your email (username) and secret answer
- Chat with the AI assistant in real time
- Reset the conversation at any time with the β» button
- Logout to clear the session (token stored in
sessionStorage)
The widget is fully self-contained β a single JavaScript file with built-in styles, i18n, authentication, and chat functionality. On the Pro plan it provides a simple chat interface using three core endpoints. On the Enterprise plan it unlocks a full multi-modality experience with 82 endpoints across 15 modalities β including code generation, image & video analysis, voice, document generation, knowledge base, and more.
Configuration Options
All options are set on window.JamiiAIWidget before loading the script:
| Option | Type | Default | Description |
|---|---|---|---|
apiUrl | string | "" | Required. Your Jamii AI API base URL |
lang | string | "en" | "en" or "fr" |
position | string | "bottom-right" | "bottom-right" or "bottom-left" |
plan | string | "pro" | "pro" or "enterprise" |
theme | object | {} | Custom colours (Enterprise only) |
branding | object | {} | Custom branding (Enterprise only) |
Theme Options Enterprise
Enterprise customers can fully customise the widget's visual appearance:
| Property | Type | Default | Description |
|---|---|---|---|
primaryColor | string | "#7c3aed" | Buttons, user bubbles, accents |
accentColor | string | "#22d3ee" | Header gradient secondary colour |
fontFamily | string | "'Inter', system-ui, sans-serif" | Widget font stack |
window.JamiiAIWidget = {
apiUrl: "https://api.jamiiai.com",
plan: "enterprise",
theme: {
primaryColor: "#0066ff",
accentColor: "#00ccaa",
fontFamily: "'Poppins', sans-serif"
}
};
Branding Options Enterprise
Enterprise users can white-label the widget with their own branding:
| Property | Type | Default | Description |
|---|---|---|---|
title | string | null | Header title text |
subtitle | string | null | Header subtitle text |
logo | string | null | Custom SVG logo markup |
showPoweredBy | boolean | false | Show/hide "Powered by Jamii AI" |
branding: {
title: "Acme Support",
subtitle: "We're here to help",
logo: '<svg viewBox="0 0 32 32">...</svg>',
showPoweredBy: false
}
Plan Comparison
| Feature | Pro | Enterprise |
|---|---|---|
| Embeddable chatbot widget | β | β |
| Bilingual support (EN / FR) | β | β |
| Login / Chat / Reset flow | β | β |
| Mobile responsive | β | β |
| Position customisation | β | β |
| "Powered by Jamii AI" badge | Required | Optional |
| Custom branding (title, logo) | β | β |
| Custom theme colours | β | β |
| White-label mode | β | β |
| Multi-Modality (Enterprise Only) | ||
| Code generation, review & refactor | β | β |
| Text AI (translate, summarize, sentiment, extract) | β | β |
| Image generation & description | β | β |
| Voice (speech-to-text, text-to-speech, audio chat) | β | β |
| Video transcription & description | β | β |
| Document generation (Word, PowerPoint, PDF) | β | β |
| Database natural-language queries | β | β |
| Web page summarisation | β | β |
| African-language AI (chat, translate, detect) | β | β |
| Africa Life (agriculture, education, legal) | β | β |
| Africa Culture (proverbs, storytelling) | β | β |
| AI Agent (autonomous task execution) | β | β |
| Embeddings & memory (store / recall / clear) | β | β |
| Knowledge Base (ingest, query, manage) | β | β |
| File upload & download | β | β |
| Server-Sent Events (SSE) streaming | β | β |
Example β Pro Plan (Minimal)
<script>
window.JamiiAIWidget = {
apiUrl: "https://api.jamiiai.com",
lang: "en"
};
</script>
<script src="https://cdn.jamiiai.com/widget/jamiiai-widget.js"></script>
Example β Pro Plan (French, Left-Positioned)
<script>
window.JamiiAIWidget = {
apiUrl: "https://api.jamiiai.com",
lang: "fr",
position: "bottom-left"
};
</script>
<script src="https://cdn.jamiiai.com/widget/jamiiai-widget.js"></script>
Example β Enterprise (White-Label)
<script>
window.JamiiAIWidget = {
apiUrl: "https://api.yourcompany.com",
plan: "enterprise",
lang: "fr",
position: "bottom-left",
theme: {
primaryColor: "#0066ff",
accentColor: "#00ccaa",
fontFamily: "'Poppins', sans-serif"
},
branding: {
title: "Acme Support",
subtitle: "We're here to help",
logo: '<svg viewBox="0 0 32 32"><circle cx="16" cy="16" r="14" fill="#0066ff"/><text x="16" y="21" text-anchor="middle" fill="#fff" font-size="14" font-weight="bold">A</text></svg>',
showPoweredBy: false
}
};
</script>
<script src="https://cdn.jamiiai.com/widget/jamiiai-widget.js"></script>
Self-Hosting
Download jamiiai-widget.js and serve it from your own domain:
<script>
window.JamiiAIWidget = {
apiUrl: "https://api.jamiiai.com"
};
</script>
<script src="/assets/jamiiai-widget.js"></script>
An optional standalone CSS file (jamiiai-widget.css) is also provided for customers who prefer to host styles separately. The JS file auto-injects styles by default, so the CSS file is not required.
Account Creation & Subscription
Before using the chatbot widget, users must create an account and subscribe to a plan. The website provides a signup form that collects:
- Full name
- Email (also used as the username β the part before
@) - Phone
- Secret question & answer (used for widget login)
After signup the user is redirected to Stripe Checkout to choose a plan (Starter $19/mo, Pro $49/mo, Enterprise $199/mo). On successful payment the subscription is recorded automatically via webhook.
Relevant endpoints
| Method | Path | Description |
|---|---|---|
POST | /auth/signup | Create a new customer account |
POST | /auth/subscribe | Create a Stripe Checkout session |
POST | /auth/stripe-webhook | Handle Stripe payment events |
GET | /auth/stripe-key | Retrieve the Stripe publishable key |
API Endpoints Used
On the Pro plan the widget uses three core endpoints. On the Enterprise plan the widget has access to 82 endpoints across 15 modalities β the core endpoints below plus those listed in the modality table.
Authenticate a user with their email (username) and secret answer.
Request
{
"username": "john",
"secret_answer": "my-secret"
}
Response
{
"access_token": "eyJhbGciOi...",
"token_type": "bearer"
}
Send a chat message and receive an AI response.
Request
{
"message": "What can you do?"
}
Response
{
"response": "I can help you with..."
}
Reset the conversation history and start fresh.
Response
{
"message": "Chat reset successfully"
}
Enterprise Modality Endpoints
Enterprise users have a modality selector bar in the widget giving access to all of the following:
| Modality | Actions | Endpoints |
|---|---|---|
| Chat | Chat, Stream | /chat, /chat/stream |
| Code | Generate, Review, Explain, Refactor | /code/generate, /code/review, /code/explain, /code/refactor |
| Text AI | Translate, Summarize, Sentiment, Extract | /text/translate, /text/summarize, /text/sentiment, /text/extract |
| Web | Summarize URL | /web/summarize |
| Database | Query | /db/chat |
| Africa Lang | Chat, Translate, Detect Language | /africa/chat, /africa/translate, /africa/detect-language |
| Africa Life | Agriculture, Education, Legal | /africa/agriculture/ask, /africa/education/ask, /africa/legal/ask |
| Africa Culture | Proverbs, Storytelling | /africa/proverbs/get, /africa/storytelling/tell |
| Agent | Task | /agent/task |
| Memory | Store, Recall, Clear | /memory/store, /memory/recall, /memory/clear |
| Knowledge Base | Ingest, Ingest URL, Query, List, Clear | /kb/ingest, /kb/ingest-url, /kb/query, /kb/list, /kb/clear |
| Image | Describe, Q&A, Generate | /image/image-to-text, /image/image-to-answer, /image/text-to-image |
| Document | Word, PowerPoint, PDF | /document/text-to-word, /document/text-to-powerpoint, /document/text-to-pdf |
| Voice | SpeechβText, TextβSpeech, Audio Chat | /voice/speech-to-text, /voice/text-to-speech, /voice/audio-to-audio |
| Video | Transcribe, Describe | /video/video-to-text, /video/video-to-description |
Authentication Flow
- User clicks the floating chat button
- A login form requests email (username) and secret answer
- Credentials are sent to
/auth/customer/login, which returns a JWT - The JWT is stored in
sessionStorage(cleared on logout or tab close) - All subsequent API calls include the token as
Authorization: Bearer - On a 401 response (expired token), the user is returned to the login form
Browser Support
| Browser | Minimum Version |
|---|---|
| Chrome | 60+ |
| Firefox | 55+ |
| Safari | 12+ |
| Edge | 79+ |
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Chat button doesn't appear | Script not loaded | Verify the <script> tag path loads without a 404 |
| "API URL not configured" error | Missing apiUrl | Set apiUrl in window.JamiiAIWidget before loading the script |
| "Cannot reach the server" | CORS or network issue | Ensure your API allows requests from the embedding domain |
| Login fails with valid credentials | Wrong endpoint | Confirm your API has the /auth/customer/login endpoint |
| Widget styles conflict with page | CSS specificity clash | All widget classes use the jcb- prefix β no collisions expected |