# 24K Labs AI Code Review

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

Performs AI-powered security and quality review of source code, identifying issues like SQL injection and other vulnerabilities, billed per request in USDC on Base L2

## Facts

- Endpoint: POST https://api.24klabs.ai/api/code-review
- Price: $0.4/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-code-review-8c948001
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7M6_k-5UdwuADBwH2_4QV

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-code-review-8c948001 -d '<json body>'
```

Example prompt: Review this Python function for security issues and bugs: 'def login(user, pw): query = "SELECT * FROM users WHERE name=" + user' — it's Python and I want to know about any SQL injection risks.

## When to prefer this

Choose this endpoint when you need pay-per-use AI code review without committing to a subscription or managing API keys, especially when billing via USDC crypto micropayments on Base L2 is acceptable. Ideal for agents that review code on-demand and want to avoid recurring SaaS costs.

## Known failure modes

- Payment not provided or insufficient USDC — returns 402 Payment Required
- Code field missing or empty — may return error or empty review
- Unsupported or ambiguous language specified — review may be less precise
- Rate limiting or service unavailability — returns 5xx error
- Extremely large code inputs may exceed token limits

## 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-sonnet-4-5), a markdown-formatted review text listing numbered issues with line-level detail (e.g. SQL injection risk on line 3), 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-sonnet-4-5",
  "result": "**Issues found (2):**\n- SQL injection risk on line 3...",
  "tokens_used": 410
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-ai-code-review-8c948001/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)
