# PayAI Code Security Inspector

> PayAI Code Security Inspector is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-13).

Performs static analysis of a code snippet to detect CWE Top-25 vulnerabilities including SQL injection, XSS, command injection, SSRF, path traversal, insecure deserialization, and weak crypto, returning per-finding CWE IDs, severity levels, and line numbers.

## Facts

- Endpoint: POST https://payai.agentstools.dev/code/inspect
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payai-code-security-inspector-857d9a86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4pb2a5G_5F-M7cQCzJNuX

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 payai-code-security-inspector-857d9a86 -d '<json body>'
```

Example prompt: Can you run a static security scan on this Python function for CWE Top-25 vulnerabilities — I'm particularly worried about SQL injection and command injection — and tell me which lines are affected and how severe each issue is?

## When to prefer this

Choose this endpoint when you need a quick, automated static security scan of a single code snippet without setting up a local SAST tool. Ideal for CI pipeline checks, pre-merge reviews, or auditing AI-generated code before deployment. Best for CWE Top-25 class vulnerabilities; not a substitute for full dynamic testing or manual penetration testing.

## Known failure modes

- Unsupported programming language — endpoint may return an error or empty findings
- Code blob too large — may time out or be rejected
- False negatives — static analysis may miss runtime-only vulnerabilities
- No findings returned for genuinely vulnerable code due to obfuscation or unusual patterns
- Malformed request body missing required code or language fields

## How this service works

Static application-security scan of a single code blob for CWE Top-25 logic bugs (SQL injection, XSS, command injection, SSRF, path traversal, insecure deserialization, weak crypto and more). Pass the code and its language; returns a verdict with per-finding CWE, severity and line. Static indicators, not a guarantee.

## Output

A security verdict listing all discovered vulnerabilities in the code, each with its CWE identifier (e.g. CWE-89 for SQL injection), a severity rating (critical/high/medium/low), and the specific line number where the issue was found. The response is a static analysis result and does not guarantee runtime safety.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "The source code blob to inspect"
  },
  "language": {
   "type": "string",
   "description": "Language of the blob: python, javascript, java, go, php or ruby"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payai-code-security-inspector-857d9a86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
