{"endpoint":"POST /api/debug","description":"AI-powered debugging API. Accepts an error message and optional language, returns a structured explanation with cause, fix, and related errors. Designed for both human developers and AI systems.","version":"1.0","request":{"method":"POST","headers":{"Content-Type":"application/json"},"body":{"error":"string (required) — the error message to debug","language":"string (optional) — programming language (javascript, python, php, java, sql, etc.)"}},"response":{"explanation":"string — what the error means","cause":"string — root cause of the error","fix":"string — how to fix it","example_code":"string — code snippet demonstrating the fix","related_errors":"array — similar errors in the knowledge base","matched":"boolean — true if a similar error was found in the database","similarity_score":"number — similarity score (0–1) of the best match"},"example":{"request":{"error":"TypeError: undefined is not a function","language":"javascript"},"response":{"explanation":"You are calling something as a function that is undefined.","cause":"The variable or property you are trying to call does not exist or has not been initialized.","fix":"Check that the function exists before calling it. Use optional chaining: obj?.method?.()","example_code":"if (typeof myFunc === \"function\") { myFunc(); }","related_errors":[],"matched":false,"similarity_score":0}},"rate_limits":"No hard rate limits. Please be respectful of server resources.","knowledge_base":"Every unique error submitted is stored and enriched, growing the shared debugging knowledge base."}