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.
Getting Started
1. Log into Benchify
Log in to your account at app.benchify.com.2. Create an API Key
- Navigate to Settings by clicking on your profile icon
- Select the Credentials section
- Click the Create API Key button and give your key a descriptive name
- Copy the generated key and save it somewhere secure (you won’t be able to see it again)
$BENCHIFY_KEY
.
Using the API
Submit a Repository for Fixing
To use the Fixer API, you’ll need:- Your Benchify API key
- A URL pointing to either a public
.git
repository or a publicly accessible zip/tar/tar.gz file with your source code - The command needed to build your project
Understanding the Response
The 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 code
Error Responses
If there’s an issue with your request, you’ll receive an error status code: Missing Required Parameter (400 Bad Request):Applying the Fix
You can apply the diff to your codebase using thegit apply
command:
Using Fixer Results in Your AI Agent
Even when the Fixer fails, thediff
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.