
API Architecture
Graphor’s REST API is organized around two main resource types that mirror the platform’s core functionality:Sources API - Document Management
Handle document ingestion, processing, and lifecycle management.Flows API - Pipeline Management
Control RAG pipeline deployment, execution, and comprehensive node configuration (datasets, chunking, retrieval, reranking, advanced RAG, and LLM nodes).Available Endpoints
The API provides complete coverage of Graphor’s capabilities through organized endpoint groups:Sources Management
Manage your document library with full CRUD operations:Sources Overview
Complete guide to document management endpoints
Upload Source
Import documents from files, URLs, GitHub, and YouTube
Process Source
Configure OCR and parsing methods for documents
List Sources
Retrieve all sources with status and metadata
Delete Source
Remove sources and update dependent flows
Flow Management
Control RAG pipelines from configuration to execution with comprehensive node management:Flows Overview
Complete guide to flow and dataset management
List Flows
Get all flows with deployment status and URLs
Deploy Flow
Deploy flows to make them accessible via API
Run Flow
Execute deployed flows with queries and get results
Node Management
Specialized endpoints for managing all types of flow nodes:Dataset Nodes
Manage source document connections and configurations
Processing Nodes
Configure chunking, retrieval, and reranking operations
Advanced RAG
Access Smart RAG, Graph RAG, and RAPTOR RAG capabilities
LLM Nodes
Configure language models and prompt templates
Authentication
All API endpoints require authentication using API tokens. Include your token in the Authorization header:Learn how to generate and manage API tokens in the API Tokens guide.
Token Security
- Never expose tokens in client-side code or public repositories
- Use environment variables to store tokens securely
- Rotate tokens regularly for enhanced security
- Use different tokens for different environments (dev/staging/prod)
URL Structure
Graphor API endpoints follow consistent URL patterns based on their scope and purpose:Global Operations
Resource-Specific Operations
Response Formats
All API responses follow consistent JSON structures with appropriate HTTP status codes:Success Response Pattern
Error Response Pattern
Common Status Codes
| Code | Meaning | Usage |
|---|---|---|
| 200 | OK | Successful GET, POST, PATCH operations |
| 400 | Bad Request | Invalid parameters or malformed requests |
| 401 | Unauthorized | Invalid or missing API token |
| 404 | Not Found | Resource doesn’t exist |
| 413 | Payload Too Large | File size exceeds limits |
| 500 | Internal Server Error | Server-side processing errors |
Complete Workflow Example
Here’s how the APIs work together in a typical RAG pipeline setup:1. Document Upload and Processing
2. Flow Configuration and Deployment
3. Flow Execution
Integration Patterns
Complete API Client
Python Integration
Rate Limits and Best Practices
Performance Guidelines
- Batch Operations: Group multiple related requests when possible
- Asynchronous Processing: Use async/await for multiple concurrent requests
- Retry Logic: Implement exponential backoff for transient failures
- Caching: Cache frequently accessed data like flow configurations
Error Handling Best Practices
Testing and Development
API Testing Tools
You can test Graphor API endpoints using:- cURL: Command-line testing and scripting
- Postman: Interactive API testing and documentation
- Bruno/Insomnia: Alternative API clients
- Custom Scripts: Automated testing suites
Example cURL Commands
Common Use Cases
Content Management System Integration
Build intelligent document search and retrieval:Automated Research Pipeline
Process and analyze research documents:Migration and Versioning
API Versioning
The Graphor API follows semantic versioning principles:- Current Version: v1 (stable)
- Endpoint Paths: Include version in URL structure where applicable
- Backward Compatibility: Breaking changes will increment major version
Migration Best Practices
- Monitor API Updates: Subscribe to API changelog notifications
- Version Pinning: Specify API versions in your integrations
- Gradual Migration: Test new versions in staging before production deployment
- Fallback Strategies: Implement graceful degradation for API changes
Support and Resources
Getting Help
API Tokens Guide
Learn how to generate and manage authentication tokens
Integration Guide
Advanced patterns for production integrations
Data Ingestion
Best practices for document upload and processing
Contact Support
Direct support for technical questions and issues
Community and Updates
- Documentation Updates: This documentation is continuously updated with new features
- API Changelog: Monitor changes and new endpoint releases
- Best Practices: Learn from community implementations and use cases
Next Steps
Ready to start building with Graphor APIs? Choose your path:For Beginners
Sources Overview
Start with document management fundamentals
API Tokens
Set up authentication for API access
For Advanced Users
Flows Overview
Master comprehensive RAG pipeline and node management
LLM Integration
Advanced language model configuration and optimization
Advanced RAG
Explore Smart RAG, Graph RAG, and RAPTOR capabilities
Integration Patterns
Build production-ready integrations

