---
title: "Draft flashcards from a conversation with an AI assistant. Saves nothing"
method: POST
path: "/revise/ai/generate/chat"
tags: ["revise"]
---

# Draft flashcards from a conversation with an AI assistant. Saves nothing

`POST /revise/ai/generate/chat`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/revise/ai/generate/chat`
- Auth: HTTP bearer

## Request body

- GenerateFromChatDto
  - `max_cards` number
  - `instructions` string
  - `language` string: BCP-47 tag of the language to write the cards in, translating from the source when needed. Defaults to the user's profile language, then English
  - `keep_source_language` boolean: Write each card in the language of its source instead of `language` (e.g. for language practice)
  - `reasoning_effort` 'low' | 'high'
  - `turns` ReviseChatTurnDto[], required
    - `role` 'user' | 'assistant', required
    - `content` string, required

## Response `200`

- ReviseGenerationResponseDto
  - `drafts` ReviseDraftCardDto[], required
    - `front` string, required
    - `back` string, required: Ends with the memory hook when there is one
    - `source_note_id` string: Set for drafts generated from notes
    - `mnemonic` ReviseMnemonicDto
      - `type` 'acronym' | 'acrostic' | 'association' | 'rhyme' | 'chunking', required
      - `text` string, required: The acronym, the acrostic sentence, or the association, rhyme or chunking
      - `expansion` string[], required: What an acronym or acrostic encodes, in letter order; empty otherwise
      - `reordered` boolean, required: The items were rearranged to make the word because their order does not matter
      - `is_english_word` boolean, nullable, required: Acronyms: the letters spell a common English word
      - `hook` string, required: The line shown under the answer, in the card's language
  - `truncated` boolean, required: The model offered more drafts than max_cards

## Other responses

- `422`: REVISE_GENERATION_FAILED: the model failed or found nothing to learn

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
