# Strale Code Review API

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

Performs automated code review with configurable focus areas (security, performance, readability, bugs, or all) and returns structured findings with an audit trail.

## Facts

- Endpoint: POST https://api.strale.io/x402/v2/code-review
- Price: $0.216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-code-review-api-c54ee7e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mk4WBCtYCsh0_haL4ib-8

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 strale-code-review-api-c54ee7e4 -d '<json body>'
```

Example prompt: Can you do a security-focused code review on this Python function I just wrote? Here's the code: [paste code]. Flag any vulnerabilities, insecure patterns, or edge cases I might have missed.

## When to prefer this

Choose this endpoint when you need an auditable, agent-callable code review with a configurable focus (security, bugs, performance, readability) and want structured JSON output with a cryptographic audit chain. Prefer over generic LLM code review when you need provenance records, consistent structured output, or micropayment-based per-call billing without subscription overhead.

## Known failure modes

- Empty or missing code field returns validation error
- Unsupported language may produce incomplete analysis
- Very large code submissions may time out or be truncated
- Invalid focus enum value may default to 'all' or return an error
- Payment failure via x402 returns 402 status before analysis begins

## How this service works

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

## Output

Returns structured code review findings categorized by the requested focus area (security vulnerabilities, performance bottlenecks, readability issues, bugs), along with severity ratings and recommendations. Each response includes a cryptographic audit record for provenance tracking.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "issues": {
  "type": "array"
 },
 "quick_wins": {
  "type": "array"
 },
 "overall_score": {
  "type": "integer"
 },
 "security_flags": {
  "type": "array"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-code-review-api-c54ee7e4/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)
