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
Submit documents for processing and receive structured data back. Supports PDF, images, and text inputs with automatic format detection and schema inference.
/dil/processProcess 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 }
}'/dil/status/:processing_idCheck the status of an async document processing operation.
{
"status": "completed",
"processing_id": "dil_proc_abc123xyz",
"data": { ... },
"confidence": 0.96,
"processing_time_ms": 2340,
"completed_at": "2024-01-15T10:30:15Z"
}/dil/batchProcess multiple documents in a single batch operation. Returns a batch processing ID.
{
"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.
/reol/analyzeAnalyze 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"]
}
}/reol/queryNatural language query over your structured data. Converts questions to database queries automatically.
{
"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.
/sel/triggerTrigger 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"
}/sel/status/:execution_idCheck the status of a workflow execution.
{
"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"
}
}APIs that behave like infrastructure — because they are.
The Forge API is not a thin wrapper around someone else's models. It is the same infrastructure we run for Kanda's credit decisions, Vault's document processing, and Stoq's inventory workflows. Every endpoint has been tested under real load with real data from real businesses.
We ship versioned APIs with clear deprecation timelines. We do not break your integration without warning. We do not return mysterious error codes. We return structured errors with actionable messages, because when you are debugging at 2 AM, you need answers, not riddles.
Start building with the Forge API.
Get your API key and start integrating document intelligence, reasoning, and workflow automation.