# BRAINIAC Terminal Profitability API

> BRAINIAC Terminal Profitability API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-14).

Calculates per-terminal profitability, net profit, revenue breakdown by transaction type, and profitability ranking for a fleet of payment terminals

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/agent-networks/terminal-profitability?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-terminal-profitability-api-41f99740
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sTLo1iHtbeip2MleUvUx9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-terminal-profitability-api-41f99740 -d '<json body>'
```

Example prompt: I have three payment terminals — T1 (USD) with rent $200, equipment $50, maintenance $20, connectivity $30, other $10; T2 (USD) with rent $100, connectivity $20; and T3 (EUR) with rent $150 — and I want to know which is most profitable given their transaction histories and fee structures (cash-in at $50 fixed fee, bill-pay at 1.5% of value, transfers tiered). Can you calculate net profit, profit margin, and rank them?

## When to prefer this

Use this endpoint when you need to compute profitability, profit margins, break-even analysis, and revenue attribution across a fleet of payment terminals with complex fee structures (fixed, percent, or tiered) and variable operating costs. It is ideal for fintech operators, ATM network managers, or payment kiosk businesses that need per-terminal financial analytics without building their own calculation engine. Prefer this over generic financial APIs when your data includes terminal-level cost centers, revenue share agreements in basis points, and multiple transaction types with distinct fee schedules.

## Known failure modes

- Missing required fields (terminal id or currency) returns a validation error
- Transaction referencing an unknown terminal_id returns an error or is excluded
- Malformed fee structure (e.g. tiered fee missing tiers array) causes computation failure
- Exceeding maxItems limits (200 terminals, 5000 transactions, 40 transaction types) returns a 400 error
- Invalid currency format (not 3 uppercase letters) fails schema validation
- Negative or out-of-range integer values for costs or fees fail validation

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a structured JSON object with: a ranked list of terminals by net profit within each currency, net profit details per terminal (amount, profit margin in bps, break-even count, revenue per transaction, total transaction count), total revenue per terminal, itemized operating costs breakdown, and revenue by transaction type including fee calculation steps and revenue share applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "terminals": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "currency"
    ],
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1
     },
     "costs": {
      "type": "object",
      "properties": {
       "rent": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       },
       "other": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       },
       "equipment": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       },
       "maintenance": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       },
       "connectivity": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
     }
    },
    "additionalProperties": false
   },
   "maxItems": 200,
   "minItems": 1
  },
  "transactions": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "terminal_id",
     "type_id",
     "count",
     "value"
    ],
    "properties": {
     "count": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
     },
     "value": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
     },
     "type_id": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1
     },
     "terminal_id": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1
     }
    },
    "additionalProperties": false
   },
   "maxItems": 5000
  },
  "transaction_types": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "fee"
    ],
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1
     },
     "fee": {
      "type": "object",
      "required": [
       "kind"
      ],
      "properties": {
       "kind": {
        "enum": [
         "fixed",
         "percent",
         "tiered"
        ],
        "type": "string"
       },
       "tiers": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "up_to": {
           "type": "integer",
           "maximum": 9007199254740991,
           "minimum": 0
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ranking": [
   {
    "rank": 1,
    "currency": "EUR",
    "net_profit": 600,
    "terminal_id": "t3"
   },
   {
    "rank": 1,
    "currency": "USD",
    "net_profit": 3270,
    "terminal_id": "t1"
   },
   {
    "rank": 2,
    "currency": "USD",
    "net_profit": 40,
    "terminal_id": "t2"
   }
  ],
  "net_profit": [
   {
    "amount": 3270,
    "currency": "USD",
    "terminal_id": "t1",
    "break_even_count": 4,
    "profit_margin_bps": 9134,
    "transaction_count": 37,
    "revenue_per_transaction": 96
   },
   {
    "amount": 40,
    "currency": "USD",
    "terminal_id": "t2",
    "break_even_count": 3,
    "profit_margin_bps": 2500,
    "transaction_count": 4,
    "revenue_per_transaction": 40
   },
   {
    "amount": 600,
    "currency": "EUR",
    "terminal_id": "t3",
    "break_even_count": 2,
    "profit_margin_bps": 8000,
    "transaction_count": 10,
    "revenue_per_transaction": 75
   }
  ],
  "total_revenue": [
   {
    "amount": 3580,
    "currency": "USD",
    "terminal_id": "t1"
   },
   {
    "amount": 160,
    "currency": "USD",
    "terminal_id": "t2"
   },
   {
    "amount": 750,
    "currency": "EUR",
    "terminal_id": "t3"
   }
  ],
  "operating_costs": [
   {
    "rent": 200,
    "other": 10,
    "total": 310,
    "currency": "USD",
    "equipment": 50,
    "maintenance": 20,
    "terminal_id": "t1",
    "connectivity": 30
   },
   {
    "rent": 100,
    "other": 0,
    "total": 120,
    "currency": "USD",
    "equipment": 0,
    "maintenance": 0,
    "terminal_id": "t2",
    "connectivity": 20
   },
   {
    "rent": 150,
    "other": 0,
    "total": 150,
    "currency": "EUR",
    "equipment": 0,
    "maintenance": 0,
    "terminal_id": "t3",
    "connectivity": 0
   }
  ],
  "revenue_by_type": [
   {
    "count": 20,
    "value": 400000,
    "revenue": 800,
    "type_id": "cash_in",
    "fee_steps": [
     {
      "fee": 1000,
      "step": "fixed",
      "count": 20,
      "amount": 50
     }
    ],
    "terminal_id": "t1",
    "fee_before_share": 1000,
    "revenue_share_bps": 8000
   },
   {
    "count": 5,
    "value": 100000,
    "revenue": 1500,
    "type_id": "bill_pay",
    "fee_steps": [
     {
      "fee": 1500,
      "step": "percent",
      "value": 100000,
      "rate_bps": 150
     }
    ],
    "terminal_id": "t1",
    "fee_before_share": 1500,
    "revenue_share_bps": 10000
   },
   {
    "count": 12,
    "value": 240000,
    "revenue": 1280,
    "type_id": "transfer",
    "f
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-terminal-profitability-api-41f99740/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
