# 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-15).

Performs an AI-powered security audit of source code, identifying vulnerabilities with CVSS scores and detailed explanations

## Facts

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

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-c63e0d27 -d '<json body>'
```

Example prompt: Can you do a security audit on this Python function that handles user login — it builds a SQL query by concatenating user input directly into the string — and tell me what vulnerabilities exist and how critical they are?

## When to prefer this

Choose this endpoint when you need a fast, per-request AI security audit without committing to a subscription or managing API keys — ideal for spot-checking snippets, CI/CD hooks, or one-off reviews. It is especially useful in agentic pipelines that pay per call with USDC on Base L2 via x402.

## Known failure modes

- Missing or empty 'code' field returns an error or empty analysis
- Unsupported or ambiguous language may reduce accuracy of findings
- Very large code snippets may exceed token limits
- Malformed JSON input returns HTTP 400
- Payment failure via x402 returns HTTP 402 before processing

## How this service works

Comprehensive vulnerability assessment with OWASP classification and remediation.

## Output

Returns a JSON object with the model used (claude-opus-4-5), a detailed vulnerability report in markdown including severity labels (e.g. CRITICAL with CVSS score), specific descriptions of each issue found, and the number of tokens consumed.

## 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-c63e0d27/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)
