- Data Ingestion (Sources API): Bring data in, process it, and retrieve structured elements.
- Document Chat (Chat API): Ask questions about your ingested documents using natural language.
- Data Extraction (Extract API): Extract specific structured data from documents using custom schemas.
Data Ingestion (Sources API)
The Sources API covers the full ingestion lifecycle:Upload Source
Import documents from files, URLs, GitHub, and YouTube
Process Source
Run OCR/parsing methods and reprocess existing sources
List Sources
Retrieve all sources with status and metadata
List Source Elements
Retrieve structured elements/partitions from processed sources
Delete Source
Permanently remove sources from your project
Document Chat (Chat API)
Once your data is ingested, use the Chat API to ask questions:Data Extraction (Extract API)
Extract specific structured data from your documents using schemas:What “Data Ingestion” includes
- Upload: create a new source (file / URL / GitHub / YouTube)
- Process: choose OCR/parsing method; reprocess when needed
- List: monitor status and metadata
- Elements: retrieve structured elements/partitions after processing
- Delete: remove a source permanently
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:Sources (Data Ingestion)
Chat
Extraction
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 the full “happy path”: upload → process → list → elements → chat/extract.1. Upload a source
2. Process (OCR/parsing)
3. Monitor status (List Sources)
4. Retrieve structured elements (after processing)
5. Ask Questions (Chat)
6. Extract Data (Extraction)
Integration Patterns
Minimal Sources (Ingestion) 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
Ingest documents as they’re created/updated in your CMS:Automated Ingestion Pipeline
Batch ingest research documents (upload + process):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
Contact Support
Direct support for technical questions and issues
API Tokens Guide
Learn how to generate and manage authentication tokens
Data Ingestion
Best practices for document upload and processing
Flows Overview
Master comprehensive RAG pipeline and node management
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
Upload Source
Start by ingesting documents from files, URLs, GitHub, and YouTube
Chat with Documents
Ask natural language questions about your documents with conversational memory and structured outputs
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

