{"uid":"cap_f1FtoXgXhhSqcjYUgncN7","slug":"patchproof-api-deterministic-failure-diagnosis-3dcf6726","name":"PatchProof API – Deterministic Failure Diagnosis","description":"Deterministic Python and TypeScript failure diagnosis for AI agents, paid per request with USDC.","url":"https://patchproof-api.krlosrdz.chatgpt.site/api/v1/diagnose","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"trace":{"type":"string","maxLength":8192,"minLength":12,"description":"Python or TypeScript failure trace"},"language_hint":{"enum":["python","typescript","javascript","auto"],"type":"string"}}},"responseSchema":{"type":"json","example":{"safety":{"retained":false,"code_executed":false},"fix_plan":["Identify whether the producer violates its declared contract."],"location":{"file":"src/billing.ts","line":31,"column":12},"confidence":0.96,"failure_type":"type-safety","primary_signal":"error TS2322","regression_tests":["Add a focused test for the missing or invalid variant."]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dyi0_5JnWSumbkAu0XFzz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes Python or TypeScript code errors to deterministically identify failure type, pinpoint location, and produce a structured fix plan with confidence score.","exampleAgentPrompt":"I'm seeing error TS2322 in src/billing.ts around line 31 — can you run a deterministic diagnosis on that TypeScript failure, give me the exact location, a fix plan, and a confidence score?","exampleUseCases":[{"title":"TypeScript type-safety error triage","prompt":"I've got a TS2322 type-safety error in src/billing.ts at line 31 — diagnose exactly what's failing, tell me the confidence, and give me a step-by-step fix plan."},{"title":"Python runtime failure root cause","prompt":"My Python function in src/processor.py is crashing at runtime — can you diagnose the failure, identify the specific line and column, and suggest regression tests to prevent it recurring?"},{"title":"CI pipeline build failure diagnosis","prompt":"Our CI build just broke with a TypeScript compile error and I need to know the failure type, its exact file location, and what fix to apply — can you run a deterministic diagnosis on it?"}],"resultDescription":"Returns a JSON object containing: the failure type (e.g. 'type-safety'), the exact file/line/column location of the error, the primary signal (e.g. 'error TS2322'), a confidence score (0–1), a list of fix plan steps, suggested regression tests, and safety metadata indicating whether code was executed.","failureModes":["Unsupported language submitted (only Python and TypeScript are supported) — likely 4xx error","Malformed or missing code/error payload — 400 Bad Request","Insufficient context provided to determine location — lower confidence score returned","Payment not processed or USDC balance insufficient — 402 Payment Required","Ambiguous error signal preventing deterministic diagnosis — low confidence result with partial fix plan"],"whenToPreferThis":"Choose this endpoint when you need deterministic, structured code failure diagnosis specifically for Python or TypeScript — particularly when you need a machine-readable fix plan, exact line-level error location, and regression test suggestions in a single call. Prefer it over generic LLM code review when reproducibility, confidence scoring, and structured output are required for automated pipelines or CI/CD workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:33:21.245Z","isFirstParty":false}