> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.speech.palatine.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# Diarize

> Разделяет аудио на сегменты по спикерам с временными метками.

Возвращает идентификатор асинхронной задачи. Статус и результат
можно получить через эндпоинт ``task_status``



## OpenAPI

````yaml post /api/v1/diarization/do_diarize
openapi: 3.1.0
info:
  title: Palatine Cloud API
  description: >-
    Облачный API для транскрипции аудио, диаризации, анализа тональности и AI
    суммаризации
  version: 2.0.0
servers:
  - url: https://api.palatine.ru
    description: Продакшн сервер
security: []
paths:
  /api/v1/diarization/do_diarize:
    post:
      tags:
        - Diarization polling API
      summary: Diarize
      description: |-
        Разделяет аудио на сегменты по спикерам с временными метками.

        Возвращает идентификатор асинхронной задачи. Статус и результат
        можно получить через эндпоинт ``task_status``
      operationId: diarize_api_v1_diarization_do_diarize_post
      parameters:
        - name: model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Модель диаризации. По умолчанию `palatine_diarize` (до 4
              говорящих). Для созвонов с большим числом участников —
              `palatine_diarize_multi` (поддерживает подсказку числа говорящих
              `num_speakers`).
            title: Model
          description: >-
            Модель диаризации. По умолчанию `palatine_diarize` (до 4 говорящих).
            Для созвонов с большим числом участников — `palatine_diarize_multi`
            (поддерживает подсказку числа говорящих `num_speakers`).
        - name: num_speakers
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Точное число говорящих (подсказка, опционально).
            title: Num Speakers
          description: Точное число говорящих (подсказка, опционально).
        - name: min_speakers
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Минимальное число говорящих (опционально).
            title: Min Speakers
          description: Минимальное число говорящих (опционально).
        - name: max_speakers
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Максимальное число говорящих (опционально).
            title: Max Speakers
          description: Максимальное число говорящих (опционально).
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_diarize_api_v1_diarization_do_diarize_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiarizeTaskSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_diarize_api_v1_diarization_do_diarize_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_diarize_api_v1_diarization_do_diarize_post
    DiarizeTaskSchedule:
      properties:
        status:
          type: string
          title: Status
          description: >-
            Статус запуска задачи транскрипции, может быть: 'scheduled',
            'unauthorized token
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: ID задачи транскрипции
      type: object
      required:
        - status
      title: DiarizeTaskSchedule
      description: >-
        Модель данных, представляющая результат, возвращаемый при запуске задачи
        диаризации
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````