What is Kapix?
Kapix is a financial intelligence platform that exposes real-time credit scoring, fraud detection, risk assessment, and decision automation via a unified REST API.
Every API call returns a structured decision object — score, confidence, feature attribution, and a full audit trail — within single-digit milliseconds. The platform is built to be dropped into existing systems with minimal integration overhead.
Make your first API call
Get up and running in under five minutes. You'll need an API key — grab one from the dashboard.
1. Install the SDK
# Node.js
npm install @kapix/sdk
# Python
pip install kapix-sdk
# Go
go get github.com/kapix/kapix-go2. Initialise the client
import Kapix from "@kapix/sdk";
const client = new Kapix({
apiKey: process.env.KAPIX_API_KEY,
region: "af-west-1", // or "eu-west-1", "us-east-1"
});3. Score a credit request
const result = await client.credit.score({
entity_id: "ent_01HXYZ4A3B",
entity_type: "individual",
data_sources: ["bureau", "mobile_money", "transaction_history"],
});
console.log(result.score); // 0.847
console.log(result.decision); // "approve"
console.log(result.latency_ms); // 11KAPIX_API_KEY in your environment rather than hardcoding it. All requests are authenticated via Bearer token — see Authentication below.Authenticating requests
Kapix uses API keys transmitted as Bearer tokens in the Authorization header. All endpoints require authentication.
Authorization: Bearer kpx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxKey types
| Prefix | Environment | Usage |
|---|---|---|
kpx_live_ | Production | Live traffic, billed |
kpx_test_ | Sandbox | Free, returns synthetic data |
Credit Scoring
Score any entity — individual, SME, or corporate — in real time with fully explainable AI outputs and regulatory-compliant audit trails.
/v2/credit/scoreRequest body
| Parameter | Type | Description |
|---|---|---|
entity_idreq | string | Unique identifier for the entity being scored. |
entity_typereq | enum | "individual" | "sme" | "corporate" |
data_sourcesreq | string[] | Array of data source keys to include in the scoring run. |
context | object | Optional metadata such as loan purpose, amount, or tenure. |
explain | boolean | Set true to include feature attribution in the response. Default: true. |
Example request
const score = await client.credit.score({
entity_id: "ent_01HXYZ4A3B",
entity_type: "individual",
data_sources: ["bureau", "mobile_money"],
context: {
loan_amount: 500000, // in minor currency units
loan_purpose: "working_capital",
tenure_days: 90,
},
explain: true,
});Response
{
"score": 0.847,
"decision": "approve",
"confidence": 0.94,
"risk_band": "A2",
"latency_ms": 11,
"request_id": "req_01JXYZ9QWE",
"explanation": {
"top_features": [
{ "feature": "repayment_consistency", "weight": 0.31, "direction": "positive" },
{ "feature": "mobile_money_velocity", "weight": 0.24, "direction": "positive" },
{ "feature": "bureau_derogatory", "weight": 0.18, "direction": "negative" }
]
},
"audit_id": "aud_01JXYZ9QWF"
}Fraud Detection
Detect anomalous patterns across transaction streams in real time. Multi-layered detection reduces false positives by 73% over rule-based systems.
/v2/fraud/evaluateExample request
const result = await client.fraud.evaluate({
transaction_id: "txn_01HABC1234",
amount: 45000, // minor currency units
currency: "NGN",
sender_id: "ent_01HXYZ4A3B",
receiver_id: "ent_01HABC5678",
channel: "mobile_app",
metadata: {
device_fingerprint: "fp_xxxx",
ip_address: "102.89.x.x",
session_age_s: 120,
},
});
// result.fraud_score — 0.0 (clean) to 1.0 (definite fraud)
// result.action — "allow" | "challenge" | "block"
// result.signals — array of triggered signal namesResponse
{
"fraud_score": 0.07,
"action": "allow",
"confidence": 0.96,
"signals": [],
"latency_ms": 9,
"request_id": "req_01JXYZABCD"
}Risk Assessment
Quantify and decompose portfolio risk in real time. Dynamic models adjust to market shifts, counterparty changes, and macro-economic signals.
/v2/risk/assess/v2/risk/portfolio/{portfolio_id}// Assess a single exposure
const assessment = await client.risk.assess({
exposure_id: "exp_01HXYZ0001",
exposure_type: "loan",
counterparty: "ent_01HABC5678",
amount: 10_000_000,
currency: "NGN",
tenor_days: 180,
});
// result.risk_score — 0.0 (minimal) to 1.0 (critical)
// result.risk_category — "low" | "medium" | "high" | "critical"
// result.var_95 — value at risk at 95% confidence
// result.expected_loss — expected monetary lossDecision Engine
Automate complex multi-signal workflows. Every decision carries a full audit trail, confidence score, and override capability.
/v2/decisions/run/v2/decisions/{decision_id}const decision = await client.decisions.run({
policy_id: "pol_loan_origination_v3",
inputs: {
credit_score_id: score.request_id,
fraud_eval_id: result.request_id,
applicant_id: "ent_01HXYZ4A3B",
requested_amount: 500000,
},
override_window_s: 300, // allow manual override for 5 minutes
});
// decision.outcome — "approve" | "decline" | "refer"
// decision.reason — human-readable explanation
// decision.audit_id — immutable audit record IDSDKs
Official SDKs are available for Node.js, Python, Go, and Java. All SDKs are typed, tested, and kept in sync with the API.
npm install @kapix/sdkpip install kapix-sdkgo get github.com/kapix/kapix-goimplementation 'io.kapix:sdk:2.1.0'429 (rate limit) and 503 (service unavailable) with exponential backoff. Set maxRetries: 0 to disable.Webhooks
Subscribe to real-time event notifications. Kapix signs every webhook payload so you can verify its authenticity.
Available events
| Event | Fired when |
|---|---|
credit.score.completed | A credit scoring request finishes |
fraud.alert.raised | A transaction is flagged or blocked |
decision.made | A decision engine policy fires |
model.drift.detected | A model's accuracy drops below threshold |
api_key.rotated | An API key is created or revoked |
Verifying signatures
import { createHmac, timingSafeEqual } from "crypto";
function verifyWebhook(
payload: string,
signature: string,
secret: string
): boolean {
const expected = createHmac("sha256", secret)
.update(payload)
.digest("hex");
return timingSafeEqual(
Buffer.from(signature, "hex"),
Buffer.from(expected, "hex")
);
}
// In your Express/Next.js route:
const sig = req.headers["kapix-signature"] as string;
if (!verifyWebhook(rawBody, sig, process.env.KAPIX_WEBHOOK_SECRET!)) {
return res.status(401).json({ error: "Invalid signature" });
}Rate Limits
Limits are applied per API key. Headers on every response tell you your current usage.
| Plan | Requests / min | Requests / day | Burst |
|---|---|---|---|
| Sandbox | 60 | 5,000 | 10 |
| Growth | 600 | 200,000 | 100 |
| Scale | 3,000 | 2,000,000 | 500 |
| Enterprise | Custom | Custom | Custom |
Rate limit headers
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1714492800
Retry-After: 12 # only present on 429 responsesErrors & Codes
All errors return a consistent JSON shape with a machine-readable code and a human-readable message.
{
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "No entity found with id ent_01HXYZ4A3B",
"docs": "https://usekapix.com/docs/errors#ENTITY_NOT_FOUND",
"request_id": "req_01JXYZ9QWE"
}
}| HTTP | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | Request body failed schema validation |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Key lacks permission for this endpoint |
| 404 | ENTITY_NOT_FOUND | Requested resource does not exist |
| 409 | DUPLICATE_REQUEST | Idempotency key already used |
| 422 | INSUFFICIENT_DATA | Not enough data to produce a reliable score |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests — check Retry-After header |
| 500 | INTERNAL_ERROR | Unexpected server error — auto-retryable |
| 503 | SERVICE_UNAVAILABLE | Region under elevated load — auto-retryable |
request_id when contacting support — it lets the team pull the exact trace from our systems.