# 24K Labs AI Security Audit

> 24K Labs AI Security Audit is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $1/call, status unknown (last checked 2026-09-14).

Performs an AI-powered security audit of code, identifying vulnerabilities with CVSS scores and detailed findings, paid per-request with USDC on Base L2.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/security-audit
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-ai-security-audit-a850af51
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UPipuF-Vuk4yeEVQISqR9

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 24k-labs-ai-security-audit-a850af51 -d '<json body>'
```

Example prompt: Can you do a security audit on this Python Flask route that handles user login — check it for SQL injection, authentication flaws, and any other critical vulnerabilities: `def login(): user = db.execute('SELECT * FROM users WHERE username=' + request.form['user'])`

## When to prefer this

Choose this endpoint when you need a per-request, no-subscription AI security audit of code snippets with structured severity scoring (CVSS). Ideal for agents that need on-demand, pay-as-you-go code security review without managing API keys. Best for catching injection flaws, authentication issues, and common CWEs in a specific language context. Prefer over manual static analysis tools when you need natural-language explanations of vulnerabilities alongside severity ratings.

## Known failure modes

- Payment not received or insufficient USDC — request blocked with 402 Payment Required
- Code parameter missing — request fails with validation error
- Unsupported or ambiguous language field — may degrade analysis quality
- Code too large for context window — may return truncated or partial analysis
- Network or provider timeout — Claude API upstream error returns 5xx

## How this service works

A curated directory of x402 services — each one on the list on purpose, with the health, uptime, and independent trust grades from across the ecosystem gathered in one place.

## Output

A JSON object containing the AI model used (e.g. claude-opus-4-5), a detailed security audit result with vulnerabilities listed by severity and CVSS score (e.g. 'CRITICAL (CVSS 9.8): SQL injection via unparameterized query...'), and the number of tokens consumed in the analysis.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "Primary input content"
  },
  "context": {
   "type": "string",
   "description": "Optional context or instructions"
  },
  "language": {
   "type": "string",
   "description": "Programming language (code services)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "claude-opus-4-5",
  "result": "**CRITICAL (CVSS 9.8):** SQL injection via unparameterized query...",
  "tokens_used": 890
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-ai-security-audit-a850af51/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
