Add AI chat to your app with a single API call

TL;DR: The aiSTAFF public Bot API provides developers with the same chat engine that provides social channels in a REST call. You send a message and user ID, get an AI response, and the server handles the conversation state, history, and context for you.
Why an API and not another widget
Site widget and social channels cover most businesses. A developer building a product needs something else: software access. The aiSTAFF Bot API exposes the engine behind the aiSTAFF Platform so you can deploy AI chat in your own application, portal, or internal tool. Our automation service helps it build custom.
The thing is, you don't need to build. No agile engineering, no conversation state, no context window juggling, no model provider configuration, no token limit management. You call the endpoint and the response is returned.
What the API exposes
Surface intentionally small:
- Bots. Create and manage AI bots, each with their own business description, knowledge base, tone, language, and greeting or backup messages.
- Chat. Send a message and receive a response as a single JSON response or stream. Pass the user ID and the server will update the conversation with that user, or pass the message ID to be obvious.
- Conversations. Create, list, get history or delete. The server saves and clears message history for you.
- Usage. Read notifications about usage against your limit, tokens consumed, and current period.
- Keys. Generate and spin API keys that are displayed once and discarded.
The server is holding the conversation
The tricky part of the chat function is memory. A naive integration has to store each message, decide how many to send to the model, and fix the context before it is resolved. The aiSTAFF API does this for you. Send the user ID with each message and the server broadcasts the conversation, keeping the most recent history value. The same memory model used by channels is described in conversation memory tiers.
Streaming or single response
For the chat interface, responses that flow verbatim come to life. The API supports streaming mode on the same endpoint, the streaming website widget, covered by Streaming AI chat on your site. For a backup job that needs the entire response at once, a single JSON response is a better fit. You choose per call.
One quota, one engine
API notifications are received from the same subscription pool as your social channels. There is no separate API meter for Messenger, keeping billing simple, with the same single quota model definition single message quota across all channels. Scale the limits with your plan, so higher tiers receive more requests per minute.
Who accesses the API
It is used by three types of builders. An agency that wants to offer white label AI chat to their clients. A SaaS product that needs a helpful in-app assistant. A business with a customized portal that wants the same brain to meet its customers on Instagram. In each case the API is treated as another channel for the same AI brain, a model described in One AI Brain, Five Channels.
Keys and Security
Each request is authenticated with an API key that is displayed once upon creation, stored as a hash, and invalidated if leaked. You can turn the key without interruption. Because the engine runs server-side, your application never has a model provider key or fast logic, keeping your surface small. For a broader view of how aiSTAFF compares to other chatbot stacks, see Chatbot Platforms Comparison.
Where to start
Create a bot, generate a key and send your first message with a user ID. Response, history, and usage tracking return without any additional plumbing on your part. When you want to build a custom integration around it, start with our automation service and for the business case read The Complete Chatbot Guide for Business.
Related reading
- aiSTAFF: One AI Brain Across Channels
- Streaming AI chat on your site
- Embed an AI sales rep with one line of code
- Single message quota on all channels
- AI Chatbot Platforms Comparison
FAQ
Is the conversation history happening to me?
No. Send the user ID with each message and the server saves and clears the history, updating the correct conversation for you.
Can the API stream responses?
Yes. The chat endpoint supports streaming mode for live interfaces and a single JSON response to support.
Is the API measured separately from my channels?
No. API messages originate from the same subscription quota as Messenger, Instagram, WhatsApp, Telegram and the widget.
How is the request authenticated?
With an API key that is displayed once upon creation, it is stored as a hash and cannot be revoked. You can turn the key without interruption.