Learn how to use Benchify Fixer API to automatically LLM generated code on the fly
Benchify is an API that fixes common issues in LLM-generated code using non-AI techniques. The issues are fixed more effectively, faster, and cheaper than another LLM call.
Log in to your account at app.benchify.com.
For the examples below, we’ll refer to your key as $BENCHIFY_KEY
.
To use the Fixer API, you’ll need:
.git
repository or a publicly accessible zip/tar/tar.gz file with your source codeThe Fixer will attempt to fix your code and return a response with:
build_status
: Indicates whether the build command succeeded (0
) or failed (non-zero) after applying the fixbuild_output
: The console output from running your build commanddiff
: The changes made to fix your codeIf there’s an issue with your request, you’ll receive an error status code:
Missing Required Parameter (400 Bad Request):
Invalid API Key (401 Unauthorized):
You can apply the diff to your codebase using the git apply
command:
Even when the Fixer fails, the diff
it suggests is often directionally correct. Your AI agent may want to use the diff
and build_output
as a starting point for its own suggestions.
Benchify only bills you for successful Fixer runs (where build_status
is 0
), but provides the full output regardless.