# BRAINIAC UserOp Validity Checker

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

Validates an ERC-4337 UserOperation's signature and nonce, returning a validity score and rejection probability index.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/account-abstraction/user-op-validity?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-userop-validity-checker-32d3ef6a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jsc8ssL_Ct4H6phTy5IGP

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

## How to call it through Zero

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

```sh
zero fetch --capability brainiac-userop-validity-checker-32d3ef6a -d '<json body>'
```

Example prompt: Check whether this UserOperation is valid before I submit it: sender is 0xAbCd...1234, nonce is 5, expected nonce is 5, call data is 0xdeadbeef, init code is 0x, and signature is 0xabc123... — give me the validity score and any rejection risks.

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call pre-flight check on an ERC-4337 UserOperation without setting up an account or running a local validator. It is especially valuable for AI agents submitting UserOps on behalf of users who want to minimize bundler rejections and gas waste. Prefer this over running a local simulation when you don't control the bundler infrastructure or need a fast, opinionated validity score with detailed error codes.

## Known failure modes

- Invalid sender address format returns a 400 or validation error
- Signature length mismatch (not 64 or 65 bytes) triggers signature_length error code
- Nonce mismatch between provided nonce and expected_nonce triggers nonce_mismatch error
- Malformed hex strings in call_data, init_code, or signature cause input validation failure
- Missing required fields like sender or nonce result in schema validation errors
- Payment failure via x402 (insufficient USDC balance) prevents the call from being processed

## How this service works

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

## Output

Returns a JSON object containing a list of validation_errors (each with a code and human-readable detail), a user_op_validity_score (0–100 integer indicating how valid the UserOp is), and a rejection_probability_index (0–100 integer estimating how likely a bundler is to reject this UserOp).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "nonce": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  },
  "sender": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "call_data": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]*$",
   "maxLength": 20000
  },
  "init_code": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]*$",
   "maxLength": 20000
  },
  "signature": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]*$",
   "maxLength": 1000
  },
  "expected_nonce": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "validation_errors": [
   {
    "code": "signature_length",
    "detail": "The signature is not 64 or 65 bytes. The bytes were not recovered."
   },
   {
    "code": "nonce_mismatch",
    "detail": "The nonce is 5. The expected nonce is 4."
   }
  ],
  "user_op_validity_score": 50,
  "rejection_probability_index": 60
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-userop-validity-checker-32d3ef6a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
