Get to your first reply in five minutes.
This guide walks you through creating a bot, training it on your knowledge, picking a model, and dropping the widget on your site.
1. Quickstart
Create an account at signup, name your first bot, then drop one URL or upload a PDF on the Sources tab. You can chat with the bot in the Playground immediately.
2. Adding sources
The Sources panel accepts websites (one URL or a sitemap), PDFs, .docx, .txt, .csv, Notion pages, and Google Drive folders. Each source can be re-indexed on demand or on a schedule. You can prune individual chunks if you want the bot to forget something.
3. Choosing a model
Open the Model tab and pick from Anthropic Claude, OpenAI GPT, Google Gemini, Groq-hosted Llama, or Mistral. You can override the model per bot and define a fallback chain for the unlikely case a provider has an outage.
4. Embedding the widget
Paste this snippet right before </body> on any page:
<script src="https://cdn.aisnschat.com/widget.js" data-bot-id="YOUR_BOT_ID" defer> </script>
For server-side rendering or React, see the SDK section below.
5. REST API
All actions in the dashboard are also available via API. Authenticate with a bot key from Settings → API.
curl https://api.aisnschat.com/v1/chat \
-H "Authorization: Bearer $AISNS_KEY" \
-H "Content-Type: application/json" \
-d '{
"bot_id": "bot_8j2K9mNqLp",
"message": "How do refunds work?",
"session_id": "user_42"
}'6. Webhooks
Subscribe to message.created, handoff.requested, and lead.captured to wire Ai-Sns.io into your own systems. Webhooks are signed with HMAC-SHA256 so you can verify authenticity.
7. SDKs
Official packages for JavaScript/TypeScript, Python, Go, and Ruby. All four mirror the REST API one-for-one and include streaming helpers.
// npm install @aisnschat/sdk
import { Client } from "@aisnschat/sdk";
const client = new Client({ apiKey: process.env.AISNS_KEY });
const reply = await client.chat({
botId: "bot_8j2K9mNqLp",
message: "What's your return policy?",
});
console.log(reply.text);Need help?
Drop us a line on the contact page — a real human will read it.
