Put the bot inside your own app, backend or internal tool: start conversations, send messages, upload attachments.
The REST API is for putting your bot inside your own product: your mobile app, your backend, or an internal tool. If all you want is a chat bubble on your website, you do not need this page at all, the snippet handles everything for you.
Base URL https://equilai.ai/api/chat. Create an API key in Dashboard → API, send it as an x-api-key header (or in the JSON body as apiKey), and keep it on your server, never in browser code. API access must be enabled on your plan. See Authentication →
Endpoint 1
Look up which bot your API key belongs to, with its id and label, so you know exactly which bot you are integrating. Each key maps to one bot.
Request
GET https://equilai.ai/api/chat/bots
x-api-key: YOUR_API_KEYResponse
{
"bots": [
{
"id": "019ec65b-f266-7e44-849c-d8ed300802e4",
"name": "Aria",
"label": "Production support bot"
}
]
}Endpoint 2
Create a conversation session. Returns a conversationId to pass with every message. Nothing is stored until the first message is sent, so idle sessions don't count against your monthly limit.
Request
POST https://equilai.ai/api/chat/start
Content-Type: application/json
{
"apiKey": "YOUR_API_KEY"
}Response
{
"message": "Successfully started a new conversation",
"conversationId": "5691c459..."
}Endpoint 3
Send a user message and receive the AI reply in response. Pass the same apiKey and the conversationId from the start call. A message can be up to 2,000 characters; a longer one is refused with a 400. attachmentIds is optional and references files uploaded via the endpoint below (up to 4 per message); a message may also be attachments-only with an empty message.
Request
POST https://equilai.ai/api/chat/bot
Content-Type: application/json
{
"apiKey": "YOUR_API_KEY",
"conversationId": "5691c459...",
"message": "What is on this receipt?",
"attachmentIds": ["0197b1c2-..."]
}Response
{
"response": "We're open Monday to Friday, 9 am to 6 pm."
}Endpoint 4
Upload an image or PDF (max 10 MB) as multipart/form-data, then pass the returned id in the next message's attachmentIds. The bot reads images directly (its model supports vision) and extracts text from PDFs. Files are removed after 7 days. When the bot has PII redaction on, a PDF is kept only as its redacted text: the original file is not stored, so url is null and originalDiscarded is true.
Request
POST https://equilai.ai/api/chat/upload
Content-Type: multipart/form-data
x-api-key: YOUR_API_KEY
file: (binary, max 10 MB)Response
{
"attachment": {
"id": "0197b1c2-...",
"kind": "image",
"name": "receipt.png",
"size": 48213,
"url": "https://equilai.ai/uploads/chat/0197b1c2-....png",
"expired": false,
"originalDiscarded": false
}
}Quick test
Copy your key from the dashboard and run:
curl -X POST "https://equilai.ai/api/chat/start" \
-H "Content-Type: application/json" \
-d '{"apiKey": "YOUR_API_KEY"}'Just want to add a chat bubble to your site? See Installation →