# Strale AI Code Review

> Strale AI Code Review is a paid API for AI agents from api.strale.io, paid per call via x402, $0.216001/call, status unknown (last checked 2026-09-13).

Performs AI-powered code review returning issues with severity, line numbers, and fix suggestions focused on security, performance, readability, or bugs.

## Facts

- Endpoint: POST https://api.strale.io/x402/code-review
- Price: $0.216001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-e8a2b5a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IKWl-0sijO1s9Xn0g9eYI

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 api-strale-io-e8a2b5a9 -d '<json body>'
```

Example prompt: Can you review this Python function for security vulnerabilities and tell me the line numbers where issues occur along with how to fix them?

```python
def get_user(user_id):
    query = f'SELECT * FROM users WHERE id = {user_id}'
    return db.execute(query)
```

## When to prefer this

Use this endpoint when you need automated, on-demand code review with structured output including line-level issue location and concrete fix suggestions. Ideal for CI pipelines, agent-driven code quality checks, or quick pre-commit reviews without setting up a full static analysis toolchain.

## Known failure modes

- Empty or missing code field returns validation error
- Unsupported language may reduce accuracy of analysis
- Very large code snippets may be truncated or time out
- Ambiguous focus value not matching enum may default to 'all' or return error
- Minified or obfuscated code may produce low-quality results

## How this service works

AI code review. Returns issues with severity, line numbers, fix suggestions. Focus on security, performance, readability, or bugs.

## Output

A structured list of code issues, each with severity level, line number(s), a description of the problem, and a suggested fix. Issues are categorized by the requested focus area (security, performance, readability, bugs, or all).

## Example request

```json
{
 "code": "def authenticate_user(username, password):\n    user = db.query('SELECT * FROM users WHERE username = \"' + username + '\" AND password = \"' + password + '\"')\n    if user:\n        return True\n    return False",
 "focus": "security",
 "language": "python"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string"
  },
  "focus": {
   "type": "string",
   "description": "security/performance/readability/bugs/all"
  },
  "language": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-e8a2b5a9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
