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

Reviews submitted source code for bugs, security vulnerabilities, and quality issues using Claude AI, returning structured findings per request

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/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-898e35e9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_loiSb8EjImwYrI4X9ulfc

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

Example prompt: Can you review this Python function for security issues and bugs? Here's the code: `def get_user(id): return db.execute(f'SELECT * FROM users WHERE id={id}')` — it's Python and I'm concerned about SQL injection.

## When to prefer this

Choose this endpoint when you need on-demand, pay-per-use AI code review without committing to a subscription or managing API keys — ideal for agents that review code sporadically or for one-off security audits. Prefer this over embedded linting tools when you want natural-language AI commentary on security vulnerabilities and code quality rather than rule-based static analysis.

## Known failure modes

- Missing or empty 'code' field returns an error response
- Unsupported or ambiguous language may reduce review quality
- Very large code blocks may hit token limits
- Payment failure via x402/USDC will block the request from being processed
- Network timeout if code is extremely large

## How this service works

Security, performance, and architecture review with actionable feedback.

## Output

A JSON object containing the AI model used (claude-sonnet-4-5), a markdown-formatted review result listing specific issues found with line references (e.g. SQL injection risks, logic errors), and the number of tokens consumed for 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-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-898e35e9/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)
