Build chatbots, push training data, and chat — all over a simple REST API.
Create an API key in your dashboard and send it with every request as a Bearer token. Keys are shown once and stored hashed — keep them secret and never use them in browser code.
Authorization: Bearer av_live_your_key_hereBase URL: https://ansarivibe.com/api/v1. All requests and responses are JSON. Errors return {"error": {"message": "..."}} with an appropriate HTTP status (401 unauthorized, 404 not found, 429 rate/quota limit).
/api/v1/meReturns your account, plan limits, and current usage.
curl https://ansarivibe.com/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"/api/v1/botsList all your bots.
/api/v1/botsCreate a bot. Fields: name (required), description, system_prompt, model, temperature (0–2), welcome_message, primary_color, allowed_domains.
curl -X POST https://ansarivibe.com/api/v1/bots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Bot",
"system_prompt": "You are a helpful support agent for Acme Inc.",
"model": "gpt-4o-mini",
"temperature": 0.7
}'/api/v1/bots/:bot_idFetch a single bot by its id (e.g. bot_a1b2c3…).
/api/v1/bots/:bot_idUpdate any bot fields (same fields as create; all optional).
/api/v1/bots/:bot_idDelete a bot and all its training data & conversations. Irreversible.
/api/v1/bots/:bot_id/trainingList training sources for a bot.
/api/v1/bots/:bot_id/trainingAdd training data. Content is automatically chunked, embedded, and indexed. Three types:
# Plain text
{"type": "text", "title": "Refund policy", "content": "We offer refunds within 30 days..."}
# FAQ pair
{"type": "faq", "question": "Do you ship worldwide?", "answer": "Yes, to over 90 countries."}
# Crawl a website (fetches the page + a few linked pages)
{"type": "url", "url": "https://your-website.com"}/api/v1/bots/:bot_id/training/:source_idRemove a training source and its indexed chunks.
/api/v1/bots/:bot_id/chatSend a message and get the bot's reply. Pass the same session_id (8–64 chars, your choice) to continue a conversation with memory; omit it to start a new one — the response returns the id to reuse.
curl -X POST https://ansarivibe.com/api/v1/bots/bot_a1b2c3/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "What is your refund policy?", "session_id": "customer-42"}'
# Response
{
"reply": "We offer a full refund within 30 days of purchase...",
"session_id": "customer-42",
"bot_id": "bot_a1b2c3"
}No code required — drop this into any page:
<script src="https://ansarivibe.com/widget.js" data-bot-id="bot_a1b2c3" defer></script>Optional: data-color="#0ea5e9" and data-position="left". Restrict which sites can use your bot via Allowed domains in the bot settings.
/api/v1/me.429.