# Blinka Python Error Diagnosis

> Blinka Python Error Diagnosis is a paid API for AI agents from blinka-machine-mouths.netlify.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Analyzes Python source code and error messages to diagnose the root cause and suggest a fix, without executing any code.

## Facts

- Endpoint: POST https://blinka-machine-mouths.netlify.app/debug-python?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blinka-python-error-diagnosis-b44223ef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8OxH8qciRmU1F5RkTwWzu

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 blinka-python-error-diagnosis-b44223ef -d '<json body>'
```

Example prompt: I'm getting a ZeroDivisionError in my Python function — here's the code and the full traceback. The function is supposed to compute a ratio and return zero if the denominator is missing. Can you diagnose exactly what's going wrong and suggest a fix?

## When to prefer this

Choose this endpoint when you need a fast, stateless, read-only analysis of a Python error without any code execution risk. It is ideal for CI/CD pipelines, agent-assisted debugging loops, or beginner support flows where safety and privacy (no code retention) are paramount. Prefer it over general-purpose LLM calls when you want a structured, confidence-scored diagnosis with explicit evidence anchoring rather than a freeform explanation.

## Known failure modes

- Code or error input exceeds character limits (16,000 / 4,000 chars respectively) — request rejected
- Ambiguous or minimal code snippet with no clear error context — low confidence diagnosis returned
- Unrelated or non-Python language submitted despite language field — may return unhelpful diagnosis
- Network or payment failure — HTTP 402 or 5xx returned with no diagnosis

## How this service works

Bounded stateless machine services plus public procurement discovery. No private Mika memory or arbitrary tool execution.

## Output

Returns a JSON object with a natural-language diagnosis of the error, a suggested fix, the key evidence excerpt from the code or error, a confidence score (0–1), and flags confirming the code was never executed and no data was retained.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "Python source associated with the observed failure. Max 16,000 characters; never executed."
  },
  "error": {
   "type": "string",
   "description": "Observed Python error, exception, traceback, or failure message. Max 4,000 characters."
  },
  "intent": {
   "type": "string",
   "description": "Optional intended behavior used to disambiguate the diagnosis. Max 1,800 characters."
  },
  "language": {
   "enum": [
    "python"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "service": "blinka-python-error-diagnosis",
  "evidence": "ZeroDivisionError: division by zero",
  "executed": false,
  "language": "python",
  "retained": false,
  "diagnosis": "The function divides by b without handling the zero-denominator case shown by the supplied error.",
  "confidence": 0.95,
  "primary_issue": null,
  "suggested_fix": "Define the intended zero-denominator policy and guard b == 0 before division."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blinka-python-error-diagnosis-b44223ef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blinka-machine-mouths.netlify.app](https://www.zero.xyz/host/blinka-machine-mouths.netlify.app/llms.txt)
