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

# Create section

> Creates a new section with an initial version. When `publish` is true (default),
the response includes the published version with full inheritance resolution applied
(section inheritance chain walked to fill missing fields).




## OpenAPI

````yaml /api-reference/auto-generated-openapi.yml post /documents/sections/
openapi: 3.0.0
info:
  title: Corti API
  version: 2.0.0
servers:
  - url: https://api.{environment}.corti.app/v2/
    variables:
      environment:
        default: eu
        enum:
          - us
          - eu
security:
  - AuthorizationHeader:
      - bearer
tags:
  - name: Interactions
  - name: Recordings
  - name: Transcripts
  - name: Facts
  - name: Codes
  - name: Languages
  - name: Guided Documents
  - name: Guided Templates
  - name: Guided Sections
  - name: Documents (Classic)
  - name: Templates (Classic)
paths:
  /documents/sections/:
    post:
      tags:
        - Guided Sections
      summary: Create section
      description: >
        Creates a new section with an initial version. When `publish` is true
        (default),

        the response includes the published version with full inheritance
        resolution applied

        (section inheritance chain walked to fill missing fields).
      operationId: guided_sections_create
      parameters:
        - $ref: '#/components/parameters/Tenant-Name'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuidedSectionsCreateRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuidedSection'
        '400':
          $ref: '#/components/responses/BadRequest'
      x-codeSamples:
        - lang: csharp
          label: C# .NET SDK
          source: |
            using Corti;

            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );
            await client.Documents.Sections.CreateAsync(
                new GuidedSectionsCreateFromInheritanceRequest
                {
                    Name = "name",
                    InheritFromId = "inheritFromId",
                }
            );
        - lang: javascript
          label: JavaScript SDK
          source: |
            import { CortiClient, CortiEnvironment } from "@corti/sdk";

            const client = new CortiClient({
                environment: CortiEnvironment.Eu,
                auth: {
                    clientId: "YOUR_CLIENT_ID",
                    clientSecret: "YOUR_CLIENT_SECRET"
                },
                tenantName: "YOUR_TENANT_NAME"
            });
            await client.documents.sections.create({
                name: "name",
                inheritFromId: "inheritFromId"
            });
        - lang: csharp
          label: Inherit from ID
          source: |
            using Corti;

            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );
            await client.Documents.Sections.CreateAsync(
                new GuidedSectionsCreateFromInheritanceRequest
                {
                    Name = "<string>",
                    InheritFromId = "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    Description = "<string>",
                    Languages = new List<string> { "<string>" },
                    Regions = new List<string> { "<string>" },
                    Specialties = new List<string> { "<string>" },
                    Labels = new List<GuidedLabel>
                    {
                        new GuidedLabel { Key = "<string>", Value = "<string>" }
                    },
                    Publish = true,
                }
            );
          x-fern-sdk-language-id: inherit-from-id
        - lang: csharp
          label: Create from scratch
          source: |
            using Corti;

            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );
            await client.Documents.Sections.CreateAsync(
                new GuidedSectionsCreateFromScratchRequest
                {
                    Name = "<string>",
                    Description = "<string>",
                    Languages = new List<string> { "<string>" },
                    Regions = new List<string> { "<string>" },
                    Specialties = new List<string> { "<string>" },
                    Labels = new List<GuidedLabel>
                    {
                        new GuidedLabel { Key = "<string>", Value = "<string>" }
                    },
                    Publish = true,
                    Generation = new GuidedSectionGeneration
                    {
                        Heading = "<string>",
                        Instructions = new GuidedSectionInstructions
                        {
                            ContentPrompt = "<string>",
                            WritingStylePrompt = "<string>",
                            MiscPrompt = "<string>",
                        },
                        OutputSchema = new GuidedStringNode
                        {
                            Type = "string",
                            Description = "<string>",
                            Default = "<string>",
                            Enum = new List<string> { "<string>" },
                            Pattern = "<string>",
                        },
                    },
                }
            );
          x-fern-sdk-language-id: create-from-scratch
        - lang: javascript
          label: Inherit from ID
          source: |
            import { CortiClient, CortiEnvironment } from "@corti/sdk";

            const client = new CortiClient({
              environment: CortiEnvironment.Eu,
              auth: {
                clientId: "YOUR_CLIENT_ID",
                clientSecret: "YOUR_CLIENT_SECRET"
              },
              tenantName: "YOUR_TENANT_NAME"
            });

            await client.documents.sections.create({
              name: "<string>",
              inheritFromId: "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              description: "<string>",
              languages: ["<string>"],
              regions: ["<string>"],
              specialties: ["<string>"],
              labels: [
                { key: "<string>", value: "<string>" }
              ],
              publish: true
            });
          x-fern-sdk-language-id: inherit-from-id
        - lang: javascript
          label: Create from scratch
          source: |
            import { CortiClient, CortiEnvironment } from "@corti/sdk";

            const client = new CortiClient({
              environment: CortiEnvironment.Eu,
              auth: {
                clientId: "YOUR_CLIENT_ID",
                clientSecret: "YOUR_CLIENT_SECRET"
              },
              tenantName: "YOUR_TENANT_NAME"
            });

            await client.documents.sections.create({
              name: "<string>",
              description: "<string>",
              languages: ["<string>"],
              regions: ["<string>"],
              specialties: ["<string>"],
              labels: [
                { key: "<string>", value: "<string>" }
              ],
              publish: true,
              generation: {
                heading: "<string>",
                instructions: {
                  contentPrompt: "<string>",
                  writingStylePrompt: "<string>",
                  miscPrompt: "<string>"
                },
                outputSchema: {
                  type: "string",
                  description: "<string>",
                  default: "<string>",
                  enum: ["<string>"],
                  pattern: "<string>"
                }
              }
            });
          x-fern-sdk-language-id: create-from-scratch
        - lang: bash
          label: Inherit from ID
          source: |-
            curl --request POST \
              --url https://api.{environment}.corti.app/v2/documents/sections/ \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --header 'Tenant-Name: <tenant-name>' \
              --data '{
              "name": "<string>",
              "inheritFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "description": "<string>",
              "languages": [
                "<string>"
              ],
              "regions": [
                "<string>"
              ],
              "specialties": [
                "<string>"
              ],
              "labels": [
                {
                  "key": "<string>",
                  "value": "<string>"
                }
              ],
              "publish": true
            }'
          x-fern-sdk-language-id: inherit-from-id
        - lang: bash
          label: Create from scratch
          source: |-
            curl --request POST \
              --url https://api.{environment}.corti.app/v2/documents/sections/ \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --header 'Tenant-Name: <tenant-name>' \
              --data '{
              "name": "<string>",
              "description": "<string>",
              "languages": [
                "<string>"
              ],
              "regions": [
                "<string>"
              ],
              "specialties": [
                "<string>"
              ],
              "labels": [
                {
                  "key": "<string>",
                  "value": "<string>"
                }
              ],
              "publish": true,
              "generation": {
                "heading": "<string>",
                "instructions": {
                  "contentPrompt": "<string>",
                  "writingStylePrompt": "<string>",
                  "miscPrompt": "<string>"
                },
                "outputSchema": {
                  "type": "string",
                  "description": "<string>",
                  "default": "<string>",
                  "enum": [
                    "<string>"
                  ],
                  "pattern": "<string>"
                }
              }
            }'
          x-fern-sdk-language-id: create-from-scratch
        - lang: go
          label: Inherit from ID
          source: |
            package main

            import (
                "bytes"
                "encoding/json"
                "net/http"
            )

            func main() {
                body, _ := json.Marshal(map[string]interface{}{
                    "name": "<string>",
                    "inheritFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                    "description": "<string>",
                    "languages": []interface{}{
                        "<string>",
                    },
                    "regions": []interface{}{
                        "<string>",
                    },
                    "specialties": []interface{}{
                        "<string>",
                    },
                    "labels": []interface{}{
                        map[string]interface{}{
                            "key": "<string>",
                            "value": "<string>",
                        },
                    },
                    "publish": true,
                })

                req, _ := http.NewRequest("POST", "https://api.{environment}.corti.app/v2/documents/sections/", bytes.NewBuffer(body))
                req.Header.Set("Authorization", "Bearer <token>")
                req.Header.Set("Content-Type", "application/json")
                req.Header.Set("Tenant-Name", "<tenant-name>")

                client := &http.Client{}
                resp, _ := client.Do(req)
                defer resp.Body.Close()
            }
          x-fern-sdk-language-id: inherit-from-id
        - lang: go
          label: Create from scratch
          source: |
            package main

            import (
                "bytes"
                "encoding/json"
                "net/http"
            )

            func main() {
                body, _ := json.Marshal(map[string]interface{}{
                    "name": "<string>",
                    "description": "<string>",
                    "languages": []interface{}{
                        "<string>",
                    },
                    "regions": []interface{}{
                        "<string>",
                    },
                    "specialties": []interface{}{
                        "<string>",
                    },
                    "labels": []interface{}{
                        map[string]interface{}{
                            "key": "<string>",
                            "value": "<string>",
                        },
                    },
                    "publish": true,
                    "generation": map[string]interface{}{
                        "heading": "<string>",
                        "instructions": map[string]interface{}{
                            "contentPrompt": "<string>",
                            "writingStylePrompt": "<string>",
                            "miscPrompt": "<string>",
                        },
                        "outputSchema": map[string]interface{}{
                            "type": "string",
                            "description": "<string>",
                            "default": "<string>",
                            "enum": []interface{}{
                                "<string>",
                            },
                            "pattern": "<string>",
                        },
                    },
                })

                req, _ := http.NewRequest("POST", "https://api.{environment}.corti.app/v2/documents/sections/", bytes.NewBuffer(body))
                req.Header.Set("Authorization", "Bearer <token>")
                req.Header.Set("Content-Type", "application/json")
                req.Header.Set("Tenant-Name", "<tenant-name>")

                client := &http.Client{}
                resp, _ := client.Do(req)
                defer resp.Body.Close()
            }
          x-fern-sdk-language-id: create-from-scratch
        - lang: java
          label: Inherit from ID
          source: |
            import java.net.URI;
            import java.net.http.HttpClient;
            import java.net.http.HttpRequest;
            import java.net.http.HttpResponse;

            public class Main {
                public static void main(String[] args) throws Exception {
                    String body = """
                        {
                          "name": "<string>",
                          "inheritFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                          "description": "<string>",
                          "languages": [
                            "<string>"
                          ],
                          "regions": [
                            "<string>"
                          ],
                          "specialties": [
                            "<string>"
                          ],
                          "labels": [
                            {
                              "key": "<string>",
                              "value": "<string>"
                            }
                          ],
                          "publish": true
                        }
                        """;

                    HttpRequest request = HttpRequest.newBuilder()
                        .uri(URI.create("https://api.{environment}.corti.app/v2/documents/sections/"))
                        .header("Authorization", "Bearer <token>")
                        .header("Content-Type", "application/json")
                        .header("Tenant-Name", "<tenant-name>")
                        .method("POST", HttpRequest.BodyPublishers.ofString(body))
                        .build();

                    HttpClient client = HttpClient.newHttpClient();
                    HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
                }
            }
          x-fern-sdk-language-id: inherit-from-id
        - lang: java
          label: Create from scratch
          source: |
            import java.net.URI;
            import java.net.http.HttpClient;
            import java.net.http.HttpRequest;
            import java.net.http.HttpResponse;

            public class Main {
                public static void main(String[] args) throws Exception {
                    String body = """
                        {
                          "name": "<string>",
                          "description": "<string>",
                          "languages": [
                            "<string>"
                          ],
                          "regions": [
                            "<string>"
                          ],
                          "specialties": [
                            "<string>"
                          ],
                          "labels": [
                            {
                              "key": "<string>",
                              "value": "<string>"
                            }
                          ],
                          "publish": true,
                          "generation": {
                            "heading": "<string>",
                            "instructions": {
                              "contentPrompt": "<string>",
                              "writingStylePrompt": "<string>",
                              "miscPrompt": "<string>"
                            },
                            "outputSchema": {
                              "type": "string",
                              "description": "<string>",
                              "default": "<string>",
                              "enum": [
                                "<string>"
                              ],
                              "pattern": "<string>"
                            }
                          }
                        }
                        """;

                    HttpRequest request = HttpRequest.newBuilder()
                        .uri(URI.create("https://api.{environment}.corti.app/v2/documents/sections/"))
                        .header("Authorization", "Bearer <token>")
                        .header("Content-Type", "application/json")
                        .header("Tenant-Name", "<tenant-name>")
                        .method("POST", HttpRequest.BodyPublishers.ofString(body))
                        .build();

                    HttpClient client = HttpClient.newHttpClient();
                    HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
                }
            }
          x-fern-sdk-language-id: create-from-scratch
        - lang: php
          label: Inherit from ID
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
                CURLOPT_URL => "https://api.{environment}.corti.app/v2/documents/sections/",
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_CUSTOMREQUEST => "POST",
                CURLOPT_POSTFIELDS => json_encode([
                    'name' => '<string>',
                    'inheritFromId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
                    'description' => '<string>',
                    'languages' => [
                        '<string>',
                    ],
                    'regions' => [
                        '<string>',
                    ],
                    'specialties' => [
                        '<string>',
                    ],
                    'labels' => [
                        [
                            'key' => '<string>',
                            'value' => '<string>',
                        ],
                    ],
                    'publish' => true,
                ]),
                CURLOPT_HTTPHEADER => [
                    "Authorization: Bearer <token>",
                    "Content-Type: application/json",
                    "Tenant-Name: <tenant-name>",
                ],
            ]);

            $response = curl_exec($curl);
            curl_close($curl);
          x-fern-sdk-language-id: inherit-from-id
        - lang: php
          label: Create from scratch
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
                CURLOPT_URL => "https://api.{environment}.corti.app/v2/documents/sections/",
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_CUSTOMREQUEST => "POST",
                CURLOPT_POSTFIELDS => json_encode([
                    'name' => '<string>',
                    'description' => '<string>',
                    'languages' => [
                        '<string>',
                    ],
                    'regions' => [
                        '<string>',
                    ],
                    'specialties' => [
                        '<string>',
                    ],
                    'labels' => [
                        [
                            'key' => '<string>',
                            'value' => '<string>',
                        ],
                    ],
                    'publish' => true,
                    'generation' => [
                        'heading' => '<string>',
                        'instructions' => [
                            'contentPrompt' => '<string>',
                            'writingStylePrompt' => '<string>',
                            'miscPrompt' => '<string>',
                        ],
                        'outputSchema' => [
                            'type' => 'string',
                            'description' => '<string>',
                            'default' => '<string>',
                            'enum' => [
                                '<string>',
                            ],
                            'pattern' => '<string>',
                        ],
                    ],
                ]),
                CURLOPT_HTTPHEADER => [
                    "Authorization: Bearer <token>",
                    "Content-Type: application/json",
                    "Tenant-Name: <tenant-name>",
                ],
            ]);

            $response = curl_exec($curl);
            curl_close($curl);
          x-fern-sdk-language-id: create-from-scratch
        - lang: python
          label: Inherit from ID
          source: |
            import requests

            url = "https://api.{environment}.corti.app/v2/documents/sections/"
            headers = {
                "Authorization": "Bearer <token>",
                "Content-Type": "application/json",
                "Tenant-Name": "<tenant-name>",
            }
            payload = {
                "name": "<string>",
                "inheritFromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "description": "<string>",
                "languages": [
                    "<string>"
                ],
                "regions": [
                    "<string>"
                ],
                "specialties": [
                    "<string>"
                ],
                "labels": [
                    {
                        "key": "<string>",
                        "value": "<string>"
                    }
                ],
                "publish": True
            }

            response = requests.post(url, json=payload, headers=headers)
          x-fern-sdk-language-id: inherit-from-id
        - lang: python
          label: Create from scratch
          source: |
            import requests

            url = "https://api.{environment}.corti.app/v2/documents/sections/"
            headers = {
                "Authorization": "Bearer <token>",
                "Content-Type": "application/json",
                "Tenant-Name": "<tenant-name>",
            }
            payload = {
                "name": "<string>",
                "description": "<string>",
                "languages": [
                    "<string>"
                ],
                "regions": [
                    "<string>"
                ],
                "specialties": [
                    "<string>"
                ],
                "labels": [
                    {
                        "key": "<string>",
                        "value": "<string>"
                    }
                ],
                "publish": True,
                "generation": {
                    "heading": "<string>",
                    "instructions": {
                        "contentPrompt": "<string>",
                        "writingStylePrompt": "<string>",
                        "miscPrompt": "<string>"
                    },
                    "outputSchema": {
                        "type": "string",
                        "description": "<string>",
                        "default": "<string>",
                        "enum": [
                            "<string>"
                        ],
                        "pattern": "<string>"
                    }
                }
            }

            response = requests.post(url, json=payload, headers=headers)
          x-fern-sdk-language-id: create-from-scratch
