SDKs & Libraries

First-class support for Python, Node.js, Go, and more — resolve workflows in minutes

⚡ All SDKs are open source · Production-tested · Automatic retries · Type-safe responses

GitHub organization →  |  Package Registry →

Quick Install

🐍 Python 3.9+
pip install accelex-sdk
from accelex import AccelEx client = AccelEx(api_key="accelex_live_xxx") invoice = client.finance.process_invoice( document_url="https://example.com/invoice.pdf", vendor_id="VEN_8872" ) print(invoice.ready_for_payment, invoice.confidence_score)
📦 Node.js 18+
npm install accelex-sdk
import { AccelEx } from 'accelex-sdk'; const client = new AccelEx({ apiKey: 'accelex_live_xxx' }); const contract = await client.legal.processContract({ documentUrl: 'https://example.com/nda.pdf', contractType: 'nda' }); console.log(contract.riskClassification, contract.flaggedClauses);
🔵 Go 1.21+
go get github.com/accelex/accelex-go
package main import "github.com/accelex/accelex-go" client := accelex.NewClient("accelex_live_xxx") caseResult, err := client.Support.ProcessCase(&accelex.CaseInput{ Source: "email", Transcript: "Cannot access dashboard", }) fmt.Println(caseResult.RoutingDecision)
🦀 Rust
cargo add accelex-sdk
use accelex::{Client, FinancePipeline}; let client = Client::new("accelex_live_xxx"); let invoice = client.finance() .process_invoice("https://example.com/invoice.pdf") .await?; println!("{}", invoice.approval_signal);

Complete Python Example

from accelex import AccelEx from accelex.models import InvoiceOptions, SupportCaseInput import asyncio # Initialize client (automatically handles rate limits and retries) client = AccelEx( api_key="accelex_live_your_key_here", environment="production", # or "sandbox" for testing timeout_seconds=60 ) # ---- Finance Pipeline: Invoice Resolution ---- invoice_result = client.finance.process_invoice( document_url="s3://invoices/2025/inv_40291.pdf", vendor_id="VEN_8872", options=InvoiceOptions( require_line_item_matching=True, confidence_threshold=0.92, extract_tax_details=True ) ) print(f"Workflow ID: {invoice_result.workflow_id}") print(f"Ready for payment: {invoice_result.completed_unit.ready_for_payment}") print(f"Confidence: {invoice_result.confidence_score}") print(f"Amount: {invoice_result.completed_unit.invoice_object.amount} USD") if invoice_result.completed_unit.anomaly_flags: print(f"⚠️ Anomalies detected: {invoice_result.completed_unit.anomaly_flags}") # ---- Legal Pipeline: Contract Intelligence ---- contract_result = client.legal.process_contract( document_url="https://storage.acme.com/msa_vendor_2025.pdf", contract_type="master_service_agreement", counterparty="Vendor Solutions LLC" ) print(f"Risk tier: {contract_result.completed_unit.contract_intelligence.risk_classification}") for clause in contract_result.completed_unit.contract_intelligence.flagged_clauses: print(f"Clause '{clause.clause}': {clause.recommendation}") # ---- Support Pipeline: Case Resolution ---- case_input = SupportCaseInput( source="email", transcript="User reports 502 errors when uploading large files", attachments=["error_log.txt"], customer_id="cust_55782" ) case_result = client.support.process_case(case_input) print(f"Assigned to: {case_result.completed_unit.routing_decision}") print(f"Priority: {case_result.completed_unit.priority}") # ---- Webhook handler (FastAPI example) ---- from fastapi import FastAPI, Request, Header app = FastAPI() @app.post("/webhooks/accelex") async def handle_webhook( request: Request, x_webhook_signature: str = Header(...) ): payload = await request.json() # Verify signature using client helper if client.webhooks.verify_signature(payload, x_webhook_signature): workflow_id = payload["workflow_id"] print(f"Workflow {workflow_id} completed") return {"status": "received"} else: return {"status": "invalid_signature"}, 401

Node.js TypeScript Example

