Skip to main content

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.

← Back to Customization Cookbook Scenario: You want clinicians (or your product UI) to tweak how a Standard renders for a single document — switch a section title, change the writing style, swap the output schema. The tweak does not persist; the next call uses the Standard as-is again. Your product can decide between two patterns for collecting the tweak from end-users:
  • Presets. You pre-build a small set of inheriting variant sections/templates (Recipe 2) and your UI picks one. The end user clicks “Telegraphic style”; you route the request to the corresponding pre-built section ID. No prompt engineering for the user; deterministic.
  • Free-prompt. Your UI exposes a text field (“How would you like the writing style?”). You drop the user’s prompt straight into writingStylePrompt on a runtime override. Maximum flexibility, less deterministic.
  • Hybrid. Presets for the common cases + a free-prompt field for last-mile tweaks.
What you do: Use Path 2 (templateRef + overrides) at POST /documents. The base template is untouched; a drift-proof auto-generated template aggregate is persisted for traceability — but retained for 30 days only (see Guided Synthesis). If you want the customized variant to persist long-term, convert the aggregate into a permanent project-owned template before the retention window expires.
POST /documents — Path 2 (templateRef + overrides)
{
  "outputLanguage": "en-US",
  "interactionId": "<your-interaction-id>",
  "templateRef": {
    "templateId": "<your-template-id>",
    "overrides": {
      "instructions": {
        "prompt": "Produce a focused note for a follow-up encounter."
      },
      "sections": [
        {
          "sectionId": "<your-section-id>",
          "generation": {
            "heading": "Anamnesis",
            "instructions": {
              "writingStylePrompt": "Telegraphic — values and facts only, no narrative."
            }
          }
        }
      ]
    }
  }
}
Why this lever: Zero authoring overhead — no new resources to manage, no inheriting resource to keep in sync. The base Standard always stays current. Each call records the tweak via the auto-generated aggregate in the response (templateId, templateVersionId), so you can audit what produced any given document. Caveat: Each section override must reference a section that is already linked to the base template version. You can’t add new sections via overrides — use Path 3 (assembly) for that.
Previous: Recipe 2 — Inherit from a Corti Standard via inheritFromId · Next: Recipe 4 — Author your own sections & templates