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

# Text Generation

> Updates and improvements to Corti AI Text Generation functionality

<Update label="2026-05-07" tags={["API", "FactsR"]}>
  #### Support for `flush` and `factGenerationInterval` <Badge className="accent-badge" shape="rounded">Beta</Badge>

  The `/streams` endpoint now supports parameters and event types that add more control to generating facts.

  The [`flush`](/api-reference/streams#flush-the-audio-buffer) event is now also respected for fact generation. When sent from the client, this first processes outstanding transcripts and subsequently triggers fact generation.

  The [`factGenerationInterval`](/api-reference/streams#param-fact-generation-interval) parameter can be optionally set to `fast_init`, else default to the fixed 60s interval. With `fast_init`, fact generation will follow a logarithmic curve, currently with the initial generation at roughly around 10s, then 20s, then 26s and continuously increasing interval length until the default 60s interval is reached.

  Note: Both functionalities carry the <Badge className="accent-badge" shape="rounded">Beta</Badge>. There can be effects on fact (near) duplicates and quantity.
</Update>

<Update label="2026-01-19" tags={["API"]}>
  #### Updates: More Descriptive Error Codes

  Error codes now return clearer, more descriptive details to make it easier to identify the issue. This effectively replaces the previous format and deprecates the Common Errors.

  Here is the schema which you can also see in the API reference responses, along with a couple examples.

  <CodeGroup>
    ```bash response error schema theme={null}
    {
    "requestid": "<string>",
    "status": 123,
    "type": "<string>",
    "detail": "<string>",
    "validationErrors": [
      {}
    ]
    }
    ```

    ```bash example 400 response theme={null}
    {
        "requestid": "b0dd76dd-7bc6-4aba-8dc1-efd841060067",
        "status": 400,
        "type": "about:blank",
        "detail": "Validation error",
        "validationErrors": [
            {
                "detail": "must be a valid BCP-47 language tag",
                "pointer": ".outputLanguage"
            }
        ]
    }  
    ```

    ```bash example 404 response theme={null}
    {
        "requestid": "b39b3686-0829-428e-b5e6-1be90214cb3c",
        "status": 404,
        "type": "about:blank",
        "detail": "template not found"
    }
    ```
  </CodeGroup>
</Update>

<Update label="2026-01-15" tags={["Documents"]}>
  #### Updates: Standard Templates and Sections

  Corti standard templates and sections have undergone various improvements to increase the quality of the documentation to be generated and support the new [`documentation mode`](/textgen/documents-docmode). We have added a few additional standard sections for referral or discharge summary, while streamlining some sections, e.g. there is now only one section for social history and it includes alcohol and nicotine by default. If you don't want this to be included, you can customize the section accordingly. Read more on customizing sections [here](/textgen/documents-customize).

  <Info>Should you for some reason still need to reference the previous iteration of the standard sections or templates, then those are all available with the post-fix `-legacy` to the section and template key.</Info>

  Read more in our [guide on templates](/textgen/templates-standard).
</Update>

<Update label="2026-01-07" tags={["Documents", "API"]}>
  #### New: Documentation Modes

  You can now set `documentationMode: routed_parallel` and leverage the innovative, reconceptualized approach to generate documents for faster, more consistent and robust outputs. This 2-step, coarse-to-fine document generation mode currently supports FactsR as input and in the first step distributes the relevant facts to each section, based on the specified template (sections), then generates each section in parallel.

  This new documentation mode requires the template and its sections to support `routed_parallel`. You can check the new property of the same name `documentationMode` for responses from [GET /template(s)](/api-reference/templates/get-template#response-documentation-mode) and [GET /templateSections](/api-reference/templates/list-template-sections#response-data-items-documentation-mode).

  Read more in our [guide on Documentation Mode](/textgen/documents-docmode) or see the [API reference](/api-reference/documents/generate-document#body-one-of-0-documentation-mode).
</Update>

<Update label="2025-12-12" tags={["Documents", "API"]}>
  #### New: Customize existing sections

  Empower your customers and end-user clinicians to combine and tailor the Corti provided template sections for custom templating needs. Built atop the ability to reference section keys dynamically in the API request, you can now directly in the request override section names, writing styles, formatting rules and additional instructions, ensuring documentation perfectly fits organizational standards and clinician preferences.
  Read more in the [guide to customize sections](/textgen/documents-customize) or see the [API reference](/api-reference/documents/generate-document#sections-overridable)
</Update>

<Update label="2025-11-13" tags={["Documents", "API"]}>
  #### Changes and deprecations to document and template endpoints

  As we evolve the document generation endpoint and related GET templates/sections, we are announcing several changes and deprecations.
  Find the full details including impact and timeline to shutdown in the [breaking changes changelog](/release-notes/changelog-upcoming)
</Update>

<Update label="2025-11-05" tags={["Documents", "LLM", "API"]}>
  #### New, improved documentation guardrails!

  * We have re-architected our documentation guardrails to be faster and more accurate.
  * Documentation guardrails are the by default automatic step that quality-controls the generated document to correct outputs ungrounded in the source input.
  * In this re-architected, new approach, we in parallel for each section identify hallucinations and provide targeted fixes by reference (sentence/segment index), preventing mismatched edits and skipping ambiguous duplicates. The result is format-preserving precise, auditable corrections that deliver safer, more trustworthy clinical summaries.

  Additionally, you can now at request level [disable documentation guardrails](/api-reference/documents/generate-document#body-disable-guardrails) if you want to better understand their impact on quality, processing time and token usage.

  #### Reduced token usage for text generation

  We are now leveraging cached input tokens when generating documents or facts. This is part of a continuous effort to provide text gen capabilities by Corti's LLMs at even more competitive token consumption behaviour. <br /><br />
  *Note: We plan to expose cached tokens as separate usage info response in the future.*
</Update>

<Update label="2025-10-10" tags={["FactsR", "API"]}>
  #### New endpoint to [extract facts](/api-reference/facts/extract-facts) from a provided text string input now available!

  * so far [FactsR™](/textgen/factsr) was dependent on streaming audio over WSS to extract facts
  * this new endpoint facilitates a REST endpoint as alternative to extract facts

  The endpoint lives under the new /tools/ route:

  * atomic endpoint, not part of interaction collection
  * output is not stored into Corti database (zeroRetention is the only default)

  Read more about the behaviour and use cases of this endpoint in our [guide](/textgen/extractfacts).
</Update>

<Update label="2025-10-01" tags={["Documents"]}>
  Update to [Generate Document](/api-reference/documents/generate-document) functionality, including the following:

  * Improve handling of sections that do not have content generated so that an empty string is returned instead of a placeholder (e.g., `<empty>`).
  * Fix to issue causing json text to be included in note output.
  * nfc: Improve logging and exception handling in LLM hallucination guardrails service.
</Update>

<Update label="2025-09-05" tags={["API", "Documents"]}>
  New: Set a [zeroRetention header](/api-reference/documents/generate-document#parameter-x-corti-retention-policy) in the request to disable storing of the generated document to the DB.
</Update>

<Update label="2025-09-22" tags={["API"]}>
  Updated endpoint tags in [API Reference](/api-reference/welcome) page to indicate those with limited availability (codes, alignment, classification, contextual, explainability). Endpoints labeled as `limited availability` are *not available* for public use at this time. Please [contact us](https://help.corti.app) to learn more about these expert models and expected functionality to be generally released as AI tools.
</Update>

<Update label="2025-06-11" tags={["FactsR", "LLM"]}>
  #### Introducing a new foundation for clinical AI, built not just to document care, but to support it: FactsR™.

  FactsR listens in real time, extracts clinical facts as the conversation unfolds, and helps clinicians stay in control, refining and approving facts, not sifting through hallucinated paragraphs.

  Read the full announcement [here](https://www.corti.ai/stories/introducing-factsr-the-thinking-engine-behind-better-clinical-ai)!
</Update>

<Update label="2025-05-15" tags={["Documents", "API"]}>
  #### New: Corti default templates

  Leverage default, out-of-the-box templates and sections to accelerate launching ambient documentation flows.
  The templates and sections cover a broad range of frequently used clinical note formats and are available in all languages Corti offers.
  New [API endpoints](/api-reference/documents/list-documents) to both list templates, sections and retrieve individual templates and sections are launched.

  Learn more how to leverage those templates [here](/textgen/templates-standard)!
</Update>

<Update label="2025-01-28">
  Announcing the launch of Corti AI Platform. Read more about it [here](https://www.corti.ai/)
</Update>
