Getting Started

CodeLens Developer Documentation

CodeLens.space is a production-grade AI code reviewer designed for modern engineering teams. By utilizing lightning-fast LLM engines (like Groq) alongside complex cognitive models (OpenAI GPT-4o, Anthropic Claude 3.5 Sonnet), we evaluate, score, audit, and refactor code snippets inside a highly secure sandbox environment in under seconds.

Lightning Fast

Reviews processed in <1.5s using modern inference engines.

Strictly Private

Zero-data retention agreements with providers. Code is never trained on.

Language Agnostic

Supports Python, JavaScript, Rust, C++, SQL, TypeScript, Go, and more.

How CodeLens Evaluates Code

When a snippet is sent through our playground or API, CodeLens executes a three-phase review workflow:

  1. 1

    Syntax & Type Safety Validation

    We map imports, check type hierarchies, and determine logical syntax compatibility.

  2. 2

    Cognitive Issue Flagging

    The engine highlights logical bugs, active memory leaks, performance constraints, and security gaps.

  3. 3

    Refactored Rewrite Generation

    Our models build an optimized, drop-in replacement segment with full diff highlighting.

Understanding The Code Score

CodeLens grades every snippet on a strict 0 to 100 scale.

85-100

Production Ready

Excellent architecture. Clean abstraction, correct syntax, and minimal code noise.

60-84

Needs Attention

Minor vulnerabilities or redundant statements. Contains style guidelines violations.

0-59

Blocked / Critical Risks

Severe type mismatches, race conditions, memory leaks, or active SQL/Command injections.

API Reference

Trigger programmatic review operations by executing secure HTTP requests.

POSThttps://www.codelens.space/api/proxy/reviews

Proxies authenticated payloads securely. Returns scored audits, code bugs, style improvements, and suggested refactors.

FieldTypeRequirementDescription
codestringRequiredThe raw script snippet content to review.
languagestringOptionalExplicit syntax map (e.g. "python", "typescript").
providerstringOptionalInference provider: "groq", "openai", "anthropic", or "auto".
modelstringOptionalSpecific LLM ID from listed provider models.

Response Body (JSON)

response.json
{
  "id": 4271,
  "language": "python",
  "provider": "groq",
  "model": "llama-3-8b-instant",
  "score": 61,
  "result": {
    "language": "python",
    "score": 61,
    "summary": "The code has a critical type mismatch bug. It passes a string to a function expecting numeric arithmetic.",
    "bugs": [
      {
        "title": "Type mismatch in function arguments",
        "description": "Passed variable 'b' is \"20\" (string), which causes a runtime TypeError on addition.",
        "line": 4,
        "severity": "critical"
      }
    ],
    "improvements": [
      {
        "title": "Add static type hinting",
        "description": "Consider typing parameters to catch bugs during development time.",
        "line": 1,
        "severity": "info"
      }
    ]
  }
}

Code Integration Examples

Copy boilerplate implementations to start auditing code from local scripts, git hooks, or developer tools.

script.sh
curl -X POST https://www.codelens.space/api/proxy/reviews \
  -H "Content-Type: application/json" \
  -d '{
    "code": "def add(a, b):\n    return a + b\n\nprint(add(10, \"20\"))",
    "language": "python",
    "provider": "groq"
  }'