components:
  parameters:
    Tenant-Name:
      name: Tenant-Name
      in: header
      description: >-
        Identifies a distinct entity within Corti's multi-tenant system. Ensures
        correct routing and authentication of the request.
      required: true
      example: base
      schema:
        type: string
        description: >-
          Identifies a distinct entity within Corti's multi-tenant system.
          Ensures correct routing and authentication of the request.
        example: base
  schemas:
    GuidedSectionsCreateRequest:
      oneOf:
        - $ref: '#/components/schemas/GuidedSectionsCreateFromInheritanceRequest'
          title: Inherit from existing section
        - $ref: '#/components/schemas/GuidedSectionsCreateFromScratchRequest'
          title: Create from scratch
    GuidedSection:
      description: >
        Section as returned by single-resource endpoints (GET, POST, PATCH on

        `/documents/sections/{sectionID}`) and when embedded inside a resolved
        template

        version. Extends `GuidedSectionListItem` with the resolved
        `publishedVersion`.
      allOf:
        - $ref: '#/components/schemas/GuidedSectionListItem'
        - type: object
          properties:
            publishedVersion:
              $ref: '#/components/schemas/GuidedSectionVersion'
              description: >-
                The currently published version with section inheritance fully
                resolved. Present when a version has been published.
    GuidedSectionsCreateFromInheritanceRequest:
      description: >-
        Creates a section that inherits from another section. Any fields omitted
        in `generation` are inherited from the referenced section's published
        version; any fields provided override the inherited values.
      allOf:
        - $ref: '#/components/schemas/GuidedSectionsCreateBase'
        - type: object
          required:
            - inheritFromId
          properties:
            inheritFromId:
              type: string
              format: uuid
              description: >-
                Reference to the section to inherit generation configuration
                from. Inherits from the published version of the referenced
                section.
            generation:
              $ref: '#/components/schemas/GuidedSectionGenerationPartial'
    GuidedSectionsCreateFromScratchRequest:
      description: >-
        Creates a section from scratch with an explicit generation
        configuration. All required fields on `generation` apply.
      allOf:
        - $ref: '#/components/schemas/GuidedSectionsCreateBase'
        - type: object
          required:
            - generation
          properties:
            generation:
              $ref: '#/components/schemas/GuidedSectionGeneration'
    GuidedSectionListItem:
      type: object
      description: >
        Section metadata as returned by the LIST /documents/sections endpoint.
        Does not

        include the resolved `publishedVersion` — use GET
        /documents/sections/{sectionID}

        to fetch a single section with its published version resolved.
      required:
        - id
        - name
        - languages
        - regions
        - specialties
        - labels
        - createdAt
        - updatedAt
      properties:
        id:
          description: The UUID of the section.
          type: string
          format: uuid
        inheritedFromId:
          description: >-
            Reference to the section to inherit generation configuration from.
            Inherits from published version by default.
          type: string
          format: uuid
          nullable: true
        autoGenerated:
          description: >-
            True if the section was auto-generated as part of an inline
            section-composed POST /documents request.
          type: boolean
        source:
          description: >-
            Whether this section was created by the user, a project-related API
            Client or is a Corti standard resource.
          type: string
          enum:
            - user
            - corti
            - project
        name:
          description: The name of the section.
          type: string
        languages:
          description: >-
            BCP 47 languages this section has been tweaked for. Empty means no
            language-specific tweaks.
          type: array
          items:
            type: string
        regions:
          description: >-
            ISO 3166-1 alpha-3 country codes this section has been tweaked for.
            Empty means no region-specific tweaks.
          type: array
          items:
            type: string
        specialties:
          description: >-
            Clinical specialties this section has been tweaked for. Empty means
            no specialty-specific tweaks.
          type: array
          items:
            type: string
        description:
          description: The description for the section.
          type: string
        labels:
          description: >-
            The labels available to use as query param filter in the LIST
            /sections endpoint.
          type: array
          items:
            $ref: '#/components/schemas/GuidedLabel'
        createdBy:
          description: The UUID of the creator of this section.
          type: string
          format: uuid
        createdAt:
          description: The original timestamp when the section was created.
          type: string
          format: date-time
        updatedAt:
          description: The original timestamp when the section was last updated.
          type: string
          format: date-time
        deletedAt:
          description: >-
            Present when the section has been deleted. GET by ID still returns
            the full resource with this field populated.
          type: string
          format: date-time
          nullable: true
    GuidedSectionVersion:
      type: object
      description: >
        A section version. When embedded inside a Section resource (e.g. GET
        /sections/:id),

        inheritance is fully resolved. When returned directly from version
        endpoints

        (GET/LIST/POST .../versions/...), contains raw authored values without
        inheritance.
      required:
        - id
        - versionNumber
        - generation
      properties:
        id:
          description: The UUID of the section version.
          type: string
          format: uuid
        versionNumber:
          description: Starts at 0 and auto-increments.
          type: integer
        deletedAt:
          description: Present when the section version has been deleted.
          type: string
          format: date-time
          nullable: true
        generation:
          $ref: '#/components/schemas/GuidedSectionGeneration'
    ErrorResponse:
      type: object
      required:
        - requestid
        - status
        - type
        - detail
      properties:
        requestid:
          type: string
        status:
          type: integer
        type:
          type: string
        detail:
          type: string
        validationErrors:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
    GuidedSectionsCreateBase:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: A human-readable identifier for this section. Not passed to the LLM.
        description:
          type: string
          description: A description for this section. Not passed to the LLM.
        languages:
          type: array
          description: BCP 47 language tags this section has been tweaked for.
          items:
            type: string
        regions:
          type: array
          description: ISO 3166-1 alpha-3 country codes this section has been tweaked for.
          items:
            type: string
        specialties:
          type: array
          description: Clinical specialties this section has been tweaked for.
          items:
            type: string
        labels:
          type: array
          description: Labels work as query param filter in the LIST /sections endpoint.
          items:
            $ref: '#/components/schemas/GuidedLabel'
        publish:
          type: boolean
          default: true
          description: >-
            Defaults to true when omitted. Set this to false if you do not want
            the section to automatically show up in LIST /sections.
    GuidedSectionGenerationPartial:
      type: object
      description: >-
        Partial form of GuidedSectionGeneration used when inheriting from
        another section. Any field omitted is inherited from the referenced
        section.
      properties:
        heading:
          type: string
          description: Override the inherited section title. Passed to the LLM.
        instructions:
          $ref: '#/components/schemas/GuidedSectionInstructionsPartial'
          description: >-
            Override the inherited prompt instructions for this section. Any
            field omitted is inherited.
        outputSchema:
          $ref: '#/components/schemas/GuidedOutputSchema'
          description: Override the inherited output schema.
    GuidedSectionGeneration:
      type: object
      required:
        - heading
        - instructions
        - outputSchema
      properties:
        heading:
          type: string
          description: The heading of this section. Passed to the LLM.
        instructions:
          $ref: '#/components/schemas/GuidedSectionInstructions'
          description: The prompt instructions for this section.
        outputSchema:
          $ref: '#/components/schemas/GuidedOutputSchema'
    GuidedLabel:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
        value:
          type: string
    GuidedSectionInstructionsPartial:
      type: object
      description: >-
        Partial form of GuidedSectionInstructions used when inheriting from
        another section. Any field omitted is inherited.
      properties:
        contentPrompt:
          type: string
          description: Override the inherited content prompt.
        writingStylePrompt:
          type: string
          description: Override the inherited writing style prompt.
        miscPrompt:
          type: string
          description: Override the inherited misc prompt.
    GuidedOutputSchema:
      oneOf:
        - $ref: '#/components/schemas/GuidedStringNode'
          title: String
          description: >-
            Outputs a string according to the optionally configurable schema
            requirements.
        - $ref: '#/components/schemas/GuidedNumberNode'
          title: Number
          description: >-
            Outputs a number. The model infers whether it should be an integer
            or float from context.
        - $ref: '#/components/schemas/GuidedBoolNode'
          title: Boolean
          description: Outputs a boolean true or false according to schema configuration.
        - $ref: '#/components/schemas/GuidedArrayNode'
          title: Array
          description: >-
            Outputs an array of items according to the optionally configurable
            schema requirements. Items can be configured as any type of node.
        - $ref: '#/components/schemas/GuidedObjectNode'
          title: Object
          description: >-
            The object output type offers advanced schema configuration with the
            ability to define for each field value any of the outputSchema
            types.
      discriminator:
        propertyName: type
        mapping:
          string:
            $ref: '#/components/schemas/GuidedStringNode'
          number:
            $ref: '#/components/schemas/GuidedNumberNode'
          boolean:
            $ref: '#/components/schemas/GuidedBoolNode'
          object:
            $ref: '#/components/schemas/GuidedObjectNode'
          array:
            $ref: '#/components/schemas/GuidedArrayNode'
    GuidedSectionInstructions:
      type: object
      required:
        - contentPrompt
      properties:
        contentPrompt:
          type: string
          description: >-
            The content prompt instructs the model what to include for
            synthesis. For `documentationMode: routed_parallel` this impacts
            what facts to route to this section.
        writingStylePrompt:
          type: string
          description: >-
            The writingStyle prompt instructs the model in what tone and style
            to output.
        miscPrompt:
          type: string
          description: >-
            Optional free-form prompt for any instructions that don't fit
            contentPrompt or writingStylePrompt.
    GuidedStringNode:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - string
        description:
          type: string
          description: >-
            Guide the LLM in what to output for this node. Supplements the
            section-level instructions.
        default:
          type: string
          nullable: true
          description: >-
            If nothing is outputted, this default is used. When `enum` is set,
            the default must be one of the enum values.
        enum:
          type: array
          description: Can be used to guide the LLM with specific values to output.
          items:
            type: string
        pattern:
          type: string
          nullable: true
          description: Can be used to constrain the LLM to output a specific pattern.
    GuidedNumberNode:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - number
        description:
          type: string
          description: >-
            Guide the LLM in what to output for this node. Supplements the
            section-level instructions.
        default:
          type: number
          nullable: true
          description: If nothing is outputted, this default is used.
        enum:
          type: array
          description: Can be used to guide the LLM with specific values to output.
          items:
            type: number
        minimum:
          type: number
          description: Use if a minimum value applies.
          nullable: true
        maximum:
          type: number
          description: Use if a maximum value applies.
          nullable: true
    GuidedBoolNode:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - boolean
        description:
          type: string
          description: >-
            Guide the LLM in what to output for this node. Supplements the
            section-level instructions.
        default:
          type: boolean
          description: If nothing is outputted, this default is used.
          nullable: true
    GuidedArrayNode:
      type: object
      required:
        - type
        - items
      properties:
        type:
          type: string
          enum:
            - array
        description:
          type: string
          description: >-
            Guide the LLM in what to output for this node. Supplements the
            section-level instructions.
        items:
          description: >-
            Must be another output schema node (string, number, boolean, array,
            or object).
          allOf:
            - $ref: '#/components/schemas/GuidedOutputSchema'
        itemFormat:
          type: string
          default: |
            - {item}
          description: >
            Format string used to render each array item in the generated
            output. Use the `{item}` placeholder for the item value.
          example: |
            - {item}
        minItems:
          type: integer
          minimum: 0
          description: Minimum number of array items to generate.
          nullable: true
        maxItems:
          type: integer
          minimum: 0
          description: Maximum number of array items to generate.
          nullable: true
        fallbackString:
          type: string
          nullable: true
          description: >
            Text rendered in place of the array when no items have relevant
            input/output.
    GuidedObjectNode:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - object
        description:
          type: string
          description: >-
            Guide the LLM in what to output for this node. Supplements the
            section-level instructions.
        fieldFormat:
          type: string
          default: |
            {key}: {value}
          description: >
            Free-form format string that controls how an object's fields are
            rendered into the final text output. Operates in one of two modes
            determined by which placeholders appear:


            **Subheading mode** (default: `"{key}: {value}\n"`): triggered when
            the format contains both `{key}` and `{value}`. Applied per field —
            each field becomes a key/value line. When a field has no relevant
            input/output and no `default` is set, the entire key/value line for
            that field is omitted from the rendered output.


            **Object mode** (e.g. `"{name} ({age})"`): triggered when `{key}`
            and `{value}` are absent. Placeholders must be actual field keys
            defined in `fields`. Applied once for the whole object, composing
            all fields into a single string. When a field has no relevant
            input/output and no `default` is set, its placeholder is replaced
            with an empty string (`""`).


            Validation rules: format must not be empty; if either `{key}` or
            `{value}` appears, both must be present; in subheading mode no extra
            placeholders are allowed; in object mode every placeholder must
            match a defined field key.
          example: |
            {key}: {value}
        fields:
          type: array
          description: Define what fields are possible to return in the object.
          items:
            $ref: '#/components/schemas/GuidedFieldDefinition'
        fallbackString:
          type: string
          nullable: true
          description: >
            Text rendered in place of the object when no field has relevant
            input/output and no field-level `default` is set.
    GuidedFieldDefinition:
      type: object
      required:
        - key
        - description
        - value
      properties:
        key:
          type: string
          description: Use to set a key to reference.
        description:
          type: string
          description: >-
            Guide the LLM in what to output for this node. Supplements the
            section-level instructions.
        value:
          description: >-
            Must be another output schema node (string, number, boolean, array,
            or object).
          allOf:
            - $ref: '#/components/schemas/GuidedOutputSchema'
        default:
          type: string
          nullable: true
          description: >-
            If nothing is outputted for this field, this default value is used
            in the rendered output.
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AuthorizationHeader:
      type: http
      description: Input your token
      scheme: bearer

````