New

TrustFlow 2.0 is live — ML pipeline management with zero-downtime model swap. Learn more →

Developer Portal

Build on Trustinera AI

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.

PythonNode.js / TSGoRustRubyJavaREST / OpenAPITerraform

Quickstart

From zero to categorised transaction in 5 minutes.

Install the CLI, authenticate, connect a data source, and categorise your first transaction batch without writing a single line of code.

01

Install the CLI

curl -fsSL https://get.trustinera.ai/cli | sh
# or: brew install trustinera/tap/tia
02

Authenticate

tia auth login
# Opens browser — sign in with your credentials
# API key is stored securely in ~/.tia/config
03

Send your first transaction

tia categorise submit \
  --amount 142.50 \
  --currency GBP \
  --description "AMAZON EU SARL" \
  --date 2026-03-17
04

Get a categorised result

{
  "category": "Office Supplies",
  "sub_category": "Software & Subscriptions",
  "confidence": 0.97,
  "model_version": "categorise-v4.2",
  "explainability": ["Merchant: AMAZON EU", "MCC: 5734"]
}

Code Examples

Real code. Copy and run.

Every API operation shown in Python, Node.js, Go, Rust, Ruby, and cURL — authenticated, annotated, and production-ready.

Authenticate
import trustinera

client = trustinera.Client(api_key="tia_sk_live_xxxxxxxxxxxx")

