# AgentPay Code Review

> AgentPay Code Review is a paid API for AI agents from agentpay.help, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Performs an AI-powered code review returning a quality score, detected issues, and improvement suggestions for a submitted code snippet.

## Facts

- Endpoint: POST https://agentpay.help/v1/code-review
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentpay-code-review-20ffe2ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UYY0wWf1bJTyKONwAKj4w

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 agentpay-code-review-20ffe2ad -d '<json body>'
```

Example prompt: Can you review this Python function for me and tell me what score it gets, any bugs or issues, and how I could improve it? Just pay the small per-call fee — no account needed.

## When to prefer this

Choose this endpoint when you need a fast, accountless, pay-per-use AI code review without committing to a SaaS subscription — ideal for agents that review code on demand, CI pipelines, or developer tools that need occasional code quality checks at minimal cost ($0.05 USDC per call).

## Known failure modes

- Empty or missing code body returns validation error
- Unsupported language may produce low-confidence or empty review
- Payment failure (402) if USDC balance is insufficient or x402 header is malformed
- Very large code submissions may time out or be truncated
- Minified or obfuscated code may yield low-quality suggestions

## How this service works

Pay-per-call AI services via the 402 Payment Required protocol. No accounts, no API keys — just USDC on Base.

## Output

Returns a JSON object containing a numeric quality score (0–100), an array of detected issues in the code, and an array of actionable suggestions for improvement.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "maxLength": 4000,
   "minLength": 10,
   "description": "Source code to review"
  },
  "language": {
   "type": "string",
   "description": "Language hint, optional"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "review": {
   "score": 62,
   "issues": [
    "off-by-one loop bound (i<=items.length)"
   ],
   "suggestions": [
    "use reduce with a guard for missing price"
   ]
  },
  "language": "javascript"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentpay-code-review-20ffe2ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentpay.help](https://www.zero.xyz/host/agentpay.help/llms.txt)
