> ## 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.

# Recipe 2 — Inherit from a Corti Standard via `inheritFromId`

> Fork a Corti Standard section or template via inheritFromId — persistent, versioned customization that auto-tracks parent improvements.

<Badge className="accent-badge" shape="rounded">Beta</Badge>

← Back to [Customization Cookbook](/textgen/customization-cookbook)

**Scenario:** 90% of `corti-hpi` is right but you want family-centred language for a pediatric clinic. The change applies on **every call** from this clinic.

**What you do:**

1. Create a section that inherits from the Standard. Pass the Standard's UUID as `inheritFromId`; override only the fields you want to diverge.
2. Wrap it in a template (or create an inheriting template from an existing Standard template) and reference your inheriting section's UUID in `sections[]`.
3. Reference your new template from `POST /documents` using Path 1.

```json title="POST /documents/sections — inherit with an instructions override" expandable theme={null}
{
  "name": "HPI (Pediatric)",
  "languages": ["en"],
  "labels": [{ "key": "specialty", "value": "pediatrics" }],
  "specialties": ["pediatrics"],
  "inheritFromId": "<your-section-id>",
  "generation": {
    "instructions": {
      "writingStylePrompt": "Use family-centred language. Refer to the patient as 'the child'. Address caregivers directly only when the source material does."
    }
  }
}
```

**Variation — inherit with a schema override.** Keep the Standard's full prompt machinery (`contentPrompt`, `writingStylePrompt`, `miscPrompt`, `heading`) but swap the `outputSchema` to a structured shape your EHR pipeline expects. `outputSchema` overrides are **wholesale** — the schema you submit fully replaces the parent's. See [Section Schemas](/textgen/section-schemas) for design patterns.

```json title="POST /documents/sections — inherit with a schema override" expandable theme={null}
{
  "name": "HPI (structured)",
  "languages": ["en"],
  "labels": [{ "key": "shape", "value": "structured" }],
  "inheritFromId": "<your-section-id>",
  "generation": {
    "outputSchema": {
      "type": "object",
      "fieldFormat": "{key}\n{value}\n",
      "fields": [
        { "key": "Onset",    "description": "When and how the illness began.",           "value": { "type": "string" } },
        { "key": "Course",   "description": "Progression over time.",                    "value": { "type": "string" } },
        { "key": "Symptoms", "description": "Current symptoms and pertinent negatives.", "value": { "type": "string" } }
      ]
    }
  }
}
```

<Tip>When the schema change is structural (e.g. `string` → `object`/`array`), the parent's `writingStylePrompt` may conflict with the new shape ("single paragraph" vs. multiple object fields). Override `writingStylePrompt` in the same inheriting section to keep instructions coherent.</Tip>

**Why this lever:** Persistent and versioned. Inherits the Corti Standard's published configuration on every field you didn't override — including subsequent (typically silent) Corti improvements to those fields. Auditable — the inheriting section has its own UUID and version history.

**Caveat — silent upstream updates.** Inheritance resolves against the Corti Standard's **published** version at request time. Updates to Corti Standards are typically **silent**: small prompt refinements and quality improvements ship continuously, the same way many small API releases do, without per-change notes. Only clear schema-breaking changes or significant behavior changes are explicitly communicated.

If your integration requires staying on a specific behavior, **don't use `inheritFromId`** against the Corti Standard at all — instead, re-create the section (or template) as your **own** resource by copying the configuration into a `POST /documents/sections` request *without* `inheritFromId`. That decouples you from the Corti Standard entirely; subsequent silent improvements to the Standard will not reach you, and the resource is yours to version.

***

Previous: [Recipe 1 — Use a Corti Standard out of the box](/textgen/customization-cookbook/recipe-1-corti-standard-as-is) · Next: [Recipe 3 — Reference Corti Standards + per-call end-user overrides](/textgen/customization-cookbook/recipe-3-runtime-overrides-on-standards)
