---
title: "Generate AI remediation for an issue"
method: POST
path: "/issues/{issueId}/ai-remediation"
tags: ["Issues"]
---

# Generate AI remediation for an issue

`POST /issues/{issueId}/ai-remediation`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/issues/{issueId}/ai-remediation`
- Auth: API key in header `X-ESCAPE-API-KEY`

Trigger the asynchronous generation of AI remediation for an issue. Generation only schedules a job: read the result back with GET /v3/issues/{issueId}, on `remediation` for the full issue-panel remediation or on `aiRemediationSummary` for the short overview summary. Generating the full remediation clears the previous remediation and its feedback immediately. Generating the summary replaces the previous summary, and resets its rating, only once the generation job succeeds. Identical requests repeated within a short window are ignored and return `generated: false`.

## Path parameters

- `issueId` string, uuid, required: The issue ID

## Request body

- object
  - `kind` 'remediation' | 'summary': Which AI remediation artefact to act on: `remediation` for the full issue-panel remediation, `summary` for the short overview summary.

## Response `200`

OK

- object
  - `kind` 'remediation' | 'summary', required: The AI remediation that was requested
  - `generated` boolean, required: Whether the generation request was accepted. False when an identical request is already in flight.
  - `cleared` boolean, required: Whether this trigger synchronously cleared an existing full remediation (and its feedback). Always false for the `summary` kind, which is replaced asynchronously once the generation job succeeds.

## Other responses

- `400`: Bad Request
- `404`: Not found

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
