pip install trustinera-ai
Full type hints, async support, Jupyter kernel
Developer Portal
Everything you need to integrate, extend, and operate Trustinera AI — REST APIs, typed SDKs, Helper packaging workflows, OpenAPI specs, architecture guides, and a sandbox environment live in minutes.
Quickstart
Install the CLI, authenticate, connect a data source, and categorise your first transaction batch without writing a single line of code.
curl -fsSL https://get.trustinera.ai/cli | sh
# or: brew install trustinera/tap/tia
tia auth login
# Opens browser — sign in with your credentials
# API key is stored securely in ~/.tia/config
tia categorise submit \
--amount 142.50 \
--currency GBP \
--description "AMAZON EU SARL" \
--date 2026-03-17
{
"category": "Office Supplies",
"sub_category": "Software & Subscriptions",
"confidence": 0.97,
"model_version": "categorise-v4.2",
"explainability": ["Merchant: AMAZON EU", "MCC: 5734"]
}
Code Examples
Every API operation shown in Python, Node.js, Go, Rust, Ruby, and cURL — authenticated, annotated, and production-ready.
import trustinera
client = trustinera.Client(api_key="tia_sk_live_xxxxxxxxxxxx")
# Test your connection
health = client.health.check()
print(health.status) # → "healthy"
import trustinera
client = trustinera.Client(api_key="tia_sk_live_xxxxxxxxxxxx")
# Categorise a single transaction
result = client.categorise.submit(
amount=142.50,
currency="GBP",
description="AMAZON EU SARL",
date="2026-03-17",
reference="TXN-001"
)
print(result.category) # → "Office Supplies"
print(result.sub_category) # → "Software & Subscriptions"
print(result.confidence) # → 0.97
print(result.explainability) # → ["Merchant: AMAZON EU", "MCC: 5734"]
# Categorise a batch asynchronously
import asyncio
async def categorise_batch():
async with trustinera.AsyncClient(api_key="tia_sk_live_xxxxxxxxxxxx") as c:
batch = await c.categorise.submit_batch([
{"amount": 142.50, "currency": "GBP", "description": "AMAZON EU SARL", "date": "2026-03-17"},
{"amount": 2400.00, "currency": "GBP", "description": "GOOGLE WORKSPACE", "date": "2026-03-17"},
{"amount": 89.99, "currency": "GBP", "description": "MICROSOFT AZURE", "date": "2026-03-17"},
])
for tx in batch.results:
print(f"{tx.description:<30} → {tx.category} ({tx.confidence:.0%})")
asyncio.run(categorise_batch())
import trustinera
client = trustinera.Client(api_key="tia_sk_live_xxxxxxxxxxxx")
# Submit a reconciliation run
run = client.reconcile.create_run(
ledger_source="xero",
bank_source="barclays_feed",
period_start="2026-03-01",
period_end="2026-03-31",
match_tolerance_pct=0.01,
)
print(run.id) # → "run_a1b2c3d4"
print(run.status) # → "processing"
# Poll for completion
import time
while run.status == "processing":
time.sleep(2)
run = client.reconcile.get_run(run.id)
print(f"Matched: {run.stats.matched_count}")
print(f"Exceptions: {run.stats.exception_count}")
print(f"Completion: {run.stats.completion_pct:.1%}")
import trustinera
client = trustinera.Client(api_key="tia_sk_live_xxxxxxxxxxxx")
# Score a transaction for fraud risk
score = client.sentrise.score(
transaction_id="TXN-789",
amount=7500.00,
currency="GBP",
merchant_name="ACME OVERSEAS LTD",
country="NG",
payment_method="wire_transfer",
account_id="ACC-111",
)
print(score.risk_level) # → "HIGH"
print(score.risk_score) # → 0.89
print(score.triggered_rules) # → ["HIGH_VALUE_WIRE", "HIGH_RISK_COUNTRY"]
print(score.recommended_action) # → "HOLD_FOR_REVIEW"
import TrusterineAI from "@trustinera/ai";
const client = new TrusterineAI({
apiKey: process.env.TIA_API_KEY, // never hard-code keys
});
const health = await client.health.check();
console.log(health.status); // → "healthy"
import TrusterineAI from "@trustinera/ai";
const client = new TrusterineAI({ apiKey: process.env.TIA_API_KEY });
// Categorise a single transaction
const result = await client.categorise.submit({
amount: 142.50,
currency: "GBP",
description: "AMAZON EU SARL",
date: "2026-03-17",
});
console.log(result.category); // → "Office Supplies"
console.log(result.confidence); // → 0.97
console.log(result.explainability); // → ["Merchant: AMAZON EU", "MCC: 5734"]
// Batch categorise with structured output
const batch = await client.categorise.submitBatch([
{ amount: 142.50, currency: "GBP", description: "AMAZON EU SARL", date: "2026-03-17" },
{ amount: 2400.00, currency: "GBP", description: "GOOGLE WORKSPACE", date: "2026-03-17" },
{ amount: 89.99, currency: "GBP", description: "MICROSOFT AZURE", date: "2026-03-17" },
]);
batch.results.forEach(tx => {
console.log(`${tx.description.padEnd(30)} → ${tx.category} (${(tx.confidence * 100).toFixed(0)}%)`);
});
import express from "express";
import TrustineraAI from "@trustinera/ai";
const app = express();
const client = new TrustineraAI({ apiKey: process.env.TIA_API_KEY });
app.post("/webhooks/trustinera", express.raw({ type: "application/json" }), (req, res) => {
// Verify the webhook signature
const sig = req.headers["x-tia-signature"] as string;
let event;
try {
event = client.webhooks.constructEvent(req.body, sig, process.env.TIA_WEBHOOK_SECRET!);
} catch (err) {
return res.status(400).send(`Webhook Error: ${(err as Error).message}`);
}
switch (event.type) {
case "transaction.categorised":
console.log("Categorised:", event.data.transaction_id, event.data.category);
break;
case "pipeline.completed":
console.log("Pipeline done:", event.data.pipeline_id, event.data.record_count);
break;
case "fraud.alert.raised":
console.log("Fraud alert:", event.data.transaction_id, event.data.risk_level);
break;
}
res.json({ received: true });
});
app.listen(3000);
package main
import (
"context"
"fmt"
"os"
trustinera "github.com/trustinera/trustinera-go"
)
func main() {
client := trustinera.NewClient(os.Getenv("TIA_API_KEY"))
health, err := client.Health.Check(context.Background())
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
}
fmt.Println(health.Status) // → healthy
}
package main
import (
"context"
"fmt"
"os"
trustinera "github.com/trustinera/trustinera-go"
"github.com/trustinera/trustinera-go/categorise"
)
func main() {
client := trustinera.NewClient(os.Getenv("TIA_API_KEY"))
result, err := client.Categorise.Submit(context.Background(), categorise.SubmitParams{
Amount: 142.50,
Currency: "GBP",
Description: "AMAZON EU SARL",
Date: "2026-03-17",
})
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
}
fmt.Printf("Category: %s\n", result.Category)
fmt.Printf("Confidence: %.2f\n", result.Confidence)
fmt.Printf("Explain: %v\n", result.Explainability)
}
// Cargo.toml: trustinera-ai = "0.4"
use trustinera_ai::Client;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = Client::new(std::env::var("TIA_API_KEY")?);
let health = client.health().check().await?;
println!("Status: {}", health.status); // → healthy
Ok(())
}
use trustinera_ai::{Client, categorise::SubmitRequest};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = Client::new(std::env::var("TIA_API_KEY")?);
let result = client
.categorise()
.submit(SubmitRequest {
amount: 142.50,
currency: "GBP".into(),
description: "AMAZON EU SARL".into(),
date: "2026-03-17".into(),
..Default::default()
})
.await?;
println!("Category: {}", result.category);
println!("Confidence: {:.2}", result.confidence);
println!("Explain: {:?}", result.explainability);
Ok(())
}
require "trustinera_ai"
client = TrustineraAI::Client.new(api_key: ENV["TIA_API_KEY"])
health = client.health.check
puts health.status # → healthy
require "trustinera_ai"
client = TrustineraAI::Client.new(api_key: ENV["TIA_API_KEY"])
result = client.categorise.submit(
amount: 142.50,
currency: "GBP",
description: "AMAZON EU SARL",
date: "2026-03-17"
)
puts result.category # → Office Supplies
puts result.confidence # → 0.97
puts result.explainability # → ["Merchant: AMAZON EU", "MCC: 5734"]
# Rails integration example
class TransactionCategorizerJob < ApplicationJob
def perform(transaction_id)
tx = Transaction.find(transaction_id)
result = $tia_client.categorise.submit(
amount: tx.amount, currency: tx.currency,
description: tx.description, date: tx.date
)
tx.update!(category: result.category, confidence: result.confidence)
end
end
# Set your API key as an environment variable
export TIA_API_KEY="tia_sk_live_xxxxxxxxxxxx"
# Test your credentials
curl https://api.trustinera.ai/v1/health \
-H "Authorization: Bearer $TIA_API_KEY"
# Response:
# { "status": "healthy", "version": "4.2.1", "region": "eu-west-2" }
# Categorise a single transaction
curl -X POST https://api.trustinera.ai/v1/categorise/submit \
-H "Authorization: Bearer $TIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 142.50,
"currency": "GBP",
"description": "AMAZON EU SARL",
"date": "2026-03-17",
"reference": "TXN-001"
}'
# Response:
# {
# "id": "cat_a1b2c3d4",
# "category": "Office Supplies",
# "sub_category": "Software & Subscriptions",
# "confidence": 0.97,
# "model_version": "categorise-v4.2",
# "explainability": ["Merchant: AMAZON EU", "MCC: 5734"],
# "processed_at": "2026-03-17T14:23:00Z"
# }
# Submit a batch of transactions
curl -X POST https://api.trustinera.ai/v1/categorise/batch \
-H "Authorization: Bearer $TIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transactions": [
{"amount": 142.50, "currency": "GBP", "description": "AMAZON EU SARL", "date": "2026-03-17"},
{"amount": 2400.00, "currency": "GBP", "description": "GOOGLE WORKSPACE", "date": "2026-03-17"},
{"amount": 89.99, "currency": "GBP", "description": "MICROSOFT AZURE", "date": "2026-03-17"}
]
}'
# Score a transaction for fraud risk (Sentrise)
curl -X POST https://api.trustinera.ai/v1/sentrise/score \
-H "Authorization: Bearer $TIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "TXN-789",
"amount": 7500.00,
"currency": "GBP",
"merchant_name": "ACME OVERSEAS LTD",
"country": "NG",
"payment_method": "wire_transfer",
"account_id": "ACC-111"
}'
# Response:
# {
# "risk_level": "HIGH",
# "risk_score": 0.89,
# "triggered_rules": ["HIGH_VALUE_WIRE", "HIGH_RISK_COUNTRY"],
# "recommended_action": "HOLD_FOR_REVIEW",
# "case_id": "case_xyz999"
# }
SDKs & Libraries
Every SDK covers the full Trustinera AI surface — Categorise, Reconcile, TrustFlow, Sentrise, Ingestion, and Audit — with auto-generated types from the OpenAPI spec.
pip install trustinera-ai
Full type hints, async support, Jupyter kernel
npm install @trustinera/ai
Promise-based, streaming events, Zod types
go get github.com/trustinera/trustinera-go
Idiomatic Go, context-aware, gRPC + REST
# add to Cargo.toml\ntrustinera-ai = "0.4"
Async tokio, serde, full trait coverage
gem install trustinera-ai
Rails-compatible, Faraday-based
implementation "ai.trustinera:sdk:1.0"
Spring Boot starter included
API Reference
The Trustinera AI REST API follows OpenAPI 3.1. All endpoints use HTTPS, bearer-token authentication, and return structured JSON with consistent error shapes.
/api/v1/categorise
Submit transactions, retrieve classifications, manage override rules, trigger retraining, and query feedback loops.
/api/v1/reconcile
Manage reconciliation runs, exception queues, matching rules, and period close workflows programmatically.
/api/v1/trustflow
Trigger pipeline runs, manage artifact deployments, package and release Helpers, inspect experiments, and query the Feature Store.
/api/v1/sentrise
Submit transactions for risk scoring, manage watchlists and fraud rules, retrieve cases, and generate SAR exports.
/api/v1/ingestion
Create and manage data sources, ingestion targets, enrichment pipelines, and MinIO staging operations.
/api/v1/audit
Generate audit packs, retrieve event trails, schedule exports, and submit MTD/compliance submissions.
/api/v1/platform
Manage modules, users, organisations, RBAC policies, system configuration, and health endpoints.
wss://events.trustinera.ai
Subscribe to real-time events across all modules — transaction processed, pipeline completed, alert raised, audit pack ready.
Architecture
Trustinera AI is built on a microservice-first, Kubernetes-native architecture with clear service boundaries, async event buses, and a shared data lineage layer.
Each module (Categorise, Reconcile, TrustFlow, Sentrise) is an independent Rust service. Services communicate over gRPC internally and expose REST externally. No shared session state — every service is stateless and horizontally scalable.
All services ship as Helm charts with sane defaults. ConfigMaps and Secrets are namespaced per environment. Readiness and liveness probes, HPA, and PodDisruptionBudgets are configured out of the box.
All structured data stores use PostgreSQL 16 with row-level security, schema-per-module isolation, and a shared lineage schema. Migrations are handled by sqlx and applied atomically at startup.
Ingestion pipelines run as async Rust tokio tasks. Raw records land in MinIO (S3-compatible), are enriched via transform chains, and written to PostgreSQL. The pipeline DAG is defined in TrustFlow and versioned in the Artifact Registry.
Helpers are packaged in TrustFlow from registered models, prompts, feature sets, pipelines, transforms, automations, and integrations. Each Helper exposes typed tool and endpoint contracts and runs in isolated Kubernetes workloads with its own operational envelope.
Trustinera AI includes an embedded vector store (pgvector) for semantic search and Retrieval-Augmented Generation across transaction descriptions, merchant aliases, and enrichment datasets.
Every service emits OpenTelemetry traces and Prometheus metrics. Logs are structured JSON and shipped to the OpsIQ aggregation layer. Grafana dashboards for all modules are bundled in the Helm chart.
mTLS between all internal services. RBAC enforced at the API gateway and at the database layer via RLS. API keys are scoped to specific modules and operations. JWT tokens with short TTLs and refresh rotation.
For Designers
Trustinera AI ships a complete Figma design system and a Flutter component library matching the platform UI — ready for white-labelling and custom module development.
Full Figma component library — tokens, typography, icons, data tables, charts, dialogs, forms, and navigation patterns. Auto-syncs with the Flutter codebase via a code-generation pipeline.
Published Flutter package with all platform UI components. Supports light/dark themes, custom brand colours, and responsive breakpoints. Fully typed with complete widget documentation.
Colours, spacing, radii, and shadows are exported as design tokens in JSON, CSS custom properties, and Dart constants — keeping design and code in perfect sync.
Standard chart patterns for transaction volumes, confidence distributions, reconciliation completion rates, and pipeline health — as Figma frames and Flutter widgets.
All components meet WCAG 2.2 AA. Screen-reader labels, focus management, contrast ratios, and reduced-motion animations are built in, not bolted on.
Enterprise customers can apply custom brand colours, logos, and typography via a theme configuration YAML. The platform UI and Flutter client both consume this at build time.
Resources
Step-by-step walkthrough from authentication to your first working pipeline — covers CLI, REST API, and SDK approaches side by side.
Download the full OpenAPI spec for any service and generate a typed client in 20+ languages using openapi-generator or your toolchain of choice.
Every event type, payload schema, retry policy, and delivery guarantee documented with example payloads and verification code.
How to compose, version, test, and promote TrustFlow pipelines — covering DAG definition, artifact references, and A/B experiment configuration.
Build, test, package, and publish a custom Helper — from artifact composition and contract design to sandbox testing and release into System Helpers.
Provision and manage the full Trustinera AI platform as Terraform resources — modules, ingestion targets, data sources, and RBAC policies.
Pre-configured collection for all API services with environment templates for local, staging, and production. Import and explore in one click.
SDKs, Helm charts, Terraform provider, Grafana dashboards, mock server, and example integrations — all open source on GitHub.
Every API change, new endpoint, breaking change notice, and deprecation — versioned and signed. Subscribe to receive notifications.
Developer Articles
These articles focus on the build surfaces that matter in practice: packaging Helpers, building ingestions, extending modules, designing automations, and shipping integrations.
How TrustFlow packages production capabilities as Helpers, what belongs in a Helper package, and how to test and release safely.
Read articlePatterns for connector design, schema validation, mappings, transform chains, sync history, and destination safety.
Read articleGuidance for adding new module surfaces with clean boundaries across UI, API, schemas, Helper consumption, and observability.
Read articleHow to model schedules, triggers, retries, approvals, and audit-safe execution for operational automation on Trustinera AI.
Read articleA practical guide to external system integrations across auth, webhooks, polling, staging, error handling, and production rollout.
Read articleSandbox environment
The Trustinera AI sandbox mirrors production exactly. Spin up the mock server locally, or use the hosted sandbox — both support all API services and webhook delivery.
Free · No gatekeeping
Get the Trustinera editorial briefing on AI governance, explainability, and operational trust. No fake survey numbers, no credit card.
Check your inbox for the briefing link and a recommended next step.
Read the full report online →