Authentication

The Aksita.ai Public API relies on API Keys to authenticate requests. These keys uniquely identify your agent and control the response format for different platforms. You can create multiple API Keys per agent, each with its own response format (Markdown, WhatsApp, Custom Platform, etc.). Manage your API Keys directly from your dashboard under the API Keys tab.

Multiple API Keys Per Agent

You can create multiple API keys for the same agent, each with a different response format. For example: one key for WhatsApp integration with WhatsApp-optimized formatting, another for Discord with Discord-specific formatting, and a third for your mobile app with standard Markdown.

Security Best Practice

Your API Key carries significant privileges. Treat it like a password: keep it secret and secure. Never share your API keys in publicly accessible areas such as GitHub repositories, client-side code, or public forums.

Managing API Keys

To create and manage API keys:

  1. Navigate to your agent's dashboard
  2. Click on the API Keys tab in the sidebar
  3. Click Create API Key
  4. Enter a name (e.g., "WhatsApp Bot", "Discord Integration")
  5. Select the response format:
    • Markdown - Standard markdown formatting (default)
    • WhatsApp - Optimized for WhatsApp messaging
    • Custom Platform - Specify a platform name (e.g., Discord, Telegram)
    • Custom Example - Provide example chat messages to guide formatting
  6. Copy the generated API key immediately (you won't see it again!)

Important: Save Your API Key

After creating an API key, make sure to copy and save it immediately. For security reasons, the full API key is only shown once during creation. If you lose it, you'll need to create a new one.

Header Format

Authentication is performed via HTTP headers. Include your unique API key in the X-API-Key header of every request you make.

X-API-Key: your_api_key_here

Failed Authentication

If your API key is missing, invalid, or has been revoked, the API will return a 401 Unauthorized response.

401 Unauthorized
{
  "status": false,
  "reason": "Invalid API Key"
}