Overview
The Trix REST API provides direct HTTP access to all Trix functionality. Use it to integrate memory capabilities into any application, regardless of programming language or platform.
If you're using Python, TypeScript, or C#, consider using the official SDKs for a more ergonomic experience. The REST API is ideal for other languages or when you need fine-grained control.
Base URL
All API requests should be made to:
https://api.trixdb.com/v1For self-hosted deployments, replace with your instance URL.
Content Type
All requests and responses use JSON. Include these headers:
Content-Type: application/json
Accept: application/jsonQuick Start
Here's a quick example of creating and searching memories:
1. Create a Memory
curl -X POST "https://api.trixdb.com/v1/memories" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "User prefers dark mode", "tags": ["preferences"]}'2. Search Memories
curl -X GET "https://api.trixdb.com/v1/memories?q=user+preferences" \
-H "Authorization: Bearer YOUR_API_KEY"API Reference
The REST API is organized into the following sections:
API keys, JWT tokens, and permissions
Create, search, update, and delete memories
Knowledge graph traversal and relationships
Organize memories into spaces and clusters
Real-time event notifications
Error handling, rate limits, and quotas
All Endpoints
Authentication
| Method | Endpoint | Description |
|---|---|---|
POST | /auth/register | User registration |
POST | /auth/login | User login |
GET | /auth/me | Get current user |
POST | /auth/change-password | Change password |
Memories
| Method | Endpoint | Description |
|---|---|---|
POST | /memories | Create memory |
GET | /memories | List/search memories |
GET | /memories/:id | Get memory |
PATCH | /memories/:id | Update memory |
DELETE | /memories/:id | Delete memory |
POST | /memories/bulk | Bulk create |
Relationships
| Method | Endpoint | Description |
|---|---|---|
POST | /relationships/:memoryId | Create relationship |
GET | /relationships/:memoryId | List relationships |
DELETE | /relationships/:memoryId/:targetId | Delete relationship |
Graph
| Method | Endpoint | Description |
|---|---|---|
POST | /graph/traverse | Multi-hop traversal |
POST | /graph/context | Extract subgraph |
POST | /graph/path | Find paths |
Spaces & Clusters
| Method | Endpoint | Description |
|---|---|---|
POST | /spaces | Create space |
GET | /spaces | List spaces |
POST | /clusters | Create cluster |
GET | /clusters | List clusters |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
POST | /webhooks | Create webhook |
GET | /webhooks | List webhooks |
POST | /webhooks/:id/test | Test webhook |
Next Steps
- Authentication - Set up API keys and learn about permissions
- Memories API - Create and search memories
- Interactive API Reference - Try endpoints in the browser