Overview
Trainly provides a comprehensive GraphRAG (Graph Retrieval-Augmented Generation) API that enables you to build intelligent applications with privacy-first document processing and AI-powered question answering.API Architecture
The Trainly API is organized into several major categories:V1 Trusted Issuer API
OAuth-based authentication for external applications with complete user data
isolation
Chat API
Query and interact with your knowledge base using AI models
File Management
Upload, process, and manage documents with automatic embedding generation
Scope Management
Advanced data filtering with custom scopes for multi-tenant applications
Authentication Methods
Trainly supports multiple authentication approaches depending on your use case:1. V1 Trusted Issuer Authentication (Recommended)
For external applications that want to integrate with Trainly while maintaining complete user privacy:With V1 auth, users maintain complete control over their data. Files are
stored in permanent private subchats that only they can access.
2. Chat API Keys
For direct chat access with API keys:3. Privacy-First OAuth (Legacy)
For applications requiring stricter privacy controls:Base URLs
Rate Limiting
All API endpoints are rate-limited to ensure fair usage:- Default: 60 requests per minute per API key
- Streaming: 30 requests per minute per API key
Response Format
All API responses follow a consistent JSON format:Privacy Guarantees
Trainly is built with privacy at its core:User Data Isolation
User Data Isolation
Each user’s data is stored in isolated subchats. Developers can only access AI-generated responses, never raw files or documents.
Citation Filtering
Citation Filtering
Citations are automatically filtered based on the access method. Direct user
access gets full citations, while developer API calls get limited snippets.
Audit Logging
Audit Logging
All access attempts are logged for security and compliance purposes.
GDPR/CCPA Compliance
GDPR/CCPA Compliance
Users maintain ownership of their data and can request deletion at any time.
SDKs and Libraries
JavaScript/TypeScript
Official SDK for Node.js and browser applications
Python
Official SDK for Python applications
cURL Examples
Complete cURL examples for all endpoints
Postman Collection
Import ready-to-use Postman collection
Getting Started
- Create an account at trainlyai.com
- Create a chat and upload some documents
- Enable API access in chat settings
- Generate an API key or register your OAuth app
- Make your first API call
Quick Start Guide
Get up and running in 5 minutes
Support
Need help? We’re here for you:- 📧 Email: support@trainlyai.com
- 💬 Discord: Join our community
- 📚 Documentation: docs.trainlyai.com
- 🐛 Bug Reports: GitHub Issues