{"uid":"cap_XpP7YwqFHc59B4OOT1V8P","slug":"webbersites-debug-code-api-3f18e9d0","name":"WebberSites Debug Code API","description":"WebberSites – Branding, Web Design, Photography, Marketing Strategy - Youngstown Ohio","url":"https://api.webbersites.com/api/debug-code","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["code"],"properties":{"code":{"type":"string","description":"The failing code snippet (required)"},"error":{"type":"string","description":"Error message, stack trace, or a description of the wrong behavior"},"context":{"type":"string","description":"Optional extra context: what you expected, when it happens, what you tried"},"language":{"type":"string","description":"Optional language hint, e.g. python, javascript, elixir"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"fix":{"type":"string","description":"the concrete change to make"},"model":{"type":"string"},"usage":{"type":"object"},"diagnosis":{"type":"string","description":"what is wrong, in plain language"},"confidence":{"type":"string","description":"high, medium, or low"},"fixed_code":{"type":"string","description":"corrected version of the snippet, when applicable"},"root_cause":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"fix":"Use `sum += x` inside the loop.","model":"gemini-2.5-flash-lite","diagnosis":"The accumulator is never incremented — `sum =+ x` assigns +x instead of adding.","confidence":"high","fixed_code":"def total(xs):\n  total = 0\n  for x in xs:\n    total += x\n  return total","root_cause":"`=+` is assignment with unary plus, not the `+=` compound operator, so each iteration overwrites sum with x."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DTP5vKDdZyrVwBj41U_y9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes buggy code snippets using an LLM, diagnoses the root cause, and returns a corrected version with explanation","exampleAgentPrompt":"Can you debug this Python function for me — it's supposed to sum a list but returns wrong results every time: `def total(xs): sum = 0; for x in xs: sum =+ x; return sum`?","exampleUseCases":[{"title":"Fix operator typo in loop","prompt":"My accumulator function keeps returning wrong values — here's the code: `def total(xs): sum = 0; for x in xs: sum =+ x; return sum`. Can you diagnose what's wrong and give me a corrected version?"},{"title":"Debug logic error in student code","prompt":"I'm tutoring someone and they wrote this function that should compute a running total but it's broken. Can you find the root cause and show the fixed code so I can explain it to them?"},{"title":"Automated code review in CI pipeline","prompt":"Before merging this PR, debug this function and tell me the root cause of any bug, the fix, and how confident you are that the diagnosis is correct: `def total(xs): sum = 0; for x in xs: sum =+ x; return sum`"}],"resultDescription":"A JSON object containing: a natural-language 'fix' suggestion, the 'model' used (e.g. gemini-2.5-flash-lite), a 'diagnosis' of the bug, a 'confidence' level (e.g. high/medium/low), the 'fixed_code' as a corrected code snippet, and a 'root_cause' explanation of the underlying error.","failureModes":["Malformed or empty code input may result in a vague or incorrect diagnosis","Very large code snippets may exceed token limits or return partial results","Ambiguous bugs with multiple possible causes may yield lower confidence scores","Non-standard or esoteric languages may produce incorrect fixes","Network or payment authorization failures return 402 or 5xx errors"],"whenToPreferThis":"Choose this endpoint when you need both a diagnosis and a ready-to-use corrected code snippet in one call, especially for logic or operator errors where a human-readable root cause explanation is important. Prefer it over generic LLM code-completion when you want a structured JSON response with confidence scoring and explicit root cause breakdown, suitable for automated pipelines or agent workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:44:06.285Z","isFirstParty":false}