{"openapi":"3.1.0","info":{"title":"Predictive & Customer Analytics API","version":"1.0.0","description":"K-means and DBSCAN clustering, PCA, CART and random-forest importance, Kaplan-Meier and Cox survival, cohort retention, RFM segments, BG/NBD CLV, market-basket rules, PELT changepoints, classification metrics, correlations and propensity-score matching — pure computation on the numbers you send. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses x402 with exact USDC on Base (8453). Each paid resource accepts POST for the call; unpaid GET/HEAD return the same 402 payment challenge for discovery.\nHow to call an operation:\n1. POST JSON matching the requestBody. An unpaid POST (including empty body) returns 402 payment terms before body validation.\n2. Compare 402 payTo, asset, and network with /api/v1/catalog and /.well-known/x402 — not only with the 402 itself.\n3. Pay and retry with payment-signature. Invalid JSON/schema after payment-signature returns 400 and is not charged. Settlement (a charge) only on 2xx. payment-signature attached ≠ charged.\nIdempotency-Key: 64 hex chars from 32 random bytes. Reuse only for the same operation and body (replays stored response, including status=partial). A new key runs a fresh call.\nIdempotency after errors: unpaid 402 does not store the key. Post-signature 402/503 release it (retry same key). Pre-reserve schema 400 does not store it. Other post-signature responses (2xx/4xx/5xx) are stored: same key+body replays; different body → 409. Stored 4xx/5xx replays are not a second charge. Prefer a new key after fixing a 4xx; after 5xx reuse the same key only for the stored error.\nPost-signature 402/503 include prior-payment-attempt (nonce, settled false|unknown). A facilitator 502 is SETTLEMENT_UNKNOWN (stored under the Idempotency-Key; cross-instance replay needs the shared store; may already be charged) — check USDC authorizationState(payer, nonce) on Base before re-signing.\nSettlement signal: settled 2xx include payment-response. 4xx/5xx do not. Do not book a cost from payment-signature alone.\nCoverage billing: HTTP 200 with status complete, partial, or failed is charged at the full listed price. Retrying missing checks needs a new settled call. 4xx/5xx are not charged.\nmissing_items.reason: timeout/rate_limited → one delayed retry (new key); upstream_down → after recovery; not_supported → never.\nInvariants: any missing_items ⇒ not status complete; sources[] is provenance only (source, url, retrievedAt), never success/error keyed by check.\nFree lookup: GET /api/v1/results/{result_id} returns stored coverage JSON (404 RESULT_NOT_FOUND if unknown/expired; not a 402). Prior-Result-Id sets replaces_result_id.\nOutputs are prechecks/drafts for human review — not official determinations, legal advice, or certified filings."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/predictive-analytics/kmeans-cluster":{"post":{"operationId":"k_means_clustering_with_silhouette_k_selection","summary":"K-means clustering with silhouette k-selection","description":"Lloyd k-means with k-means++ seeding, optional standardisation, nInit restarts, silhouette and inertia for a k range, and stable label renumbering.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"columns":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rows":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"array","items":{"type":["number","null"]}}},"k":{"type":"integer","minimum":2,"maximum":50},"kRange":{"type":"array","prefixItems":[{"type":"integer","minimum":2,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":50}],"items":false,"minItems":2,"maxItems":2},"standardize":{"default":true,"type":"boolean"},"seed":{"default":42,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nInit":{"default":10,"type":"integer","minimum":1,"maximum":50},"maxIter":{"default":300,"type":"integer","minimum":1,"maximum":1000}},"required":["columns","rows"],"additionalProperties":false},"example":{"columns":["x","y"],"rows":[[1,1],[1.5,2],[2,1.5],[1.2,1.4],[8,8],[8.5,9],[9,8.2],[8.2,8.8],[1,9],[1.5,8.5],[2,9.2],[1.3,8.8]],"k":3,"kRange":[2,4],"standardize":false,"seed":42,"nInit":10,"maxIter":300}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"k":{"type":"number"},"labels":{"type":"array","items":{"type":["number","string"]}},"centroids":{"type":"array","items":{"type":["array","string"],"items":{"type":"number"}}},"inertia":{"type":"number"},"silhouette":{"type":"number"},"kSelection":{"type":"array","items":{"type":["object","string"],"properties":{"k":{"type":"number"},"inertia":{"type":"number"},"silhouette":{"type":"number"}},"additionalProperties":true}},"rowsUsed":{"type":"number"},"droppedRows":{"type":"number"},"caps":{"type":"object","properties":{"maxRows":{"type":"number"},"maxColumns":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"k":3,"labels":[0,0,"…"],"centroids":[[1.425,1.475],[8.425,8.5],"…"],"inertia":3.12,"silhouette":0.888706231706,"kSelection":[{"k":2,"inertia":100.7025,"silhouette":0.628401182113},{"k":3,"inertia":3.12,"silhouette":0.888706231706},"…"],"rowsUsed":12,"droppedRows":0,"caps":{"maxRows":50000,"maxColumns":100},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Lloyd k-means with k-means++ seeding, nInit restarts, labels renumbered by first appearance.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/dbscan-cluster":{"post":{"operationId":"dbscan_density_clustering_with_noise_labels","summary":"DBSCAN density clustering with noise labels","description":"Density-based clustering with Euclidean or haversine distance, core/border/noise labelling, and an optional k-distance knee suggestion for eps.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"columns":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rows":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"array","items":{"type":["number","null"]}}},"eps":{"type":"number","exclusiveMinimum":0},"minSamples":{"default":5,"type":"integer","minimum":2,"maximum":1000},"metric":{"default":"euclidean","type":"string","enum":["euclidean","haversine"]},"kDistance":{"default":false,"type":"boolean"}},"required":["columns","rows","eps"],"additionalProperties":false},"example":{"columns":["x","y"],"rows":[[1,1],[1.5,2],[2,1.5],[1.2,1.4],[8,8],[8.5,9],[9,8.2],[8.2,8.8],[1,9],[1.5,8.5],[2,9.2],[1.3,8.8],[5,5]],"eps":1.5,"minSamples":3,"metric":"euclidean","kDistance":false}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":["number","string"]}},"clusters":{"type":"number"},"noise":{"type":"number"},"corePoints":{"type":"number"},"kDistance":{"type":"null"},"rowsUsed":{"type":"number"},"droppedRows":{"type":"number"},"caps":{"type":"object","properties":{"maxRows":{"type":"number"},"maxColumns":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"labels":[0,0,"…"],"clusters":3,"noise":1,"corePoints":12,"kDistance":null,"rowsUsed":13,"droppedRows":0,"caps":{"maxRows":50000,"maxColumns":100},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["DBSCAN (Ester et al. 1996). Border points join the first core cluster reached in row order.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/pca":{"post":{"operationId":"principal_component_analysis","summary":"Principal component analysis","description":"Centre (and optionally standardise) columns, decompose the covariance, and return eigenvalues, explained ratios, signed loadings and optional scores.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"columns":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rows":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"array","items":{"type":["number","null"]}}},"standardize":{"default":false,"type":"boolean"},"components":{"type":"integer","minimum":1,"maximum":100},"returnScores":{"default":true,"type":"boolean"}},"required":["columns","rows"],"additionalProperties":false},"example":{"columns":["x","y"],"rows":[[2.5,2.4],[0.5,0.7],[2.2,2.9],[1.9,2.2],[3.1,3],[2.3,2.7],[2,1.6],[1,1.1],[1.5,1.6],[1.1,0.9]],"standardize":false,"components":2,"returnScores":true}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"eigenvalues":{"type":"array","items":{"type":"number"}},"explainedRatio":{"type":"array","items":{"type":"number"}},"loadings":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"scores":{"type":"array","items":{"type":["array","string"],"items":{"type":"number"}}},"rowsUsed":{"type":"number"},"droppedRows":{"type":"number"},"caps":{"type":"object","properties":{"maxRows":{"type":"number"},"maxColumns":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"eigenvalues":[1.28402771217,0.0490833989383],"explainedRatio":[0.963181314349,0.0368186856514],"loadings":[[0.677873398528,0.735178655544],[0.735178655544,-0.677873398528]],"scores":[[0.827970186201,0.175115307047],[-1.77758032528,-0.142857226544],"…"],"rowsUsed":10,"droppedRows":0,"caps":{"maxRows":50000,"maxColumns":100},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["PCA via spectral decomposition of the covariance (or correlation when standardize=true). Loadings flip so the largest-a…","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/decision-tree-train":{"post":{"operationId":"train_a_cart_decision_tree","summary":"Train a CART decision tree","description":"Fit a classification or regression CART tree with depth and leaf limits, readable rules, feature importance and optional predictions.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"type":"string","enum":["classification","regression"]},"columns":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rows":{"minItems":2,"maxItems":50000,"type":"array","items":{"type":"array","items":{"type":["number","null"]}}},"target":{"minItems":2,"maxItems":50000,"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","minLength":1,"maxLength":64}]}},"maxDepth":{"default":5,"type":"integer","minimum":1,"maximum":20},"minSamplesLeaf":{"default":1,"type":"integer","minimum":1,"maximum":1000},"predict":{"maxItems":10000,"type":"array","items":{"type":"array","items":{"type":"number"}}}},"required":["task","columns","rows","target"],"additionalProperties":false},"example":{"task":"classification","columns":["age","income"],"rows":[[25,40],[35,60],[45,80],[20,20],[50,90],[23,30],[40,70],[60,100],[30,50],[55,95]],"target":[0,0,1,0,1,0,1,1,0,1],"maxDepth":2,"minSamplesLeaf":1,"predict":[[33,66]]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"string"}},"tree":{"type":"object","properties":{"feature":{"type":"string"},"threshold":{"type":"number"},"left":{"type":"object","properties":{"value":{"type":"number"}},"additionalProperties":true},"right":{"type":"object","properties":{"value":{"type":"number"}},"additionalProperties":true}},"additionalProperties":true},"featureImportance":{"type":"object","properties":{"age":{"type":"number"},"income":{"type":"number"}},"additionalProperties":true},"trainAccuracy":{"type":"number"},"predictions":{"type":"array","items":{"type":"number"}},"warnings":{"type":"array","items":{}},"rowsUsed":{"type":"number"},"droppedRows":{"type":"number"},"caps":{"type":"object","properties":{"maxRows":{"type":"number"},"maxColumns":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"rules":["if income <= 65 then 0 (n=5, purity 1)","if income > 65 then 1 (n=5, purity 1)"],"tree":{"feature":"income","threshold":65,"left":{"value":0},"right":{"value":1}},"featureImportance":{"age":0,"income":1},"trainAccuracy":1,"predictions":[1],"warnings":[],"rowsUsed":10,"droppedRows":0,"caps":{"maxRows":50000,"maxColumns":100},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["CART with midpoint thresholds, Gini or MSE, ties broken by lower column index then lower threshold.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/random-forest-importance":{"post":{"operationId":"random_forest_oob_score_and_permutation_importance","summary":"Random-forest OOB score and permutation importance","description":"Train a small seeded random forest, report out-of-bag accuracy or R², and estimate permutation feature importance with Fisher-Yates shuffles.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"type":"string","enum":["classification","regression"]},"columns":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rows":{"minItems":2,"maxItems":50000,"type":"array","items":{"type":"array","items":{"type":["number","null"]}}},"target":{"minItems":2,"maxItems":50000,"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","minLength":1,"maxLength":64}]}},"trees":{"default":100,"type":"integer","minimum":10,"maximum":500},"maxFeatures":{"default":"sqrt","anyOf":[{"type":"string","enum":["sqrt","log2"]},{"type":"integer","minimum":1,"maximum":100}]},"maxDepth":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"seed":{"default":42,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"permutationRepeats":{"default":5,"type":"integer","minimum":1,"maximum":50},"minSamplesLeaf":{"default":1,"type":"integer","minimum":1,"maximum":1000}},"required":["task","columns","rows","target"],"additionalProperties":false},"example":{"task":"classification","columns":["signal","noise1","noise2"],"rows":[[0,0,0],[0.025,37,53],[0.05,74,9],[0.075,10,62],[0.1,47,18],[0.125,84,71],[0.15,20,27],[0.175,57,80],[0.2,94,36],[0.225,30,89],[0.25,67,45],[0.275,3,1],[0.3,40,54],[0.325,77,10],[0.35,13,63],[0.375,50,19],[0.4,87,72],[0.425,23,28],[0.45,60,81],[0.475,97,37],[0.5,33,90],[0.525,70,46],[0.55,6,2],[0.575,43,55],[0.6,80,11],[0.625,16,64],[0.65,53,20],[0.675,90,73],[0.7,26,29],[0.725,63,82],[0.75,100,38],[0.775,36,91],[0.8,73,47],[0.825,9,3],[0.85,46,56],[0.875,83,12],[0.9,19,65],[0.925,56,21],[0.95,93,74],[0.975,29,30]],"target":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"trees":40,"maxFeatures":"sqrt","maxDepth":null,"seed":42,"permutationRepeats":2}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"oobScore":{"type":"number"},"importance":{"type":"array","items":{"type":["object","string"],"properties":{"feature":{"type":"string"},"mean":{"type":"number"},"sd":{"type":"number"}},"additionalProperties":true}},"seed":{"type":"number"},"rowsUsed":{"type":"number"},"droppedRows":{"type":"number"},"caps":{"type":"object","properties":{"maxRows":{"type":"number"},"maxColumns":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"oobScore":0.975,"importance":[{"feature":"signal","mean":0.4125,"sd":0.053033008589},{"feature":"noise1","mean":0,"sd":0},"…"],"seed":42,"rowsUsed":40,"droppedRows":0,"caps":{"maxRows":50000,"maxColumns":100},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Random forest with mulberry32 bootstrap samples and Fisher-Yates permutation importance.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/kaplan-meier-survival":{"post":{"operationId":"kaplan_meier_survival_curves_and_log_rank_test","summary":"Kaplan-Meier survival curves and log-rank test","description":"Estimate group Kaplan-Meier curves with Greenwood log-log confidence intervals, median survival, survival at chosen times, and a multi-group log-rank test.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subjects":{"minItems":2,"maxItems":100000,"type":"array","items":{"type":"object","properties":{"time":{"type":"number","exclusiveMinimum":0},"event":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]},"group":{"default":"all","type":"string","minLength":1,"maxLength":64}},"required":["time","event"],"additionalProperties":false}},"confidence":{"default":0.95,"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1},"at":{"maxItems":1000,"type":"array","items":{"type":"number","exclusiveMinimum":0}}},"required":["subjects"],"additionalProperties":false},"example":{"subjects":[{"time":6,"event":1,"group":"6-MP"},{"time":1,"event":1,"group":"placebo"},{"time":10,"event":1,"group":"6-MP"},{"time":2,"event":1,"group":"placebo"},{"time":22,"event":1,"group":"6-MP"},{"time":8,"event":1,"group":"placebo"}],"confidence":0.95,"at":[10,22]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"median":{"type":"number"},"survivalAt":{"type":"array","items":{"type":["object","string"],"properties":{"t":{"type":"number"},"S":{"type":"number"}},"additionalProperties":true}},"curve":{"type":"array","items":{"type":["object","string"],"properties":{"t":{"type":"number"},"atRisk":{"type":"number"},"events":{"type":"number"},"S":{"type":"number"},"ciLow":{"type":"number"},"ciHigh":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true}},"logRank":{"type":"object","properties":{"chiSquare":{"type":"number"},"df":{"type":"number"},"p":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"groups":[{"group":"6-MP","median":23,"survivalAt":[{"t":10,"S":0.752941176471},{"t":13,"S":0.690196078431},"…"],"curve":[{"t":6,"atRisk":21,"events":3,"S":0.857142857143,"ciLow":0.619717955266,"ciHigh":0.951551747647},{"t":7,"atRisk":17,"events":1,"S":0.806722689076,"ciLow":0.563146564622,"ciHigh":0.922809019203},"…"]},{"group":"placebo","median":8,"survivalAt":[{"t":10,"S":0.380952380952},{"t":13,"S":0.190476190476},"…"],"curve":[{"t":1,"atRisk":21,"events":2,"S":0.904761904762,"ciLow":0.670045882235,"ciHigh":0.975294149038},{"t":2,"atRisk":19,"events":2,"S":0.809523809524,"ciLow":0.568905059924,"ciHigh":0.923888828559},"…"]}],"logRank":{"chiSquare":16.7929409892,"df":1,"p":0.0000416880910933},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Kaplan-Meier with Greenwood variance and log-log confidence intervals; log-rank uses hypergeometric variance.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/cox-regression":{"post":{"operationId":"cox_proportional_hazards_regression","summary":"Cox proportional hazards regression","description":"Maximise the Cox partial likelihood with Efron or Breslow ties, return hazard ratios with SEs, concordance, and a rank-time proportional-hazards check.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subjects":{"minItems":2,"maxItems":100000,"type":"array","items":{"type":"object","properties":{"time":{"type":"number","exclusiveMinimum":0},"event":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]},"covariates":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"number"}}},"required":["time","event","covariates"],"additionalProperties":false}},"ties":{"default":"efron","type":"string","enum":["efron","breslow"]},"confidence":{"default":0.95,"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1}},"required":["subjects"],"additionalProperties":false},"example":{"subjects":[{"time":6,"event":1,"covariates":{"placebo":0}},{"time":1,"event":1,"covariates":{"placebo":1}},{"time":10,"event":1,"covariates":{"placebo":0}},{"time":2,"event":1,"covariates":{"placebo":1}},{"time":22,"event":1,"covariates":{"placebo":0}},{"time":8,"event":1,"covariates":{"placebo":1}}],"ties":"efron","confidence":0.95}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"coefficients":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"beta":{"type":"number"},"se":{"type":"number"},"hazardRatio":{"type":"number"},"z":{"type":"number"},"p":{"type":"number"}},"additionalProperties":true}},"logLikelihood":{"type":"number"},"concordance":{"type":"number"},"phTest":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"chiSquare":{"type":"number"},"p":{"type":"number"},"timeTransform":{"type":"string"}},"additionalProperties":true}},"converged":{"type":"boolean"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"coefficients":[{"name":"placebo","beta":1.57212515142,"se":0.412327391981,"hazardRatio":4.81687391074,"z":3.81280793368,"p":0.000137396883573}],"logLikelihood":-85.0084245774,"concordance":0.689801699717,"phTest":[{"name":"placebo","chiSquare":0.0823226487592,"p":0.774174160233,"timeTransform":"rank"}],"converged":true,"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Cox partial likelihood (Efron or Breslow ties) with Newton-Raphson; Grambsch-Therneau PH check vs rank of time.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/cohort-retention":{"post":{"operationId":"cohort_retention_matrix_and_weighted_curve","summary":"Cohort retention matrix and weighted curve","description":"Build day/week/month cohort retention in classic or rolling mode from signup and activity dates, with partial-period flags and a size-weighted curve.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"minItems":1,"maxItems":200000,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"signup":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activity":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"required":["userId","signup","activity"],"additionalProperties":false}},"period":{"default":"month","type":"string","enum":["day","week","month"]},"mode":{"default":"classic","type":"string","enum":["classic","rolling"]},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"timezone":{"default":"UTC","type":"string","minLength":1,"maxLength":64}},"required":["events","asOf"],"additionalProperties":false},"example":{"events":[{"userId":"u1","signup":"2026-01-05","activity":["2026-01-05","2026-02-10","2026-03-02"]},{"userId":"u2","signup":"2026-01-20","activity":["2026-01-20","2026-03-15"]},{"userId":"u3","signup":"2026-01-28","activity":["2026-01-28"]},{"userId":"u4","signup":"2026-02-03","activity":["2026-02-03","2026-03-04"]},{"userId":"u5","signup":"2026-02-14","activity":["2026-02-14"]}],"period":"month","mode":"classic","asOf":"2026-03-31","timezone":"UTC"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"cohorts":{"type":"array","items":{"type":"object","properties":{"cohort":{"type":"string"},"size":{"type":"number"},"retention":{"type":"array","items":{"type":["number","string"]}},"partial":{"type":"boolean"}},"additionalProperties":true}},"weightedCurve":{"type":"array","items":{"type":["number","string"]}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"cohorts":[{"cohort":"2026-01","size":3,"retention":[1,0.333333333333,"…"],"partial":true},{"cohort":"2026-02","size":2,"retention":[1,0.5],"partial":true}],"weightedCurve":[1,0.4,"…"],"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Cohort retention by signup period; classic counts activity in period k, rolling counts activity in period k or later.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/rfm-segment":{"post":{"operationId":"rfm_scoring_and_named_customer_segments","summary":"RFM scoring and named customer segments","description":"Score customers 1–bins on recency, frequency and monetary value with average ranks for ties, then map scores to Champions/Loyal/New/At risk/Hibernating or a custom rule list.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"customers":{"minItems":1,"maxItems":100000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"recencyDays":{"type":"number","minimum":0},"frequency":{"type":"number","exclusiveMinimum":0},"monetary":{"type":"number","minimum":0}},"required":["id","recencyDays","frequency","monetary"],"additionalProperties":false}},"transactions":{"minItems":1,"maxItems":1000000,"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"maxLength":128},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"number"}},"required":["customerId","date","amount"],"additionalProperties":false}},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"bins":{"default":5,"type":"integer","minimum":3,"maximum":10},"segmentMap":{"default":"default","anyOf":[{"type":"string","const":"default"},{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"r":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":10}],"items":false,"minItems":2,"maxItems":2},"f":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":10}],"items":false,"minItems":2,"maxItems":2},"m":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"integer","minimum":-9007199254740991,"maximum":10}],"items":false,"minItems":2,"maxItems":2}},"required":["name","r","f"],"additionalProperties":false}}]}},"additionalProperties":false},"example":{"customers":[{"id":"c1","recencyDays":5,"frequency":12,"monetary":1200},{"id":"c2","recencyDays":40,"frequency":3,"monetary":150},{"id":"c3","recencyDays":200,"frequency":1,"monetary":40}],"bins":5,"segmentMap":"default"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"type":["object","string"],"properties":{"id":{"type":"string"},"r":{"type":"number"},"f":{"type":"number"},"m":{"type":"number"},"rfm":{"type":"string"},"segment":{"type":"string"}},"additionalProperties":true}},"segments":{"type":"array","items":{"type":["object","string"],"properties":{"name":{"type":"string"},"count":{"type":"number"}},"additionalProperties":true}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"customers":[{"id":"c1","r":5,"f":5,"m":5,"rfm":"555","segment":"Champions"},{"id":"c2","r":3,"f":3,"m":3,"rfm":"333","segment":"Needs attention"},"…"],"segments":[{"name":"Champions","count":4},{"name":"Needs attention","count":2},"…"],"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["RFM scores use average ranks for ties; default segment map evaluates Champions, Loyal, New, At risk, Hibernating, then …","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/clv-bg-nbd":{"post":{"operationId":"bg_nbd_and_gamma_gamma_customer_lifetime_value","summary":"BG/NBD and Gamma-Gamma customer lifetime value","description":"Fit BG/NBD purchase frequency and Gamma-Gamma spend models, then return P(alive), expected purchases over a horizon, expected value and undiscounted CLV per customer.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"customers":{"minItems":20,"maxItems":100000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"frequency":{"type":"integer","minimum":0,"maximum":9007199254740991},"recency":{"type":"number","minimum":0},"T":{"type":"number","exclusiveMinimum":0},"monetaryValue":{"type":"number","exclusiveMinimum":0}},"required":["id","frequency","recency","T"],"additionalProperties":false}},"horizon":{"default":10,"type":"number","exclusiveMinimum":0},"margin":{"default":1,"type":"number","exclusiveMinimum":0},"minRepeatCustomers":{"default":10,"type":"integer","minimum":1,"maximum":100000}},"required":["customers"],"additionalProperties":false},"example":{"customers":[{"id":"c0","frequency":0,"recency":0,"T":39},{"id":"c1","frequency":1,"recency":3,"T":39,"monetaryValue":150},{"id":"c2","frequency":2,"recency":10,"T":39,"monetaryValue":35},{"id":"c3","frequency":5,"recency":38,"T":39,"monetaryValue":90},{"id":"c4","frequency":0,"recency":0,"T":39},{"id":"c5","frequency":3,"recency":8,"T":39,"monetaryValue":200},{"id":"c6","frequency":1,"recency":30,"T":39,"monetaryValue":45},{"id":"c7","frequency":4,"recency":35,"T":39,"monetaryValue":60},{"id":"c8","frequency":0,"recency":0,"T":39},{"id":"c9","frequency":2,"recency":5,"T":39,"monetaryValue":25},{"id":"c10","frequency":6,"recency":37,"T":39,"monetaryValue":80},{"id":"c11","frequency":1,"recency":2,"T":39,"monetaryValue":10},{"id":"c12","frequency":3,"recency":12,"T":39,"monetaryValue":20},{"id":"c13","frequency":0,"recency":0,"T":39},{"id":"c14","frequency":7,"recency":36,"T":39,"monetaryValue":35},{"id":"c15","frequency":2,"recency":33,"T":39,"monetaryValue":90},{"id":"c16","frequency":1,"recency":15,"T":39,"monetaryValue":15},{"id":"c17","frequency":4,"recency":9,"T":39,"monetaryValue":200},{"id":"c18","frequency":0,"recency":0,"T":39},{"id":"c19","frequency":5,"recency":20,"T":39,"monetaryValue":60},{"id":"c20","frequency":2,"recency":4,"T":39,"monetaryValue":300},{"id":"c21","frequency":8,"recency":38,"T":39,"monetaryValue":25},{"id":"c22","frequency":1,"recency":1,"T":39,"monetaryValue":80},{"id":"c23","frequency":3,"recency":30,"T":39,"monetaryValue":10}],"horizon":10,"margin":1,"minRepeatCustomers":10}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"bgnbd":{"type":"object","properties":{"r":{"type":"number"},"alpha":{"type":"number"},"a":{"type":"number"},"b":{"type":"number"},"logLikelihood":{"type":"number"}},"additionalProperties":true},"gammaGamma":{"type":"object","properties":{"p":{"type":"number"},"q":{"type":"number"},"v":{"type":"number"}},"additionalProperties":true},"customers":{"type":"array","items":{"type":["object","string"],"properties":{"id":{"type":"string"},"pAlive":{"type":"number"},"expectedPurchases":{"type":"number"},"expectedValue":{"type":["null","number"]},"clv":{"type":["null","number"]}},"additionalProperties":true}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"bgnbd":{"r":0.966530837691,"alpha":6.89967524885,"a":5.18424760567,"b":20.7911737255,"logLikelihood":-214.342637155},"gammaGamma":{"p":1.41882138979,"q":2.19572029236,"v":75.0459385155},"customers":[{"id":"c0","pAlive":1,"expectedPurchases":0.201992995256,"expectedValue":null,"clv":null},{"id":"c1","pAlive":0.164150056375,"expectedPurchases":0.0662215810115,"expectedValue":122.124651303,"clv":8.08728748979},"…"],"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["BG/NBD (Fader, Hardie & Lee 2005) and Gamma-Gamma (Fader & Hardie 2013); CLV is undiscounted expectedPurchases × expect…","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/market-basket-rules":{"post":{"operationId":"market_basket_association_rules","summary":"Market-basket association rules","description":"Mine frequent itemsets and association rules with support, confidence, lift, leverage and conviction from caller baskets.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baskets":{"minItems":1,"maxItems":200000,"type":"array","items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}}},"minSupport":{"default":0.01,"type":"number","exclusiveMinimum":0,"maximum":1},"minConfidence":{"default":0.5,"type":"number","exclusiveMinimum":0,"maximum":1},"maxItemsetSize":{"default":3,"type":"integer","minimum":2,"maximum":10},"maxRules":{"default":1000,"type":"integer","minimum":1,"maximum":100000}},"required":["baskets"],"additionalProperties":false},"example":{"baskets":[["bread","milk"],["bread","diapers","beer","eggs"],["milk","diapers","beer","cola"],["bread","milk","diapers","beer"],["bread","milk","diapers","cola"]],"minSupport":0.4,"minConfidence":0.6,"maxItemsetSize":3,"maxRules":1000}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":["object","string"],"properties":{"antecedent":{"type":"array","items":{"type":"string"}},"consequent":{"type":"array","items":{"type":"string"}},"support":{"type":"number"},"confidence":{"type":"number"},"lift":{"type":"number"},"leverage":{"type":"number"},"conviction":{"type":["null","number"]}},"additionalProperties":true}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"rules":[{"antecedent":["cola"],"consequent":["diapers","milk"],"support":0.4,"confidence":1,"lift":1.66666666667,"leverage":0.16,"conviction":null},{"antecedent":["diapers","milk"],"consequent":["cola"],"support":0.4,"confidence":0.666666666667,"lift":1.66666666667,"leverage":0.16,"conviction":1.8},"…"],"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Frequent itemsets by level-wise search (Apriori-style) with association rules sorted by lift, confidence, then support.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/changepoint-detect":{"post":{"operationId":"pelt_changepoint_detection","summary":"PELT changepoint detection","description":"Detect mean or mean-variance changepoints with PELT, BIC/AIC or custom penalties, and MAD-based noise scaling.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"values":{"minItems":4,"maxItems":100000,"type":"array","items":{"type":"number"}},"model":{"default":"mean","type":"string","enum":["mean","meanvar"]},"penalty":{"default":"bic","anyOf":[{"type":"string","enum":["bic","aic"]},{"type":"number","exclusiveMinimum":0}]},"minSegment":{"default":2,"type":"integer","minimum":1,"maximum":10000}},"required":["values"],"additionalProperties":false},"example":{"values":[1,1.2,0.9,1.1,1,0.8,1.1,5,5.2,4.9,5.1,5,4.8,5.1,5.2,1,0.9,1.1,1,1.2],"model":"mean","penalty":"bic","minSegment":2}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"changepoints":{"type":"array","items":{"type":"number"}},"segments":{"type":"array","items":{"type":["object","string"],"properties":{"start":{"type":"number"},"end":{"type":"number"},"mean":{"type":"number"}},"additionalProperties":true}},"sigma":{"type":"number"},"penaltyValue":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"changepoints":[7,15],"segments":[{"start":0,"end":7,"mean":1.01428571429},{"start":7,"end":15,"mean":5.0375},"…"],"sigma":0.209671302757,"penaltyValue":5.99146454711,"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["PELT changepoint detection (Killick et al. 2012) on mean or mean-variance cost with MAD-based σ.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/classification-metrics":{"post":{"operationId":"roc_pr_brier_and_calibration_metrics","summary":"ROC, PR, Brier and calibration metrics","description":"Compute ROC-AUC, average precision, Brier score, confusion at a threshold, Youden-optimal threshold and equal-width calibration bins from binary labels and scores.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"labels":{"minItems":2,"maxItems":1000000,"type":"array","items":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]}},"scores":{"minItems":2,"maxItems":1000000,"type":"array","items":{"type":"number"}},"threshold":{"default":0.5,"type":"number","minimum":0,"maximum":1},"calibrationBins":{"default":10,"type":"integer","minimum":2,"maximum":100}},"required":["labels","scores"],"additionalProperties":false},"example":{"labels":[0,0,1,1,0,1,0,1,1,0],"scores":[0.1,0.4,0.35,0.8,0.2,0.9,0.6,0.7,0.55,0.3],"threshold":0.5,"calibrationBins":5}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"rocAuc":{"type":"number"},"prAuc":{"type":"number"},"brier":{"type":"number"},"confusion":{"type":"object","properties":{"threshold":{"type":"number"},"tp":{"type":"number"},"fp":{"type":"number"},"fn":{"type":"number"},"tn":{"type":"number"},"precision":{"type":"number"},"recall":{"type":"number"},"f1":{"type":"number"}},"additionalProperties":true},"youdenThreshold":{"type":"number"},"youdenJ":{"type":"number"},"calibration":{"type":"array","items":{"type":["object","string"],"properties":{"bin":{"type":"array","items":{"type":"number"}},"meanScore":{"type":"number"},"fraction":{"type":"number"},"n":{"type":"number"}},"additionalProperties":true}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"rocAuc":0.88,"prAuc":0.902857142857,"brier":0.1425,"confusion":{"threshold":0.5,"tp":4,"fp":1,"fn":1,"tn":4,"precision":0.8,"recall":0.8,"f1":0.8},"youdenThreshold":0.55,"youdenJ":0.6,"calibration":[{"bin":[0,0.2],"meanScore":0.1,"fraction":0,"n":1},{"bin":[0.2,0.4],"meanScore":0.283333333333,"fraction":0.333333333333,"n":3},"…"],"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["ROC-AUC is the Mann-Whitney statistic; PR-AUC is average precision; Youden maximises TPR − FPR over unique scores.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/correlation-analysis":{"post":{"operationId":"pearson_spearman_kendall_and_partial_correlations","summary":"Pearson, Spearman, Kendall and partial correlations","description":"Pairwise Pearson/Spearman/Kendall correlations with p-values, optional partial correlations, and Holm/BH/Bonferroni adjustment across pair-method tests.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"columns":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rows":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"array","items":{"type":["number","null"]}}},"methods":{"default":["pearson"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["pearson","spearman","kendall"]}},"partial":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"x":{"type":"string","minLength":1,"maxLength":64},"y":{"type":"string","minLength":1,"maxLength":64},"given":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["x","y"],"additionalProperties":false}},"adjust":{"default":"none","type":"string","enum":["none","holm","bh","bonferroni"]}},"required":["columns","rows"],"additionalProperties":false},"example":{"columns":["x","y","z"],"rows":[[1,2,1],[2,1,1],[3,4,2],[4,3,2],[5,7,3],[6,8,3],[7,6,4],[8,9,4],[9,10,5],[10,12,5]],"methods":["pearson","spearman","kendall"],"partial":[{"x":"x","y":"y","given":["z"]}],"adjust":"holm"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":["object","string"],"properties":{"a":{"type":"string"},"b":{"type":"string"},"n":{"type":"number"},"pearson":{"type":"object","properties":{"r":{"type":"number"},"p":{"type":"number"},"pAdjusted":{"type":"number"}},"additionalProperties":true},"spearman":{"type":"object","properties":{"rho":{"type":"number"},"p":{"type":"number"},"pAdjusted":{"type":"number"}},"additionalProperties":true},"kendall":{"type":"object","properties":{"tau":{"type":"number"},"p":{"type":"number"},"pAdjusted":{"type":"number"}},"additionalProperties":true}},"additionalProperties":true}},"partial":{"type":"array","items":{"type":"object","properties":{"x":{"type":"string"},"y":{"type":"string"},"given":{"type":"array","items":{"type":"string"}},"r":{"type":"number"},"p":{"type":"number"},"df":{"type":"number"}},"additionalProperties":true}},"rowsUsed":{"type":"number"},"caps":{"type":"object","properties":{"maxRows":{"type":"number"},"maxColumns":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"pairs":[{"a":"x","b":"y","n":10,"pearson":{"r":0.946314052952,"p":0.0000340536228548,"pAdjusted":0.000238375359983},"spearman":{"rho":0.939393939394,"p":0.0000548405299851,"pAdjusted":0.000305281580213},"kendall":{"tau":0.822222222222,"p":0.000357694003527,"pAdjusted":0.0010398580534}},{"a":"x","b":"z","n":10,"pearson":{"r":0.984731927835,"p":2.33418632079e-7,"pAdjusted":0.00000210076768871},"spearman":{"rho":0.984731927835,"p":2.33418632079e-7,"pAdjusted":0.00000210076768871},"kendall":{"tau":0.942809041582,"p":0.000346619351135,"pAdjusted":0.0010398580534}},"…"],"partial":[{"x":"x","y":"y","given":["z"],"r":0.340502612303,"p":0.369906747904,"df":7}],"rowsUsed":10,"caps":{"maxRows":50000,"maxColumns":100},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Pairwise deletion; Holm/BH/Bonferroni adjust across all pair-method p-values when requested.","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/predictive-analytics/propensity-score-match":{"post":{"operationId":"propensity_score_matching_with_balance_diagnostics","summary":"Propensity-score matching with balance diagnostics","description":"Fit logistic propensity scores, match treated to controls 1:1 on the logit within a caliper, and report SMD balance and common-support counts.","tags":["predictive-analytics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"units":{"minItems":10,"maxItems":100000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"treated":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]},"covariates":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"number"}}},"required":["id","treated","covariates"],"additionalProperties":false}},"caliperSdLogit":{"default":0.2,"type":"number","exclusiveMinimum":0},"replacement":{"default":false,"type":"boolean"},"order":{"default":"descending_score","type":"string","enum":["descending_score","ascending_score","random"]},"seed":{"default":42,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["units"],"additionalProperties":false},"example":{"units":[{"id":"1","treated":0,"covariates":{"age":25}},{"id":"2","treated":0,"covariates":{"age":30}},{"id":"3","treated":0,"covariates":{"age":35}},{"id":"4","treated":0,"covariates":{"age":40}},{"id":"5","treated":0,"covariates":{"age":45}},{"id":"6","treated":0,"covariates":{"age":50}},{"id":"7","treated":0,"covariates":{"age":55}},{"id":"8","treated":0,"covariates":{"age":60}},{"id":"9","treated":1,"covariates":{"age":28}},{"id":"10","treated":1,"covariates":{"age":33}},{"id":"11","treated":1,"covariates":{"age":38}},{"id":"12","treated":1,"covariates":{"age":43}},{"id":"13","treated":1,"covariates":{"age":48}},{"id":"14","treated":1,"covariates":{"age":53}},{"id":"15","treated":1,"covariates":{"age":58}},{"id":"16","treated":1,"covariates":{"age":63}}],"caliperSdLogit":0.2,"replacement":false,"order":"descending_score"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"object","properties":{"intercept":{"type":"number"},"coefficients":{"type":"object","properties":{"age":{"type":"number"}},"additionalProperties":true}},"additionalProperties":true},"caliper":{"type":"number"},"pairs":{"type":"array","items":{"type":["object","string"],"properties":{"treated":{"type":"string"},"control":{"type":"string"},"distance":{"type":"number"}},"additionalProperties":true}},"unmatchedTreated":{"type":"array","items":{"type":"string"}},"balance":{"type":"array","items":{"type":"object","properties":{"covariate":{"type":"string"},"smdBefore":{"type":"number"},"smdAfter":{"type":"number"}},"additionalProperties":true}},"commonSupport":{"type":"object","properties":{"treatedOutside":{"type":"number"},"controlOutside":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"model":{"intercept":-0.998940067346,"coefficients":{"age":0.0227031833488}},"caliper":0.054184085363,"pairs":[{"treated":"15","control":"8","distance":0.0454063666975},{"treated":"14","control":"7","distance":0.0454063666975},"…"],"unmatchedTreated":["16"],"balance":[{"covariate":"age","smdBefore":0.244948974278,"smdAfter":-0.185164019955}],"commonSupport":{"treatedOutside":1,"controlOutside":1},"sources":[{"source":"Caller-supplied tabular data processed locally","url":"https://www.brainiac.software/api/v1/predictive-analytics","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Propensity scores from logistic regression; 1:1 greedy matching on the logit with a caliper of caliperSdLogit × sd(logi…","Outputs are statistical calculations on caller-supplied inputs for human review. They are not legal, medical, credit, t…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}