Artos API Documentation
Welcome to the Artos API documentation. Artos is a platform for generating Medical and Regulatory documents using MRT (Machine Readable Template) technology. The API enables document generation, template management, content search, and document organization.Overview
The Artos API provides a RESTful interface for working with MRT-based document generation. It enables organizations to:- Generate documents asynchronously by extracting content from source documents and applying MRT templates
- Manage MRT templates with nested sections and extraction rules
- Organize documents into document sets for collaborative work
- Search content using hybrid search combining vector similarity and full-text search
- Update MRT structures with fine-grained control over sections and extraction rules
Core Capabilities
1. Document Generation
Generate professional documents from source materials using predefined MRT templates. The process is asynchronous and handles document extraction, content ingestion, and orchestrated template application.2. Template Management
Create and manage MRT templates with nested sections and content extraction rules. Templates define the structure and content requirements for generated documents.3. File Management
Upload source documents and access generated files using S3 with presigned URLs.4. Hybrid Search
Search across MRT example chunks using a combination of vector similarity (pgvector) and full-text search (tsvector).API Resource Groups
The API is organized into 7 resource groups:| Resource | Path | Purpose |
|---|---|---|
| Files | /api/v1/files | Upload and list S3 files |
| Documents | /api/v1/documents | Generate documents and check status |
| Document Sets | /api/v1/document-sets | Organize documents into sets |
| Templates | /api/v1/templates | Create and manage MRT templates |
| MRT Outlines | /api/v1/mrt-outlines | Manage document outlines |
| Document MRT | /api/v1/document-mrt | Update document-specific MRT details |
| Search | /api/v1/search | Search across content using hybrid search |
Authentication
All endpoints (except/api/v1/search/status) require Bearer token authentication:
- User identification for operation tracking
- Organization scoping for multi-tenant data access
- Permission validation for resource ownership
Document Generation Flow
The typical workflow for generating a document:Async Processing Pattern
Document generation uses asynchronous processing via Celery:- POST returns 202 Accepted with a
task_idfor immediate feedback - Status polling allows clients to track progress
- Completion notification sent via email to [email protected]
- No webhooks currently available (use polling instead)
Error Handling
All endpoints return standard HTTP status codes with error details:- 200 OK: Successful GET/PUT request
- 201 Created: Successful POST (resource created)
- 202 Accepted: Async task queued
- 400 Bad Request: Validation error or missing required fields
- 401 Unauthorized: Missing or invalid Bearer token
- 403 Forbidden: Insufficient permissions or wrong organization
- 404 Not Found: Resource does not exist
- 422 Unprocessable Entity: Request validation error
- 500 Internal Server Error: Server-side processing error
Organization Scoping
All resources are automatically scoped to the authenticated user’s organization. A user’s Bearer token contains their organization context, ensuring:- Users can only access their organization’s resources
- Resources are automatically filtered by organization
- Cross-organization access is prevented
- Multi-tenant isolation is enforced
Getting Started
- Obtain a Bearer token from your organization administrator
- Choose a resource you want to work with (files, documents, templates, etc.)
- Review the endpoint documentation for request/response formats
- Test with curl or Postman to understand the API
- Integrate into your application using the SDK or direct HTTP calls
Next Steps
- Authentication: Detailed auth configuration and examples
- Files API: Upload and retrieve documents
- Documents API: Generate and manage documents
- Templates API: Create and organize MRT templates
- Search API: Query content across documents
- Error Handling: Understand error responses