# BRAINIAC Maritime Intelligence — Demurrage Cost Calculator

> BRAINIAC Maritime Intelligence — Demurrage Cost Calculator is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-12).

Calculates demurrage costs and excess laytime for one or more voyage cases using caller-supplied laytime allowances, rates, and usage data.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/maritime-intelligence/demurrage-cost-calculate?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-maritime-intelligence-demurrage-cost-calculator-ef0ec16a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A6tRwkT6Yi9FX2JNO4GF8

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-maritime-intelligence-demurrage-cost-calculator-ef0ec16a -d '<json body>'
```

Example prompt: Calculate the demurrage cost for voyage VOY1 on vessel IMO 9876543 — laytime allowed was 48 hours, laytime used was 72 hours, and the demurrage rate is $12,000 per day in USD.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call, no-account computation of demurrage costs from structured voyage data you already have — especially useful in agentic workflows where you want to validate or cross-check demurrage invoices, summarize multi-case laytime overages from a CSV, or programmatically compute charges without a full TMS integration. Not suited for fetching real-time AIS positions or generating legally binding demurrage invoices.

## Known failure modes

- Missing required laytime fields (allowed hours, used hours, rate) result in incomplete or null calculations
- Malformed CSV or JSON input may cause parsing errors
- Exceeding maxItems (500 vessels, 20 files) returns a validation error
- Missing demurrage case objects with no identifying IDs produce unattributed results
- Supplying contradictory data (e.g. laytime used less than allowed) results in zero excess hours with no demurrage charged

## 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 JSON object with an items array containing per-case results including vessel ID, voyage ID, excess hours, demurrage amount, laytime used and allowed, demurrage rate per day, and flags indicating which values were caller-supplied vs computed. Also includes overall status, case count, total demurrage amount, findings list, and a limitations section disclosing that all inputs are caller-supplied and results are not legal invoices.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 200000
  },
  "asOf": {
   "type": "string",
   "maxLength": 40
  },
  "file": {
   "type": "object",
   "required": [
    "fileBase64"
   ],
   "properties": {
    "role": {
     "type": "string",
     "maxLength": 80
    },
    "filename": {
     "type": "string",
     "maxLength": 180,
     "minLength": 1
    },
    "mediaType": {
     "enum": [
      "text/plain",
      "text/csv",
      "application/json",
      "application/octet-stream"
     ],
     "type": "string"
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "json": {
   "type": "string",
   "maxLength": 200000
  },
  "text": {
   "type": "string",
   "maxLength": 200000
  },
  "files": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "fileBase64"
    ],
    "properties": {
     "role": {
      "type": "string",
      "maxLength": 80
     },
     "filename": {
      "type": "string",
      "maxLength": 180,
      "minLength": 1
     },
     "mediaType": {
      "enum": [
       "text/plain",
       "text/csv",
       "application/json",
       "application/octet-stream"
      ],
      "type": "string"
     },
     "fileBase64": {
      "type": "string",
      "maxLength": 12000000,
      "minLength": 1
     }
    },
    "additionalProperties": false
   },
   "maxItems": 20
  },
  "vessels": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "imo": {
      "type": "string",
      "maxLength": 20
     },
     "flag": {
      "type": "string",
      "maxLength": 80
     },
     "mmsi": {
      "type": "string",
      "maxLength": 20
     },
     "name": {
      "type": "string",
      "maxLength": 200
     },
     "owner": {
      "type": "string",
      "maxLength": 200
     },
     "source": {
      "type": "string",
      "maxLength": 200
     },
     "callSign": {
      "type": "string",
      "maxLength": 40
     },
     "operator": {
      "type": "string",
      "maxLength": 200
     },
     "vesselType": {
      "type": "string",
      "maxLength": 80
     }
    },
    "additionalProperties": false
   },
   "maxItems": 500
  },
  "aisPoints": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "at": {
      "type": "string",
      "maxLength": 40
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "id": "D1",
    "source": "Caller-supplied",
    "currency": "USD",
    "vesselId": "V1",
    "voyageId": "VOY1",
    "excessHours": 24,
    "demurrageAmount": 12000,
    "laytimeUsedHours": 72,
    "demurrageRatePerDay": 12000,
    "excessHoursSupplied": true,
    "laytimeAllowedHours": 48,
    "legalInvoiceClaimed": false,
    "demurrageAmountSupplied": true,
    "laytimeUsedHoursSupplied": true,
    "demurrageRatePerDaySupplied": true,
    "laytimeAllowedHoursSupplied": true
   }
  ],
  "status": "calculated",
  "findings": [],
  "caseCount": 1,
  "checkedAt": "2026-11-04T21:00:00.000Z",
  "limitations": [
   "Vessel identities, AIS points, waypoints, port samples, demurrage cases, sanctions entries, cargo events, and ownership records are copied only from labeled fields supplied by the caller, or from the key-free public OFAC SDN publication when fetchOfac is requested.",
   "No paid AIS service is used and no API key is required. Global real-time vessel coverage is not claimed.",
   "Track gaps, route deviations, and ETA values use only supplied positions/speeds and simple geodesic math. Missing values are not invented.",
   "Sanctions signals are name/IMO comparisons only. Exact matches are labeled as signals, not confirmed legal determinations. Possible matches require human review.",
   "Demurrage amounts use only caller-supplied laytime and rate inputs and are not legal invoices."
  ],
  "ofacFetched": false,
  "paidAisUsed": false,
  "apiKeyRequired": false,
  "paidProviderUsed": false,
  "totalDemurrageAmount": 12000,
  "globalRealtimeCoverageClaimed": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-maritime-intelligence-demurrage-cost-calculator-ef0ec16a/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)
