Typed client API
Use a focused TypeScript-friendly client for messages, follow-up conversations, widget configuration, and localized labels.
Use @openstaticfish/chattybox to own the interface while ChattyBox runs retrieval, source citations, conversations, and scaling. The browser-safe API key identifies your project and can be restricted to approved origins.
Illustrative conversation — not a live chat.
ChattyBox crawls your existing website, documentation, help center, CMS, or knowledge base, then embeds a chatbot that answers from your own published content instead of generic model memory.
Create a ChattyBox project, index your content, and test representative questions.
Create a public widget API key; optionally restrict it to your application origins.
Install @openstaticfish/chattybox and initialize the client with the API URL from the dashboard.
Render answers and cited source URLs in the interface your product needs.
Three-step launch
The SDK is the recommended path for developer-led integrations that need custom UI, application state, or product-specific workflows.
Use these checkpoints to decide whether ChattyBox should sit beside your docs platform, replace a separate assistant, or stay isolated for testing.
Use a focused TypeScript-friendly client for messages, follow-up conversations, widget configuration, and localized labels.
Receive source URLs with each grounded answer and decide exactly how they appear in your interface.
Reuse the same conversationId for follow-ups to include up to 12 recent saved messages as model context, each clipped to 2,000 characters. This is bounded context, not the full transcript; keep IDs isolated between unrelated visitors.
Your application owns rendering and interaction design; ChattyBox operates crawling, retrieval, generation, and scaling.
The package works in current browser and Node.js applications that provide fetch. Use the exact widget API URL and public browser key shown in your project Embed tab.
import { Chattybox } from '@openstaticfish/chattybox';
// Replace these placeholders with the public key and widget API URL from Embed.
const chattybox = new Chattybox({
apiKey: 'YOUR_PUBLIC_WIDGET_KEY',
baseUrl: 'YOUR_WIDGET_API_URL',
});
const answer = await chattybox.sendMessage({
message: 'How do I get started?',
});
console.log(answer.message, answer.sources);It is a client library that provides chat transport and response data without prescribing the interface. Your application renders messages, sources, loading states, and controls.
Yes. Install @openstaticfish/chattybox from npm and use the public API documented on the SDK reference page.
The SDK calls ChattyBox managed infrastructure, which retrieves from your indexed content and returns the generated message with cited source URLs.
Use the SDK when your team owns a custom interface or workflow. Use widget.js when you want ChattyBox to maintain a ready-made, no-build chat UI.
No credit card required
Free tier. No card needed.