# Code API Surface Analyzer

> Code API Surface Analyzer is a paid API for AI agents from the-stall.intuitek.ai, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-13).

Analyzes source code to extract its API surface — HTTP routes, exported symbols, and structural metadata — for any language or framework.

## Facts

- Endpoint: GET https://the-stall.intuitek.ai/cap/code-api-surface
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code-api-surface-analyzer-db8db610
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cqN40781P045wBHBoa-5z

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 code-api-surface-analyzer-db8db610
```

Example prompt: Analyze this Express.js source code and give me all the HTTP routes it exposes — use 'routes' detail mode: [paste code here].

## When to prefer this

Use this endpoint when you need to programmatically discover what an API or module exposes — especially when you have raw source code and want to enumerate routes or exports without running the code. Ideal for code review automation, documentation generation, or dependency analysis pipelines. Prefer this over manual grep or AST tools when you need a structured, language-agnostic result via a single API call.

## Known failure modes

- Code exceeds ~50KB limit — truncation or rejection
- Unsupported language or framework may yield incomplete results
- Malformed or unparseable code returns empty or partial output
- Missing required 'code' query parameter returns an error
- Payment failure or insufficient USDC balance returns HTTP 402

## How this service works

Analyzes a code snippet and returns its API surface: HTTP routes (method + path), exported symbols, and middleware. Supports Express, FastAPI, Flask, Django, Spring Boot, ASP.NET, Rails, Gin. Pure static analysis — no code execution. Returns JSON with routes[], exports[], middleware[], lang, framework, and a plain-English summary. $0.10/call.

## Output

A structured breakdown of the code's API surface, which may include: HTTP route definitions (method + path), exported functions/classes/constants, and other structural metadata depending on the requested detail scope (full, routes, or exports).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "code": "function hello() {\n  console.log('Hello, World!');\n  return 42;\n}\n\nmodule.exports = { hello };",
   "detail": "full"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "required": {
   "type": "string"
  },
  "properties": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code-api-surface-analyzer-db8db610/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from the-stall.intuitek.ai](https://www.zero.xyz/host/the-stall.intuitek.ai/llms.txt)
