---
title: "Preview note extraction (no persistence)"
method: POST
path: "/api/ai/extract-note-preview/{note}"
tags: ["ai-controller"]
---

# Preview note extraction (no persistence)

`POST /api/ai/extract-note-preview/{note}`

Runs AI extraction for the selected refinement layout items and returns the suggested new note title, new note content, and updated original note content without persisting any changes.

## Path parameters

- `note` integer, required

## Request body

- NoteRefinementLayoutSelectionRequestDTO
  - `refinementLayout` NoteRefinementLayout
    - `items` NoteRefinementLayoutItem[], required
      - `id` string, required
      - `text` string, required
      - `alreadyExtracted` boolean, required
      - `ledToQuestion` boolean, required
      - `children` NoteRefinementLayoutItem[], required
  - `selectedItemIds` string[]

## Response `200`

OK

## Changes

> 145 revisions in range; 30 could not be searched.

- **2026-08-17** `5bdb7bbe4fef` — 1 warning, 1 info
  - removed the request property `layout`
  - added the new optional request property `refinementLayout`
- **2026-08-06** `555f237630cc` — 1 breaking
  - added the new required request property `layout/items/items/ledToQuestion`
- **2026-07-08** `20eb3371b79b` — 3 info
  - the response property `newNoteContent` became required for the status `200`
  - the response property `newNoteTitle` became required for the status `200`
  - the response property `updatedOriginalNoteContent` became required for the status `200`
- **2026-07-08** `51198936df85` — 1 info
  - endpoint added
- **2026-05-11** `d7c2946139e9` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/nerds-odd-e/apis/openapi-definition/changes/api/ai/extract-note-preview/:note/post.md)

---

[API](https://skmtc.dev/nerds-odd-e/apis/openapi-definition.md) · [All operations](https://skmtc.dev/nerds-odd-e/apis/openapi-definition/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nerds-odd-e/openapi-definition/revisions/44ef688a3dcd/schema)
