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

# Generate a note from text

> Creates a visit from typed text and generates its clinical note asynchronously, the same as the dashboard's Type note. Returns 202 with the session id; a NOTE_CREATED webhook fires when the note is ready (or poll GET /sessions/{sessionId}/notes). Requires notes:write.



## OpenAPI

````yaml /openapi/ext-api-v1.json post /notes/from-text
openapi: 3.0.0
info:
  title: Healos External API
  version: 1.0.0
  description: >-
    External API for managing patients, documents, and appointments, listing
    providers and note templates, pulling clinical notes (with transcript and
    patient context), and running insurance eligibility checks.
servers:
  - url: https://api.healos.ai/ext-api/v1
    description: Production
  - url: http://localhost:8787/ext-api/v1
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /notes/from-text:
    post:
      tags:
        - Notes
      summary: Generate a note from text
      description: >-
        Creates a visit from typed text and generates its clinical note
        asynchronously, the same as the dashboard's Type note. Returns 202 with
        the session id; a NOTE_CREATED webhook fires when the note is ready (or
        poll GET /sessions/{sessionId}/notes). Requires notes:write.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoteFromTextBody'
      responses:
        '202':
          description: Note generation queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      status:
                        type: string
                        enum:
                          - queued
                      patient_id:
                        type: string
                        nullable: true
                        description: >-
                          The patient the note is filed under; null for a temp
                          (unassigned) session.
                    required:
                      - session_id
                      - status
                      - patient_id
                  message:
                    type: string
                required:
                  - data
                  - message
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The organization has no Scribe sessions left
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope (needs notes:write)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Patient or template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The same submission is already being processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '503':
          description: Generation could not be queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NoteFromTextBody:
      type: object
      properties:
        text:
          type: string
          minLength: 1
          maxLength: 100000
          description: >-
            The visit text: typed notes, a dictation or a transcript. Up to
            100,000 characters.
          example: >-
            Patient reports knee pain for two weeks, worse on stairs. No
            swelling. Ibuprofen 400 mg BID. Plan: physiotherapy, follow up in 4
            weeks.
        patient_id:
          type: string
          pattern: ^\d+$
          description: >-
            A patient in your organization. Omit it to create a temp
            (unassigned) session and assign the patient later with PATCH
            /sessions/{sessionId}.
          example: '481926357104938271'
        template_id:
          type: string
          pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          description: >-
            Template to generate with. Defaults to the clinician's default
            template, then New Patient Visit.
        model:
          type: string
          enum:
            - detailed
            - balanced
            - fast
          description: >-
            Note quality, as on the dashboard: fast, balanced or detailed.
            Defaults to the standard quality.
          example: balanced
      required:
        - text
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    RateLimitError:
      type: object
      properties:
        error:
          type: string
          example: Rate limit exceeded. Please retry after the window resets.
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key obtained from /api/v1/ext-api-keys

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.