# Test your connection
health = client.health.check()
print(health.status)   # → "healthy"
Categorise
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())
Reconcile
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%}")
Fraud Score
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"
Authenticate
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"
Categorise
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)}%)`);
});
Webhook
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);
Authenticate
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
}
Categorise
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)
}
Authenticate
// 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(())
}
Categorise
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(())
}
Authenticate
require "trustinera_ai"

client = TrustineraAI::Client.new(api_key: ENV["TIA_API_KEY"])

health = client.health.check
puts health.status # → healthy
Categorise
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
Authenticate
# 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
# 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"
# }
Batch Categorise
# 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"}
    ]
  }'
Fraud Score
# 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

Typed clients for every stack.

Every SDK covers the full Trustinera AI surface — Categorise, Reconcile, TrustFlow, Sentrise, Ingestion, and Audit — with auto-generated types from the OpenAPI spec.

Python PyPI
pip install trustinera-ai

Full type hints, async support, Jupyter kernel

Node.js / TypeScript npm
npm install @trustinera/ai

Promise-based, streaming events, Zod types

Go pkg.go.dev
go get github.com/trustinera/trustinera-go

Idiomatic Go, context-aware, gRPC + REST

Rust crates.io
# add to Cargo.toml\ntrustinera-ai = "0.4"

Async tokio, serde, full trait coverage

Ruby RubyGems
gem install trustinera-ai

Rails-compatible, Faraday-based

Java / Kotlin Maven Central
implementation "ai.trustinera:sdk:1.0"

Spring Boot starter included

API Reference

Every endpoint. Fully documented.

The Trustinera AI REST API follows OpenAPI 3.1. All endpoints use HTTPS, bearer-token authentication, and return structured JSON with consistent error shapes.

14 endpoints

Categorise API

/api/v1/categorise

Submit transactions, retrieve classifications, manage override rules, trigger retraining, and query feedback loops.

11 endpoints

Reconcile API

/api/v1/reconcile

Manage reconciliation runs, exception queues, matching rules, and period close workflows programmatically.

28 endpoints

TrustFlow API

/api/v1/trustflow

Trigger pipeline runs, manage artifact deployments, package and release Helpers, inspect experiments, and query the Feature Store.

18 endpoints

Sentrise API

/api/v1/sentrise

Submit transactions for risk scoring, manage watchlists and fraud rules, retrieve cases, and generate SAR exports.

16 endpoints

Ingestion API

/api/v1/ingestion

Create and manage data sources, ingestion targets, enrichment pipelines, and MinIO staging operations.

9 endpoints

Audit API

/api/v1/audit

Generate audit packs, retrieve event trails, schedule exports, and submit MTD/compliance submissions.

22 endpoints

Platform API

/api/v1/platform

Manage modules, users, organisations, RBAC policies, system configuration, and health endpoints.

35 endpoints

Webhook Events

wss://events.trustinera.ai

Subscribe to real-time events across all modules — transaction processed, pipeline completed, alert raised, audit pack ready.

Architecture

Designed for Engineers and Architects.

Trustinera AI is built on a microservice-first, Kubernetes-native architecture with clear service boundaries, async event buses, and a shared data lineage layer.

Microservice Architecture

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.

  • Rust
  • gRPC
  • REST
  • Kubernetes

Kubernetes Native

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.

  • Helm
  • K8s
  • HPA
  • ConfigMaps
🐘

PostgreSQL Data Layer

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.

  • PostgreSQL
  • RLS
  • sqlx
  • Migrations

Event-Driven Ingestion

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.

  • tokio
  • MinIO
  • S3
  • DAG
🤖

Helper Packaging Framework

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.

  • Helpers
  • Packaging
  • TrustFlow
  • Isolation
🔍

Vector Store & RAG

Trustinera AI includes an embedded vector store (pgvector) for semantic search and Retrieval-Augmented Generation across transaction descriptions, merchant aliases, and enrichment datasets.

  • pgvector
  • RAG
  • LLM
  • Embeddings
📊

Observability Stack

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.

  • OpenTelemetry
  • Prometheus
  • Grafana
  • OpsIQ
🔐

Zero-Trust Security

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.

  • mTLS
  • RBAC
  • JWT
  • Zero-trust

For Designers

Design system and component library.

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.

Figma UI Kit

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.

Flutter Component Library

Published Flutter package with all platform UI components. Supports light/dark themes, custom brand colours, and responsive breakpoints. Fully typed with complete widget documentation.

Design Tokens

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.

Data Visualisation Patterns

Standard chart patterns for transaction volumes, confidence distributions, reconciliation completion rates, and pipeline health — as Figma frames and Flutter widgets.

Accessibility Standards

All components meet WCAG 2.2 AA. Screen-reader labels, focus management, contrast ratios, and reduced-motion animations are built in, not bolted on.

White-Label Theming

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

Guides, references, and community.

Guide

Getting Started Guide

Step-by-step walkthrough from authentication to your first working pipeline — covers CLI, REST API, and SDK approaches side by side.

Reference

OpenAPI Spec (OAS 3.1)

Download the full OpenAPI spec for any service and generate a typed client in 20+ languages using openapi-generator or your toolchain of choice.

Reference

Webhook Event Catalogue

Every event type, payload schema, retry policy, and delivery guarantee documented with example payloads and verification code.

Guide

TrustFlow Pipeline Authoring

How to compose, version, test, and promote TrustFlow pipelines — covering DAG definition, artifact references, and A/B experiment configuration.

Guide

Helper Development

Build, test, package, and publish a custom Helper — from artifact composition and contract design to sandbox testing and release into System Helpers.

Guide

Terraform Provider Guide

Provision and manage the full Trustinera AI platform as Terraform resources — modules, ingestion targets, data sources, and RBAC policies.

Tool

Postman Collection

Pre-configured collection for all API services with environment templates for local, staging, and production. Import and explore in one click.

Open Source

GitHub — Trustinera AI

SDKs, Helm charts, Terraform provider, Grafana dashboards, mock server, and example integrations — all open source on GitHub.

Updates

Changelog

Every API change, new endpoint, breaking change notice, and deprecation — versioned and signed. Subscribe to receive notifications.

Developer Articles

Implementation writing for teams building on Trustinera AI.

These articles focus on the build surfaces that matter in practice: packaging Helpers, building ingestions, extending modules, designing automations, and shipping integrations.

Article

Developing Helpers

How TrustFlow packages production capabilities as Helpers, what belongs in a Helper package, and how to test and release safely.

Read article
Article

Developing Ingestions

Patterns for connector design, schema validation, mappings, transform chains, sync history, and destination safety.

Read article
Article

Developing Modules

Guidance for adding new module surfaces with clean boundaries across UI, API, schemas, Helper consumption, and observability.

Read article
Article

Developing Automations

How to model schedules, triggers, retries, approvals, and audit-safe execution for operational automation on Trustinera AI.

Read article
Article

Developing Integrations

A practical guide to external system integrations across auth, webhooks, polling, staging, error handling, and production rollout.

Read article

Sandbox environment

Test every API endpoint with realistic synthetic data — no production data required.

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.