Introduction to the Vindex Ai REST API

API Overview

The Vindex Ai API provides a simple yet powerful interface for integrating AI conversations into your applications.

Base URL

All API requests should be made to:
text
https://ai.vindex.ai/api

Authentication

Every request must include your API key in the
text
X-API-Key
header:
text
X-API-Key: amgai_your-channel-key-here

Finding Your API Key

  1. Go to Channels in the dashboard
  2. Open your channel
  3. Copy the API Key from the channel overview card
⚠️ Security Note: Never expose your API key in client-side code for public-facing websites. Use a backend proxy instead.

Rate Limits

Rate limits are configured per-channel in your dashboard:
LimitDefaultDescription
Requests/minute60Max requests per minute
Requests/day1000Max requests per day
When limits are exceeded, the API returns a
text
429 Too Many Requests
response.

Response Format

All responses are JSON with the following structure:

Success Response

json
{
  "reply": "I'd be happy to help you with your order! Could you please provide your order number?",
  "session_id": "user-abc-123"
}
[!TIP] Pro Tip: The
text
reply
field often contains Markdown. Use a library like marked or react-markdown to parse and render these responses correctly in your UI.
json
{
  "error": "Descriptive error message"
}

Rendering Responses

The
text
reply
field returned by AI endpoints often contains Markdown formatting (headers, bold text, code blocks, tables, etc.).
To provide the best experience for your users, we recommend using a markdown parsing library on your client:
  • JavaScript/React: Use
    text
    marked
    ,
    text
    react-markdown
    , or similar.
  • Python: Use
    text
    markdown2
    or
    text
    rich
    .
Example using
text
marked
in JavaScript:
javascript
import { marked } from 'marked';
const html = marked.parse(data.reply);
document.getElementById('chat-box').innerHTML = html;

Content Types

The API accepts and returns JSON:
text
Content-Type: application/json

HTTP Methods

MethodUsage
text
POST
Send messages, create resources
text
GET
Retrieve information
text
PUT
Update resources
text
DELETE
Remove resources