Documentation
ApexKit offers a dual-interface: a fully typed TypeScript SDK for rapid development, and a standard REST API for universal compatibility.
Initialization & Context
Initialize Client
Configure the SDK. ApexKit supports multi-tenancy natively. You can switch contexts (Root, Tenant, Sandbox) using the same client library.
Authentication
POST
Login
/auth/login
Authenticate a user to receive a JWT. The token scope adapts automatically to the client context (Root/Tenant).
POST
Register
/auth/register
Create a new user. Metadata is a flexible JSON object for profile fields.
Database (CRUD)
GET
List Records
/collections/{id}/records
Fetch paginated data. Supports JSON filtering and Relation expansion.
POST
Create Record
/collections/{id}/records
Insert a new record. Schema validation runs automatically on the server.
POST
Manage Relations
/.../relations
Manually link two records (Graph Edge). Useful for Many-to-Many relationships.
Search & AI
GET
Instant Search
/.../instant-search
Uses the Tantivy inverted index (RAM-based) for millisecond-fast full-text search with typo tolerance.
POST
Semantic Search
/.../search-text-vector
Converts query text to an embedding (via configured model like Gemini/Bert) and performs HNSW similarity search.
File Storage
POST
Upload File
/storage/upload
Uploads to configured backend (Local Disk or S3). Returns a File Object with public URL.
Serverless Logic
POST
Run Script
/run/{name}
Execute a server-side JavaScript function. Ideal for payment processing, heavy calculations, or secure webhooks.
POST
Run AI Action
/ai/run/{slug}
Execute a stored Prompt Template securely on the server. The server handles API keys and context.
Realtime (WS)
WS
Subscribe to Events
/ws
Listen for database changes (Insert, Update, Delete) or custom broadcast signals.