# X402 Cloud GitHub Repository Audit

> X402 Cloud GitHub Repository Audit is a paid API for AI agents from api.x402cloud.space, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-03).

Performs an AI-powered security, quality, documentation, or dependency audit of a public GitHub repository and returns structured findings with severity ratings.

## Facts

- Endpoint: POST https://api.x402cloud.space/v1/github/repo-audit?utm_source=zero.xyz
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-cloud-github-repository-audit-b2504cb9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M9_XoL4RL95bn_4vupQ52

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 x402-cloud-github-repository-audit-b2504cb9 -d '<json body>'
```

Example prompt: Can you audit the GitHub repo at https://github.com/myorg/my-api-service with a focus on security, checking up to 50 files, and tell me the risk level and any critical findings?

## When to prefer this

Use this endpoint when an AI agent needs a structured, machine-readable code audit of a public GitHub repository — especially in automated pipelines, CI/CD checks, or RAG systems evaluating third-party dependencies. It is well-suited for agents that need severity-tagged findings and a risk level without manual code review. Prefer it when paying per-call via USDC/x402 is acceptable and you want AI-powered analysis rather than static linting.

## Known failure modes

- Invalid or private GitHub repo URL returns an error — only public repositories are supported
- max_files below 5 or above 100 triggers a validation error
- Unrecognized focus value may default to 'general' rather than failing
- Large repos with many files may be truncated to the max_files limit, potentially missing issues
- Payment failure via x402 protocol returns HTTP 402 before any processing occurs

## How this service works

X402 Cloud AI Inference Endpoints is an agent-ready x402 API provider for Gemini, image, audio, video, realtime, and specialized AI inference workflows. We expose pay-per-call USDC endpoints designed for autonomous AI agents, application backends, trading bots, creative automation, and RAG systems with some of the lowest x402 AI inference prices available in the market.

## Output

Returns a JSON object containing: a plain-English summary of the repo's overall state, the detected technology stack (e.g. ['Python','FastAPI']), an array of findings each with a title, severity level, and recommendation, and an overall risk_level string (e.g. 'medium', 'high').

## Example request

```json
{
 "focus": "security",
 "repo_url": "https://github.com/torvalds/linux",
 "max_files": 50
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "stack": [
   "Python",
   "FastAPI"
  ],
  "summary": "The repo is functional but lacks deployment hardening.",
  "findings": [
   {
    "title": "No rate limiting documented",
    "severity": "medium",
    "recommendation": "Add request limits for public endpoints."
   }
  ],
  "risk_level": "medium"
 },
 "outputSchema": {
  "type": "object",
  "$defs": {
   "RepoAuditFinding": {
    "type": "object",
    "title": "RepoAuditFinding",
    "required": [
     "severity",
     "title",
     "recommendation"
    ],
    "properties": {
     "title": {
      "type": "string",
      "title": "Title"
     },
     "severity": {
      "type": "string",
      "title": "Severity"
     },
     "recommendation": {
      "type": "string",
      "title": "Recommendation"
     }
    }
   }
  },
  "title": "GitHubRepoAuditOutput",
  "required": [
   "summary"
  ],
  "properties": {
   "stack": {
    "type": "array",
    "items": {
     "type": "string"
    },
    "title": "Stack"
   },
   "summary": {
    "type": "string",
    "title": "Summary"
   },
   "findings": {
    "type": "array",
    "items": {
     "$ref": "#/$defs/RepoAuditFinding"
    },
    "title": "Findings"
   },
   "risk_level": {
    "type": "string",
    "title": "Risk Level",
    "default": "unknown"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-cloud-github-repository-audit-b2504cb9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402cloud.space](https://www.zero.xyz/host/api.x402cloud.space/llms.txt)
