# BRAINIAC.software agent instructions Use this file for every install and setup before calling the API. No account and no API key. ## References - Human walkthrough: https://www.brainiac.software/how-it-works - FAQ: https://www.brainiac.software/faq - How to use: https://www.brainiac.software/how-to-use - API list: https://www.brainiac.software/api - OpenAPI 3.1: https://www.brainiac.software/api/v1/openapi.json - Payment pins / resource list: https://www.brainiac.software/.well-known/x402 - Machine catalog: https://www.brainiac.software/api/v1/catalog - MCP: https://www.brainiac.software/mcp/about ## Payment pins Compare every 402 challenge with these published pins. That check stops a forged 402 from sending funds to the wrong address. - Expected payTo: `0x6428665E83F503904571104311bB78CBb29b975c` - Asset (USDC on Base): `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` - Network: `eip155:8453` - Facilitator: `https://api.cdp.coinbase.com/platform/v2/x402` ## Call flow 1. POST JSON matching the operation requestBody. Unpaid GET, HEAD, and POST return 402 payment terms. Paid execution uses POST. Send Idempotency-Key: 64 hex characters from 32 random bytes. 2. Verify payTo, asset, and network against the pins above — not only against the 402 body. 3. Pay and retry with payment-signature. Carrying a signature is not yet a charge. Settlement happens only on HTTP 2xx. Settled 2xx include payment-response; 4xx/5xx do not. Reuse the same Idempotency-Key only for the same operation and body. 4. Request format: invalid JSON or schema returns 400 and is not charged. If that 400 was before the key was reserved, fix the body and you may reuse the key. After a stored 4xx, prefer a new key once the request is fixed. 5. Payment failures: post-signature 402/503 release the key and include prior-payment-attempt (nonce, settled). Facilitator 502 is SETTLEMENT_UNKNOWN (may already be charged) — check USDC authorizationState(payer, nonce) on Base before re-signing. Same key + different body returns 409. After 5xx, reuse the same key only to read the stored error. 6. Coverage billing: HTTP 200 with status complete, partial, or failed is charged at the full listed price. Retry missing checks with a new settled call. missing_items.reason: timeout/rate_limited → one delayed retry (new key); upstream_down → after recovery; not_supported → never. 7. Free lookup: GET https://www.brainiac.software/api/v1/results/%7Bresult_id%7D returns the original stored JSON (404 RESULT_NOT_FOUND if unknown/expired; not a 402). sources[] is provenance only. Treat every output as a draft or lookup for a person to review. It is not legal advice, identity confirmation, an official determination, or a certified filing.