API Documentation

Welcome to the Kalem AI API documentation. Our REST API allows you to programmatically create and manage AI voice calls, integrate voice agents into your applications, and access call analytics.

Base URL: https://kalem.me/api/v1

Authentication

The Kalem AI API uses Bearer token authentication. Include your API token in the Authorization header of each request.

Authorization: Bearer YOUR_API_TOKEN

All API requests must be made over HTTPS. Requests without authentication will fail with a 401 Unauthorized response.

Getting Your API Token

To use the Kalem AI API, you need to generate an API token from your dashboard. Follow these steps:

  1. 1

    Sign in to your account

    Log in to your Kalem AI dashboard at https://kalem.me/login

  2. 2

    Navigate to Settings

    Click on your profile icon in the top right corner and select "Settings" from the dropdown menu.

  3. 3

    Go to API Tokens section

    In the settings page, find and click on the "API Tokens" tab in the left sidebar.

  4. 4

    Create a new token

    Click the "Create New Token" button, give your token a descriptive name (e.g., "Production API"), and select the appropriate permissions.

  5. 5

    Copy and secure your token

    Your token will be displayed once. Copy it and store it securely. You won't be able to see it again!

Important: Keep your API tokens secure and never share them publicly. Treat them like passwords. If a token is compromised, revoke it immediately and generate a new one.

Error Handling

The Kalem AI API uses conventional HTTP response codes to indicate the success or failure of requests.

HTTP Status Codes

Code Status Description
200 OK Request successful
201 Created Resource created successfully
400 Bad Request Invalid request parameters
401 Unauthorized Invalid or missing API token
403 Forbidden Not authorized to access resource
404 Not Found Resource not found
422 Unprocessable Entity Validation failed
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error occurred

All errors include a message field with a human-readable description. Validation errors (422) also include an errors object with field-specific error messages.

Rate Limits

API requests are rate limited to ensure fair usage and system stability. The current limits are:

  • 60 requests per minute per API token
  • 1,000 requests per hour per API token

When you exceed the rate limit, you'll receive a 429 Too Many Requests response. The response headers include:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1702224180

The X-RateLimit-Reset header contains a Unix timestamp indicating when the rate limit will reset.

If you need higher rate limits for your application, please contact our support team to discuss enterprise options.

Need Help?

Our support team is here to help you integrate the Kalem AI API into your application.