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

# Start a new chat and stream the reply



## OpenAPI

````yaml https://api.usenotra.com/openapi.json post /v1/chats
openapi: 3.1.1
info:
  title: Notra API
  version: 1.0.0
  description: >-
    OpenAPI schema for Notra content endpoints. Use GET /v1/status for public
    reachability. Error responses include recovery guidance.
servers:
  - url: https://api.usenotra.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Content
    description: >-
      Read content. Organization is inferred from the API key
      (identity.externalId).
  - name: Schedules
    description: >-
      Manage scheduled content generation. Organization is inferred from the API
      key (identity.externalId).
  - name: Event Triggers
    description: >-
      Manage event-based content generation triggered by GitHub webhooks.
      Organization is inferred from the API key (identity.externalId).
  - name: Chats
    description: >-
      Manage chat sessions. Organization is inferred from the API key
      (identity.externalId).
  - name: Skills
    description: >-
      Manage reusable writing skills. Organization is inferred from the API key
      (identity.externalId).
paths:
  /v1/chats:
    post:
      tags:
        - Chats
      summary: Start a new chat and stream the reply
      operationId: createChat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendChatMessageRequest'
      responses:
        '200':
          description: >-
            Streaming UI message stream (newline-delimited JSON chunks). Read
            the `X-Chat-Id` response header for the chat id, or take it from the
            `start` chunk's `messageMetadata.chatId`.
          content:
            text/event-stream:
              schema:
                type: string
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden, or usage limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Chat not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to process chat request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Authentication service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SendChatMessageRequest:
      type: object
      properties:
        message:
          type: string
          minLength: 1
          maxLength: 50000
        model:
          type: string
          enum:
            - auto
            - anthropic/claude-opus-4.8
            - anthropic/claude-sonnet-4.6
            - anthropic/claude-haiku-4.5
            - openai/gpt-5.4
            - openai/gpt-5.5
        enableThinking:
          type: boolean
        thinkingLevel:
          type: string
          enum:
            - 'off'
            - low
            - medium
            - high
        timezone:
          type: string
          minLength: 1
          maxLength: 100
        context:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - github-repo
                  integrationId:
                    type: string
                  owner:
                    type: string
                  repo:
                    type: string
                required:
                  - type
                  - integrationId
                  - owner
                  - repo
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - linear-team
                  integrationId:
                    type: string
                  teamName:
                    type: string
                required:
                  - type
                  - integrationId
        externalChannelId:
          $ref: '#/components/schemas/ExternalChannelId'
      required:
        - message
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        recovery:
          type: string
      required:
        - error
    ExternalChannelId:
      type:
        - object
        - 'null'
      properties:
        source:
          type: string
          enum:
            - discord
            - slack
            - dashboard
        id:
          type: string
          maxLength: 200
      required:
        - source
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Send your API key in the Authorization header as Bearer API_KEY.

````