import { AccelEx, PipelineType } from 'accelex-sdk'; import { createReadStream } from 'fs'; const client = new AccelEx({ apiKey: process.env.ACCEEX_API_KEY!, maxRetries: 3, baseUrl: 'https://api.accelexpress.com/v1' }); // Process invoice from buffer or stream async function processInvoiceFromFile() { const fileStream = createReadStream('./invoice_april.pdf'); const result = await client.finance.processInvoice({ document: fileStream, documentType: 'invoice', clientContext: { expectedPoNumber: 'PO-2025-0421', vendorId: 'VEN_9923' } }); console.log('Invoice result:', { status: result.status, confidence: result.confidenceScore, approvalSignal: result.completedUnit.approvalSignal, auditId: result.auditId }); return result; } // Batch processing with concurrency control async function batchProcessContracts(contractUrls: string[]) { const results = await client.batch.process({ pipeline: PipelineType.LEGAL_CONTRACT, items: contractUrls.map(url => ({ documentUrl: url, contractType: 'nda' })), concurrency: 5, onProgress: (completed, total) => { console.log(`Progress: ${completed}/${total}`); } }); console.log(`Batch complete: ${results.successful.length} succeeded`); return results; } // Streaming support case processing async function streamSupportCases(cases: AsyncIterable) { const stream = client.support.streamCases(cases); for await (const resolvedCase of stream) { console.log(`Resolved ${resolvedCase.workflowId} → ${resolvedCase.completedUnit.routingDecision}`); // Trigger downstream actions await notifyTeam(resolvedCase.completedUnit.assignedTeam, resolvedCase); } } // Error handling with typed responses try { const invoice = await client.finance.processInvoice({ documentUrl: 'https://example.com/missing.pdf' }); } catch (error) { if (error.code === 'CONFIDENCE_THRESHOLD_FAILED') { console.log('Manual review required:', error.threshold, error.actualScore); } else if (error.code === 'RATE_LIMITED') { console.log(`Retry after ${error.retryAfter} seconds`); } else { throw error; } } async function notifyTeam(team: string, result: any) { // Integration with Slack, Teams, etc. }

Go Production Example

package main import ( "context" "fmt" "log" "time" "github.com/accelex/accelex-go" "github.com/accelex/accelex-go/pipelines/finance" ) func main() { ctx := context.Background() // Create client with custom configuration client := accelex.NewClient( accelex.WithAPIKey("accelex_live_xxx"), accelex.WithTimeout(30*time.Second), accelex.WithRetryConfig(accelex.RetryConfig{ MaxAttempts: 3, InitialBackoff: 1 * time.Second, }), ) defer client.Close() // Process invoice synchronously invoiceReq := &finance.ProcessInvoiceRequest{ DocumentURL: "https://storage.acme.com/invoices/inv_8821.pdf", VendorID: "VEN_4451", Options: &finance.InvoiceOptions{ RequireLineItemMatching: true, ConfidenceThreshold: 0.90, }, } invoiceResult, err := client.Finance.ProcessInvoice(ctx, invoiceReq) if err != nil { log.Fatalf("Invoice processing failed: %v", err) } fmt.Printf("Workflow: %s | Ready: %t | Confidence: %.2f\n", invoiceResult.WorkflowID, invoiceResult.CompletedUnit.ReadyForPayment, invoiceResult.ConfidenceScore, ) // Async webhook mode (fire and forget) asyncReq := &finance.AsyncInvoiceRequest{ DocumentURL: "https://storage.acme.com/invoices/batch_01.pdf", WebhookURL: "https://our-system.com/webhooks/accelex", } asyncID, err := client.Finance.ProcessInvoiceAsync(ctx, asyncReq) if err != nil { log.Fatal(err) } fmt.Printf("Async job submitted: %s\n", asyncID) // Check status later status, _ := client.Workflows.GetStatus(ctx, asyncID) fmt.Printf("Status: %s\n", status.State) }

SDK Features

🔄 Automatic Retries

Exponential backoff for transient failures (network issues, rate limits). Configurable per client.

📊 Type Safety

Full TypeScript declarations, Python type hints, and Go structs. Compile-time validation of workflow inputs.

⚡ Batch & Streaming

Process thousands of documents with automatic concurrency control and progress callbacks.

🔐 Signature Verification

Built-in webhook signature validation using HMAC-SHA256. Prevent forged callbacks.

📈 Metrics & Logging

OpenTelemetry integration, request/response logging, and performance tracing.

🌍 Environment Awareness

Seamless switch between sandbox (test, no billing) and production (real workflow units).

Get started in minutes

Install via pip, npm, or go get — sandbox keys work immediately.

View GitHub → Read API docs →