Overview
In the Corti API, Templates define the structure of documents generated by Corti's AI models, and Sections are the building blocks templates are made of. Together they ensure consistency, clarity, and control in AI-supported medical reporting.
Templates and sections are first-class API resources: each has a UUID, supports versioning and publishing, and can be created and managed by you — not just read. They live at two dedicated endpoints:
Resource | Endpoint | What it is |
Sections |
| Defines one part of a document: its heading, prompts (content, writing style, misc), and a typed output schema |
Templates |
| An ordered composition of sections, plus optional template-level instructions |
Sections and templates authored here are used with the document generation endpoint POST /documents — see How to Generate Documents using Corti's API.
⚠️ Used the previous templates system? The old surface — string templateKeys like corti-soap, GET /templates, and GET /templateSections — is part of Documents Classic, which is deprecated and shuts down on January 18, 2027. The templates listed in our older article keep working until then. See the migration guide on docs.corti.ai for the field-by-field mapping.
Key Features
|
|
Two-sided library | Corti-curated Standards ( |
Full authoring lifecycle | Create, read, update, version, publish, and delete your own sections and templates via the API |
Typed outputs | Each section declares an |
Inheritance | Create variants from Corti Standards (or your own resources) with |
Per-locale resources | Each Standard is published as a separate resource per language (and where applicable, per region and specialty), each with its own UUID |
Sections
A section defines how one part of a document is generated. Every section carries:
heading— the section title as it appears in the documentinstructions— three prompt fields:contentPrompt— guides what input content belongs in the sectionwritingStylePrompt— guides tone and style (e.g. telegraphic, plain language)miscPrompt— free-form additional instructions
outputSchema— a typed schema controlling the section's output:string,number,boolean,array, orobject, with formatting primitives likeitemFormatandfieldFormatfor advanced text rendering
Templates
A template composes sections into a fixed, ordered structure. When creating a template you define its name, supported languages, optional template-level instructions, and the ordered list of sections:
{
"name": "Allergy follow-up note",
"languages": ["en"],
"generation": {
"instructions": { "prompt": "Produce a focused follow-up note for an allergy consultation." },
"sections": [
{ "sectionId": "<your-section-id>", "orderIndex": 0 },
{ "sectionId": "<your-section-id>", "orderIndex": 1 },
{ "sectionId": "<your-section-id>", "orderIndex": 2 }
]
}
}Versioning and Publishing
Your sections and templates have an explicit version + publish lifecycle. You can iterate on drafts freely — previously published versions keep serving your production traffic until you publish a new version. This means you can test changes without affecting live document generation, and every generation call records exactly which template version produced the document.
Browsing the Library
Use the list endpoints to discover what's available — Corti Standards and your own resources side by side:
Query param | Use for |
|
|
| Locale (BCP-47, e.g. |
| Region-specific variants (ISO 3166-1 alpha-3, e.g. |
| Specialty-specific variants (e.g. |
| Filter by |
| Typically |
curl "<https://api.eu.corti.app/v2/documents/sections?source=corti&lang=en&published=true>" \
-H "Authorization: Bearer <token>" \
-H "Tenant-Name: <tenant-name>"
The same filters work on LIST /documents/templates.
💡 Important: each Standard exists as a separate resource per locale — the English corti-hpi and the German corti-hpi share the same family label but have different UUIDs. Always include the lang filter when resolving UUIDs, and cache the (family, lang) → id mapping in your service so you don't need a list call on every generation request.
The full Corti Standards section library — from corti-hpi and corti-subjective through corti-plan, corti-discharge-summary and beyond — is documented on docs.corti.ai, with each section's title, output type, and description.
Creating Your Own (and Inheriting from Corti's)
Author your own sections and templates with POST /documents/sections and POST /documents/templates. The most efficient path for customization is often inheritance: pass a Standard's UUID as inheritFromId and override only what you want to diverge.
{
"name": "HPI (Pediatric)",
"languages": ["en"],
"specialties": ["pediatrics"],
"inheritFromId": "<your-section-id>",
"generation": {
"instructions": {
"writingStylePrompt": "Use family-centred language; refer to the patient as 'the child'."
}
}
}Inheritance rules worth knowing:
instructionsoverrides are per-field partial — fields you omit continue to track Corti's improvements as new versions are published.outputSchemaoverrides are wholesale — your schema fully replaces the inherited one; partial schemas are not merged.To fully decouple from a Standard, re-create the resource with its configuration without
inheritFromId— the copy is yours to version, and future Corti updates won't reach it.
For prompt-writing guidance, see Document Generation: Customizing Sections — Best Practices.
