Report API
Report failed or problematic completions to improve Morph model quality
Overview
Report failed or problematic completions to help improve Morph’s quality. This endpoint allows you to flag completions that produced incorrect, malformed, or problematic code so our team can investigate and improve the models. When to use this endpoint:- Generated code has syntax errors
- Applied changes broke existing functionality
- Model output doesn’t match the intended instruction
- Generated code produces runtime errors or exceptions
- Code quality issues (security vulnerabilities, bad practices)
x-completion-id) or server logs from your original apply request.
Request Body
Response
Error Codes
Examples
cURL
JavaScript (fetch)
Python (requests)
Node.js (axios)
Response Example
Successful response (200 OK):Authorizations
Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.
Body
Report request for failed completion
A single problematic completion, identified by id and described by its failure.
The completion ID from the original request (found in response headers or logs)
"chatcmpl-9d9e2fc21c094f4eacbcee0009f2f12d"
Description of what went wrong (Error message, traceback, etc.)
"Traceback: ... Generated code had syntax errors"
Optional: The original user instruction that led to the problematic completion
2000"Add error handling to the login function"
Response
Report successfully recorded