RESTful API for
Forge infrastructure.
Complete API reference for DIL, REOL, and SEL endpoints. Authentication, request/response formats, error handling, and code examples for all operations.
API overview
Three layers. One unified API.
The Forge API provides endpoints for document intelligence (DIL), reasoning and execution (REOL), and system execution (SEL). All endpoints share common authentication, error handling, and response formats.
DIL API
Document Intelligence Layer endpoints for processing and extracting structured data from documents.
/dil/process, /dil/status, /dil/batchREOL API
Reasoning & Execution Layer endpoints for AI-powered analysis and decision support.
/reol/analyze, /reol/query, /reol/explainSEL API
System Execution Layer endpoints for workflow automation and execution management.
/sel/trigger, /sel/status, /sel/workflowsDIL API
Document Intelligence Layer
Submit documents for processing and receive structured data back. Supports PDF, images, and text inputs with automatic format detection and schema inference.
Process a document and extract structured data. Returns a processing ID for async operations.
Request Body
{
"document": "string | file",
"type": "invoice | contract | report | auto",
"options": {
"schema": "object | null",
"language": "en | fr | sw | auto",
"async": true
}
}Response (Sync)
{
"status": "success",
"data": {
"vendor": "Acme Corporation",
"amount": 1250.00,
"currency": "USD",
"date": "2024-01-15",
"invoice_number": "INV-2024-001",
"line_items": [...]
},
"confidence": 0.96,
"processing_time_ms": 2340
}Response (Async)
{
"status": "processing",
"processing_id": "dil_proc_abc123xyz",
"estimated_completion": "2024-01-15T10:30:00Z"
}Example Request
curl -X POST https://api.imhotep.systems/v1/dil/process \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": "https://example.com/invoice.pdf",
"type": "invoice",
"options": {
"async": true
}
}'Check the status of an async document processing operation.
Response
{
"status": "completed",
"processing_id": "dil_proc_abc123xyz",
"data": { ... },
"confidence": 0.96,
"processing_time_ms": 2340,
"completed_at": "2024-01-15T10:30:15Z"
}Process multiple documents in a single batch operation. Returns a batch processing ID.
Request Body
{
"documents": [
{ "document": "url1", "type": "invoice" },
{ "document": "url2", "type": "contract" }
],
"options": {
"async": true
}
}REOL API
Reasoning & Execution Layer
AI-powered analysis and reasoning over structured data. Ask questions, get explanations, and receive actionable insights with full audit trails.
Analyze structured data with AI reasoning. Returns insights, recommendations, and explanations.
Request Body
{
"data": "object | array",
"query": "string",
"context": "string",
"options": {
"explain": true,
"confidence_threshold": 0.7
}
}Response
{
"status": "success",
"result": {
"answer": "The vendor has a 95% on-time delivery rate",
"confidence": 0.94,
"reasoning": [
"Analyzed 47 historical deliveries",
"2 late deliveries in the last 6 months",
"Both delays were due to external factors"
],
"sources": ["delivery_records_2023", "vendor_profile"]
}
}Natural language query over your structured data. Converts questions to database queries automatically.
Request Body
{
"query": "Show me all invoices over $10,000 from Q4",
"data_source": "invoices",
"options": {
"format": "table"
}
}SEL API
System Execution Layer
Workflow automation and execution management. Trigger workflows, check status, and manage automated operations with human-in-the-loop gates.
Trigger a workflow execution. Returns an execution ID for tracking.
Request Body
{
"workflow": "invoice_approval",
"data": {
"invoice_id": "inv_123",
"amount": 15000,
"vendor": "Acme Corp"
},
"options": {
"async": true,
"webhook": "https://your-domain.com/webhook"
}
}Response
{
"status": "triggered",
"execution_id": "sel_exec_xyz789",
"workflow": "invoice_approval",
"current_step": "risk_assessment",
"estimated_completion": "2024-01-15T11:00:00Z"
}Check the status of a workflow execution.
Response
{
"status": "awaiting_approval",
"execution_id": "sel_exec_xyz789",
"workflow": "invoice_approval",
"current_step": "manager_review",
"completed_steps": ["risk_assessment", "validation"],
"pending_human_action": {
"type": "approval",
"assigned_to": "manager@example.com",
"deadline": "2024-01-15T12:00:00Z"
}
}Ready to integrate?
Start building with the Forge API.
Get your API key and start integrating document intelligence, reasoning, and workflow automation.
Request API access