Home / API docs / Elixir Lint API
Dev Tools

Elixir Lint API

POST /api/lint/elixir $0.002 per call USDC on Base · x402

Elixir lint / debug kit: POST {code}, get the bugs back with line numbers. Deterministic static analysis — code is parsed, never executed, no AI. Catches unbalanced do/end and brackets, missing do, 'return', '+' string concat, trailing commas, field assignment, = vs == in conditions and guards, block-scoped rebinding (the classic), charlist vs String mixups, unused variables. Errors, warnings and hints with fixes. Max 128 KB.

Parameters

NameInDescription
codebodyrequiredElixir source to lint, max 128 KB

Example request

curl -X POST "https://api.webbersites.com/api/lint/elixir" \
  -H "Content-Type: application/json" \
  -d '{"code":"def grade(s) do\n  result = \"fail\"\n  if s > 60 do\n    result = \"pass\"\n  end\n  result\nend"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "language": "elixir",
    "syntax": {
        "ok": true,
        "errors": []
    },
    "issues": [
        {
            "line": 4,
            "severity": "warning",
            "rule": "scope/rebind-in-block",
            "message": "'result = ...' inside this block does not change 'result' outside it (first bound on line 2)",
            "hint": "bind the block's result instead: result = if ... do ... else ... end"
        }
    ],
    "counts": {
        "error": 0,
        "warning": 1,
        "info": 0
    },
    "verdict": "warnings"
}
MCP tool: post_lint_elixir — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

How payment works

There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.