Klen AI API Reference

Welcome to the Klen AI API documentation. Our API allows you to programmatically interact with your AI agents, manage calls, contacts, calendar events, and more.

Base URL

All API requests should be made to:

https://api.klen.ai/api/v1/

Authentication

The Klen AI API uses API keys for authentication. You’ll need to include your API key in the headers of all requests.

See the Authentication page for more details on how to authenticate your requests.

Rate Limiting

API requests are limited based on your plan. Rate limits are applied on a per-minute and per-day basis for certain endpoints.

  • Standard API keys: 60 requests per minute, 100 calls per day
  • Partner API keys: Higher limits based on partnership agreement

Response Format

All API responses are returned in JSON format. Successful responses will have a 2xx status code, while errors will return an appropriate error code along with an error message.

Example success response:

{
  "id": "call_123456",
  "status": "completed",
  "duration_seconds": 120,
  // Additional response fields...
}

Example error response:

{
  "error": "invalid_key",
  "message": "Invalid or inactive API key"
}

Available Endpoints

Our API is organized around REST principles. It uses standard HTTP response codes, authentication, and verbs.

Explore the following sections for detailed documentation on specific endpoints:

  • Calls - Manage and retrieve call data
  • Agents - Access your AI agents
  • Contacts - Manage your contacts
  • Context Variables - Manage custom variables for your contacts and business profile
  • Calendar - Manage events and availability
  • Webhooks - Set up and manage webhooks for real-time events

Need Help?

If you have any questions or need assistance with our API, please contact our support team at [email protected].