Fixer

Benchify Fixer is an automated service for fixing common bugs in React apps. The Fixer is much faster and cheaper than an AI coding agent, and has a higher success rate.

Here’s how to use it:

  1. Log into Benchify

    Log in to your account at app.benchify.com. Step 1: Log into Benchify

  2. Navigate to Settings

    Click on your profile icon and select “Settings”. Step 2: Navigate to Settings

  3. Click on Credentials

    In the settings menu, select the “Credentials” section. Step 3: Click on Credentials

  4. Create a New Key

    Click the “Create API Key” button. Give your key a descriptive name. Step 4: Create a new key

  5. Copy Your New Key

    Copy the generated key and save it somewhere secure. You won’t be able to see it again. Step 5: Copy your new key For the sake of this document, we will refer to your key as $BENCHIFY_KEY. Make sure to replace this placeholder with your actual key when running commands.

  6. Call the Fixer API and Interpret the Response

    Generate a URL pointing to either the public .git repository of your (broken) application, or a publicly accessible zip, tar, or tar.gz file containing the source code. For the sake of this document, we will refer to this URL as $REPO_URL.

    Hit the Fixer endpoint using your API key and repository URL. You’ll also need to provide a jobName (for your reference) and the command needed to build your project (buildCmd).

    Here is an example request using a simple (broken) demo we made with Claude Code:

    POST
    /v1/fixer
    1curl -X POST https://api.benchify.com/v1/fixer \
    2 -H "Authorization: Bearer <token>" \
    3 -H "Content-Type: application/json" \
    4 -d '{
    5 "repoUrl": "REPO_URL",
    6 "jobName": "fix-simple-demo",
    7 "buildCmd": "npm run build"
    8}'

    The Fixer will then attempt to fix your code and you’ll receive a response within a few seconds. The response will contain:

    • build_status: Indicates whether the build command succeeded (0) or failed (non-zero) after applying the fix
    • build_output: The console output from running your build command
    • diff: The changes made to fix your code

    Here’s another example, from v0, where the Fixer was unable to fully fix the code:

    Response
    1{
    2 "build_status": 0,
    3 "build_output": "\n> simple-shopping-app@0.1.0 build\n> next build\n\n- info Creating an optimized production build...\n- info Compiled successfully\n- info Linting and checking validity of types...\n- info Collecting page data...\n- info Generating static pages (0/11)\n- info Generating static pages (2/11)\n- info Generating static pages (5/11)\n- info Generating static pages (8/11)\n- info Generating static pages (11/11)\n- info Finalizing page optimization...\n\nRoute (app) Size First Load JS\n┌ ○ / 181 B 84.5 kB\n├ ○ /cart 181 B 84.5 kB\n├ ○ /products 181 B 84.5 kB\n└ ● /products/[id] 414 B 84.7 kB\n ├ /products/1\n ├ /products/2\n ├ /products/3\n └ [+3 more paths]\n+ First Load JS shared by all 78.5 kB\n ├ chunks/596-c294a7d39d9fe754.js 26.1 kB\n ├ chunks/fd9d1056-a99b58d3cc150217.js 50.6 kB\n ├ chunks/main-app-7d8b761209bcd0ba.js 219 B\n └ chunks/webpack-d0f00866016e6a99.js 1.65 kB\n\nRoute (pages) Size First Load JS\n─ ○ /404 181 B 76.5 kB\n+ First Load JS shared by all 76.3 kB\n ├ chunks/framework-8883d1e9be70c3da.js 45 kB\n ├ chunks/main-0591161756e062e3.js 29.4 kB\n ├ chunks/pages/_app-52924524f99094ab.js 195 B\n └ chunks/webpack-d0f00866016e6a99.js 1.65 kB\n\n○ (Static) automatically rendered as static HTML (uses no initial props)\n● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)\n",
    4 "diff": "diff --git a/app/components/ProductCard.tsx b/app/components/ProductCard.tsx\nindex febbc23..6c8c885 100644\n--- a/app/components/ProductCard.tsx\n+++ b/app/components/ProductCard.tsx\n@@ -1,5 +1,5 @@\n-import Link from 'next/navigation/link';\n-import { Product } from '../Types';\n+import Link from 'next/dist/client/link';\n+import { Product } from '../types';\n \n interface ProductCardProps {\n product: Product;\ndiff --git a/app/products/[id]/page.tsx b/app/products/[id]/page.tsx\nindex b1aef82..e4e63f6 100644\n--- a/app/products/[id]/page.tsx\n+++ b/app/products/[id]/page.tsx\n@@ -1,7 +1,7 @@\n import { notFound } from 'next/navigation';\n import Header from '../../components/Header';\n import Footer from '../../components/Footer';\n-import { products } from '../../productData';\n+import { products } from '../../data';\n \n export function generateStaticParams() {\n return products.map(product => ({\ndiff --git a/app/products/page.tsx b/app/products/page.tsx\nindex 19233dd..8adb735 100644\n--- a/app/products/page.tsx\n+++ b/app/products/page.tsx\n@@ -1,7 +1,7 @@\n import Header from '../components/Header';\n import Footer from '../components/Footer';\n import ProductCard from '../components/ProductCard';\n-import { products } from '../../productData';\n+import { products } from '../../data';\n \n export default function ProductsPage() {\n return (\ndiff --git a/simple-demo/app/components/ProductCard.tsx b/simple-demo/app/components/ProductCard.tsx\nindex febbc23..6c8c885 100644\n--- a/simple-demo/app/components/ProductCard.tsx\n+++ b/simple-demo/app/components/ProductCard.tsx\n@@ -1,5 +1,5 @@\n-import Link from 'next/navigation/link';\n-import { Product } from '../Types';\n+import Link from 'next/dist/client/link';\n+import { Product } from '../types';\n \n interface ProductCardProps {\n product: Product;\ndiff --git a/simple-demo/app/products/[id]/page.tsx b/simple-demo/app/products/[id]/page.tsx\nindex b1aef82..e4e63f6 100644\n--- a/simple-demo/app/products/[id]/page.tsx\n+++ b/simple-demo/app/products/[id]/page.tsx\n@@ -1,7 +1,7 @@\n import { notFound } from 'next/navigation';\n import Header from '../../components/Header';\n import Footer from '../../components/Footer';\n-import { products } from '../../productData';\n+import { products } from '../../data';\n \n export function generateStaticParams() {\n return products.map(product => ({\ndiff --git a/simple-demo/app/products/page.tsx b/simple-demo/app/products/page.tsx\nindex 19233dd..8adb735 100644\n--- a/simple-demo/app/products/page.tsx\n+++ b/simple-demo/app/products/page.tsx\n@@ -1,7 +1,7 @@\n import Header from '../components/Header';\n import Footer from '../components/Footer';\n import ProductCard from '../components/ProductCard';\n-import { products } from '../../productData';\n+import { products } from '../../data';\n \n export default function ProductsPage() {\n return (\n"
    5}

    If there’s an issue with your request, you’ll receive an error status code with a corresponding message:

    Missing Required Parameter (400 Bad Request):

    Response
    1{
    2 "error": "repoUrl is required"
    3}

    Invalid API Key (401 Unauthorized):

    Response
    1"Unauthorized."
  7. Apply the Diff

    You can easily apply the diff to your codebase using the git apply command. For example:

    $sh upload.sh projects/my-project > url.txt # replace with your upload logic
    >curl -X POST https://api.benchify.com/v1/fixer \
    > -H "Authorization: Bearer $BENCHIFY_KEY" \
    > -H "Content-Type: application/json" \
    > -d '{
    > "repoUrl": "'"$REPO_URL"'",
    > "buildCmd": "npm run build",
    > "jobName": "fix-my-project"
    > }' > response.json
    >cd projects/my-project # move into your project root before applying the patch
    >git apply <(jq -r '.diff' ../../response.json)

    If you are building an AI agent, you may find that even when the Fixer fails, the diff it suggests is directionally correct. That is to say, your Agent may want to use the diff and build_output as a starting point for its own suggestions. (Note, we only bill you for successful Fixer runs, where build_status is 0, but we give you the full output regardless.)