> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Queue Refine with AI iterations, poll their progress, and inspect proposed answer improvements through Fini's public API.

Refine with AI lets your backend queue an AI-assisted review for a specific Fini response, then poll the review session until Fini has generated recommendations and replayed the answer.

Use these routes when you already have the conversation ID and Fini-authored event ID for the response you want to improve. Use [List conversations](/en/api-reference/list-conversations) or [Get conversation](/en/api-reference/get-conversation) to discover those IDs first.

<Info>
  Creating a review iteration can generate draft prompt, article, or rule recommendations. It does not publish or apply those changes automatically.
</Info>

## Endpoints

| Method | Path                                                                         | Scope   | Reference                                                                            |
| ------ | ---------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------ |
| `POST` | `/v2/fix-review/interactions/:id/events/:eventId/sessions/iterations/public` | `write` | [Create Refine with AI iteration](/en/api-reference/create-fix-review-iteration)     |
| `GET`  | `/v2/fix-review/interactions/:id/events/:eventId/session/public`             | `read`  | [Get active Refine with AI session](/en/api-reference/get-active-fix-review-session) |
| `GET`  | `/v2/fix-review/interactions/:id/events/:eventId/sessions/:sessionId/public` | `read`  | [Get Refine with AI session](/en/api-reference/get-fix-review-session)               |

## Review flow

<Steps>
  <Step title="Find the Fini response">
    Fetch the conversation and choose the Fini-authored event you want to review.
  </Step>

  <Step title="Create an iteration">
    Send the feedback note to the create endpoint. Fini creates or reuses the active review session for that response.
  </Step>

  <Step title="Poll the session">
    Use the returned `sessionId`, or the active-session route, to read progress while the iteration moves through analysis and replay.
  </Step>

  <Step title="Inspect the recommendation">
    When `latestIteration.status` is `ready`, compare the original and replayed answer snapshots, then inspect `changes` for the proposed draft IDs and root-cause details.
  </Step>
</Steps>

## Shared objects

The session endpoints return a `FixReviewSession` shape. For the full field list, see [Get active fix-review session](/en/api-reference/get-active-fix-review-session#fixreviewsession-object).

Key fields to handle in integrations:

* `sessionId`: review session ID for the selected response.
* `latestIteration`: the newest queued, running, or completed review iteration.
* `iterations`: all iterations in the session, ordered newest first.
* `originalAnswerSnapshot`: the response Fini originally sent.
* `latestIteration.newAnswerSnapshot`: the replayed answer generated after the proposed fix.
* `latestIteration.changes`: draft prompt, article, or rule recommendations created by the review.
