Imhotep Systems
ImhotepSystems
Developer Documentation

Build on top of
Forge infrastructure.

Forge is infrastructure, not a service. Our APIs and SDKs let you integrate document intelligence, reasoning engines, and workflow automation into your applications. Build systems that scale.

Quickstart

Get started with the Forge API in under 5 minutes. This guide walks you through authentication, your first API call, and basic integration patterns.

1

Get your API key

Sign up for a Forge account and generate an API key from your dashboard. Your API key authenticates all requests to the Forge API.

Authorization: Bearer YOUR_API_KEY
2

Install the SDK

Install the Forge SDK for your preferred language. We provide official SDKs for Python and JavaScript.

npm install @imhotep/forge-js
3

Make your first API call

Submit a document to the DIL endpoint and receive structured data back. This example processes a PDF invoice and extracts key fields.

const forge = new Forge({ apiKey: 'YOUR_API_KEY' });

const result = await forge.dil.process({
  document: 'invoice.pdf',
  type: 'invoice'
});

console.log(result.data);
// { vendor: 'Acme Corp', amount: 1250.00, date: '2024-01-15', ... }
4

Build your integration

Use the structured data from DIL, combine it with REOL for reasoning, and trigger SEL workflows. Check the API reference for detailed documentation on all endpoints.

View API reference

Authentication

All Forge API requests require authentication via an API key. Include your API key in the Authorization header using Bearer token authentication.

API Key Format

API keys are issued per application and have specific permissions and rate limits. Generate and manage API keys from your Forge dashboard.

Authorization: Bearer fk_live_abc123xyz

Security Best Practices

  • Never expose API keys in client-side code or public repositories
  • Use environment variables to store API keys in production
  • Rotate API keys regularly and revoke unused keys
  • Use separate API keys for development and production environments

SDK Installation

Forge provides official SDKs for popular languages. The SDKs handle authentication, error handling, and provide type-safe interfaces for all API endpoints.

JavaScript / TypeScript

npm install @imhotep/forge-js
import { Forge } from '@imhotep/forge-js';

const forge = new Forge({ apiKey: process.env.FORGE_API_KEY });

Python

pip install imhotep-forge
from imhotep_forge import Forge

forge = Forge(api_key=os.environ['FORGE_API_KEY'])

Code Examples

Practical examples for common integration patterns. These examples demonstrate how to combine DIL, REOL, and SEL to build intelligent workflows.

Document Processing Pipeline

Process incoming documents, extract structured data, and trigger downstream workflows.

// Process document with DIL
const extracted = await forge.dil.process({
  document: uploadedFile,
  type: 'contract'
});

// Apply reasoning with REOL
const analysis = await forge.reol.analyze({
  data: extracted.data,
  context: 'contract_review'
});

// Trigger SEL workflow if conditions met
if (analysis.risk_score > 0.7) {
  await forge.sel.trigger({
    workflow: 'high_risk_review',
    data: analysis
  });
}

Batch Processing

Process multiple documents efficiently with batch operations.

const documents = await fetchDocuments();

const results = await Promise.all(
  documents.map(doc => 
    forge.dil.process({ document: doc, type: 'invoice' })
  )
);

// Aggregate results
const summary = aggregateResults(results);

Webhooks

Configure webhooks to receive real-time notifications about async operations, workflow events, and system status updates.

Webhook Events

  • dil.process.completed — Document processing completed
  • dil.process.failed — Document processing failed
  • sel.workflow.completed — Workflow execution completed
  • sel.workflow.failed — Workflow execution failed
  • reol.analysis.completed — Analysis completed

Webhook Security

All webhook requests include a signature header for verification. Use your webhook secret to verify the request originated from Forge.

X-Forge-Signature: sha256=abc123...

Rate Limits

API rate limits ensure fair access and system stability. Limits are applied per API key and vary based on your plan tier.

PlanRequests/MinuteRequests/HourConcurrent
Starter601,0005
Pro30010,00020
EnterpriseCustomCustomCustom

Rate limit headers are included in all API responses:

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 295
X-RateLimit-Reset: 1640995200

Ready to build?

Start integrating Forge today.

Get your API key and start building intelligent applications on top of Forge infrastructure.