Definable.ai API Reference
The Definable.ai API is organized around REST principles, using standard HTTP verbs, returning JSON responses, and using standard HTTP status codes to indicate errors. Our API enables you to create, manage, and deploy AI agents and tools programmatically.API Architecture Overview
Base URL
All API requests should be made to the following base URL:Authentication
All API endpoints require authentication using either JWT tokens or API keys. See the Authentication Guide for details on how to authenticate your requests.Bearer Token Authentication
API Key Authentication
Authentication Flow
Response Format
Responses are returned in JSON format. Successful responses typically include:HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of a request:Code | Description |
---|---|
200 | OK - The request was successful |
201 | Created - A new resource was successfully created |
400 | Bad Request - The request was invalid |
401 | Unauthorized - Authentication failed or not provided |
403 | Forbidden - The authenticated user doesn’t have permission |
404 | Not Found - The requested resource doesn’t exist |
422 | Unprocessable Entity - Validation error |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on the server |
Rate Limiting
API requests are subject to rate limiting to ensure stability and fair usage. The current limits are:- 100 requests per minute per IP address
- 1000 requests per hour per authenticated user
Pagination
For endpoints that return lists of items, the API uses cursor-based pagination. Parameters:limit
: Number of items to return (default: 20, max: 100)cursor
: Cursor for pagination (obtained from previous responses)
🚀 API Endpoints
The Definable.ai API is organized into logical categories for easy navigation:🤖 AI & Intelligence APIs
🤖 Agents API
Core Intelligence - Create, configure, and deploy AI agents with custom personalities, tools, and capabilities 🎯
🧠 LLM Services
Language Models - Integrate with GPT-4, Claude, and other cutting-edge models for natural conversation 💬
🛠️ Tools API
Agent Superpowers - Build and manage custom functions that extend agent capabilities ⚡
📚 Knowledge Base API
Smart Memory - Upload, process, and query documents with semantic search capabilities 🔍
💬 Communication APIs
💬 Conversations API
Chat Management - Handle multi-turn conversations, context, and message history 📝
⚡ WebSocket API
Real-time Streaming - Live communication with agents through WebSocket connections 🔄
👥 Organization & Security
🔐 Authentication API
Security Layer - JWT tokens, API keys, and secure authentication flows 🛡️
🏢 Organizations API
Team Management - Multi-tenant organization structure and user management 👥
👤 Roles & Permissions
Access Control - Fine-grained permissions and role-based access control (RBAC) ⚖️
📧 Invitations API
User Onboarding - Invite users and manage team member access 🎫
🔧 Utility APIs
OpenAPI Specification
The complete OpenAPI specification for the Definable.ai API is available at:Agent Creation Flow
Conversation Flow
Knowledge Base Processing Flow
Code Examples
Creating an AI Agent
Client Libraries
Official client libraries for the Definable.ai API:- Python SDK - Full-featured Python client
- TypeScript/JavaScript SDK - Browser and Node.js support
- Go SDK - Lightweight Go client
Webhooks
Definable.ai supports webhooks for real-time notifications about events in your account, including:- Agent deployment status changes
- Conversation updates
- Billing events
- Knowledge base processing completion