---
title: "AI Fallback Fix"
method: POST
path: "/v1/fix/ai-fallback"
tags: ["fixer", "PUBLIC"]
---

# AI Fallback Fix

`POST /v1/fix/ai-fallback`

AI-powered fallback for complex issues. Phase 3 of the 3-phase architecture. Handles issues that standard fixers cannot resolve. Uses LLM to understand and fix complex problems. Provides confidence scores and alternative suggestions.

## Request body

- object
  - `files` object[], required — List of files (potentially already fixed by standard fixers)
    - `path` string, required — Path to the file
    - `contents` string, required — File contents
  - `remaining_diagnostics` object, required — Diagnostics that remain after standard fixing
    - `file_to_diagnostics` object — Diagnostics grouped by file
  - `template_path` string — Template path for project context (defaults to benchify/default-template if not provided)
  - `event_id` string — Unique identifier for the event
  - `continuation_event_id` string — Event ID from Step 1 to continue with the same temp directory
  - `max_attempts` number — Maximum number of AI fix attempts
  - `include_context` boolean — Whether to include context in AI prompts
  - `meta` object, nullable — Meta information for the request
    - `external_id` string, nullable — Customer tracking identifier

## Response `200`

Successful AI fallback response

- object
  - `data` object, required — The actual response data
    - `success` boolean, required — Whether the AI fallback was successful overall
    - `files_fixed` number, required — Number of files that were fixed
    - `issues_resolved` number, required — Total number of issues resolved
    - `issues_remaining` number, required — Total number of issues still remaining
    - `execution_time` number, required — Time taken to execute AI fallback in seconds
    - `file_results` object, required — Per-file AI fix results keyed by file path
    - `ai_suggestions` string, nullable — Additional AI suggestions if available
    - `fixer_version` string — Version of the fixer
  - `meta` object — Meta information
    - `trace_id` string, nullable — Unique trace identifier for the request
    - `external_id` string, nullable — Customer tracking identifier
  - `error` object, nullable — The error from the API query
    - `code` string, required — The error code
    - `message` string, required — The error message
    - `details` object — Details about what caused the error

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `500` — Server error

---

[API](https://skmtc.net/benchify/apis/benchify-api.md) · [All operations](https://skmtc.net/benchify/apis/benchify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/benchify/benchify-api/versions/1a65aea8dd7d/schema)
