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

# Task Status

> Возвращает состояние запущенной задачи и результат при его
готовности.



## OpenAPI

````yaml get /api/v1/ai_service/task_status/{task_id}
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/ai_service/task_status/{task_id}:
    get:
      tags:
        - AI Service
      summary: Task Status
      description: |-
        Возвращает состояние запущенной задачи и результат при его
        готовности.
      operationId: task_status_api_v1_ai_service_task_status__task_id__get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupabaseTaskSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SupabaseTaskSchema:
      properties:
        id:
          anyOf:
            - type: string
            - type: string
              format: uuid4
          title: Id
          description: Уникальный идентификатор задачи.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Дата и время создания записи.
        data:
          anyOf:
            - $ref: '#/components/schemas/DiarizedTranscription'
            - $ref: '#/components/schemas/TranscriptionSegments'
            - $ref: '#/components/schemas/SRTModel'
            - $ref: '#/components/schemas/VTTModel'
            - $ref: '#/components/schemas/DiarizationSegments'
            - $ref: '#/components/schemas/SentimentAnalysisResult'
            - $ref: '#/components/schemas/MinutesResponse'
            - $ref: '#/components/schemas/UserTaskResponse'
            - type: 'null'
          title: Data
          description: >-
            Данные задачи: результат транскрипции (JSON/SRT/VTT),
            combined-результат (транскрипция со спикер-атрибуцией), сегменты
            диаризации, агрегированные вероятности анализа тональности или
            результат суммаризации митингов
        status:
          type: string
          title: Status
          description: Текущий статус задачи (success/pending/error).
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Сообщение об ошибке, если она произошла.
      type: object
      required:
        - id
        - created_at
        - status
      title: SupabaseTaskSchema
      description: >-
        Унифицированная модель задачи для хранения и отдачи статусов.


        Поле `data` содержит результат задачи:

        - для транскрипции: объект с сегментами/текстом или текст SRT/VTT

        - для диаризации: объект с сегментами говорящих

        - для анализа тональности: упорядоченный список классов с вероятностями

        - для суммаризации митингов: объект, содержащий сжатую информацию о
        митинге
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DiarizedTranscription:
      properties:
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Полный текст транскрипции.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: Язык входного аудио.
        duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration
          description: Длительность входного аудио в секундах.
        segments:
          items:
            $ref: '#/components/schemas/DiarizedSegment'
          type: array
          title: Segments
          description: Сегменты, перегруппированные по смене говорящего.
        words:
          items:
            $ref: '#/components/schemas/DiarizedWord'
          type: array
          title: Words
          description: Слова со спикер-атрибуцией.
        models:
          $ref: '#/components/schemas/DiarizedModels'
          description: Задействованные модели.
        included_processing:
          items:
            type: string
          type: array
          title: Included Processing
          description: Применённые этапы пост-обработки.
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          description: Предупреждения обработки (напр. слова вне diar-покрытия).
      type: object
      required:
        - models
      title: DiarizedTranscription
      description: >-
        Combined-результат: транскрипция + спикер-атрибуция (v1,
        overlap-by-midpoint).
    TranscriptionSegments:
      properties:
        duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration
          description: Длительность входного аудио в секундах.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: Язык входного аудио.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Полный текст транскрибации
        segments:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptionSegment'
              type: array
            - type: 'null'
          title: Segments
          description: Список сегментов транскрибации
        words:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptionWord'
              type: array
            - type: 'null'
          title: Words
          description: Список слов в транскрибации
        avg_logprob:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Logprob
          description: >-
            Средний log-prob (уверенность) — заполняется GigaAM-путём для
            решения о fallback на whisper. Whisper-путь оставляет None. Не
            отдаётся клиенту (внутреннее поле оркестрации).
      type: object
      title: TranscriptionSegments
      description: >-
        Модель данных, представляющая список сегментов транскрибации и полный
        текст.
    SRTModel:
      properties:
        text:
          type: string
          title: Text
          description: srt текст транскрибации
      type: object
      required:
        - text
      title: SRTModel
    VTTModel:
      properties:
        text:
          type: string
          title: Text
          description: vtt текст транскрибации
      type: object
      required:
        - text
      title: VTTModel
    DiarizationSegments:
      properties:
        segments:
          items:
            $ref: '#/components/schemas/DiarizationSegment'
          type: array
          title: Segments
          description: Список сегментов диаризации
      type: object
      required:
        - segments
      title: DiarizationSegments
      description: Модель данных, представляющая список сегментов диаризации
    SentimentAnalysisResult:
      properties:
        sentiment:
          items:
            $ref: '#/components/schemas/SentimentScore'
          type: array
          title: Sentiment
          description: >-
            Список классов тональности, отсортированный по убыванию вероятности
            класса.
      type: object
      title: SentimentAnalysisResult
      description: Результат анализа тональности после агрегации вероятностей.
    MinutesResponse:
      properties:
        meeting_goals:
          items:
            $ref: '#/components/schemas/ProtocolItem'
          type: array
          maxItems: 5
          minItems: 2
          title: Meeting Goals
          description: Список целей и задач встречи
        established_facts:
          items:
            $ref: '#/components/schemas/ProtocolItem'
          type: array
          maxItems: 10
          title: Established Facts
          description: >-
            Список наиболее значимых фактов, зафиксированных и подтверждённых во
            время встречи
        existing_problems:
          items:
            $ref: '#/components/schemas/ProtocolItem'
          type: array
          maxItems: 10
          title: Existing Problems
          description: Список основных проблем и вопросов, выявленных на встрече
        decisions_made:
          items:
            $ref: '#/components/schemas/ProtocolItem'
          type: array
          maxItems: 10
          title: Decisions Made
          description: Список ключевых решений, соглашений и резолюций, принятых на встрече
        tasks_to_execute:
          items:
            $ref: '#/components/schemas/ProtocolItem'
          type: array
          maxItems: 10
          title: Tasks To Execute
          description: >-
            Список действий и задач с указанием ответственных и сроков,
            подлежащих исполнению
        qa_items:
          items:
            $ref: '#/components/schemas/QAItem'
          type: array
          maxItems: 20
          minItems: 3
          title: Qa Items
          description: >-
            Краткий перечень вопросов и соответствующих ответов из стенограммы
            встречи, отражающий только релевантные темы
        open_questions:
          items:
            $ref: '#/components/schemas/ProtocolItem'
          type: array
          title: Open Questions
          description: Список открытых вопросов без надёжных ответов и нерешённых проблем
        meeting_title:
          type: string
          title: Meeting Title
          description: >-
            Короткое описательное название встречи на русском языке (до 40
            символов)
      type: object
      required:
        - meeting_goals
        - established_facts
        - existing_problems
        - decisions_made
        - tasks_to_execute
        - qa_items
        - open_questions
        - meeting_title
      title: MinutesResponse
      description: Структурированное представление ключевых итогов и протокола встречи.
    UserTaskResponse:
      properties:
        content:
          type: string
          title: Content
          description: Содержание задачи для пользователя
      type: object
      required:
        - content
      title: UserTaskResponse
      description: Карточка задачи, сформированная по пользовательскому промпту.
    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
    DiarizedSegment:
      properties:
        id:
          type: integer
          title: Id
          description: Уникальный идентификатор сегмента.
        speaker:
          type: string
          title: Speaker
          description: Идентификатор говорящего в сегменте.
        start:
          type: number
          title: Start
          description: Время начала сегмента в секундах.
        end:
          type: number
          title: End
          description: Время окончания сегмента в секундах.
        text:
          type: string
          title: Text
          description: Текст сегмента (конкатенация слов говорящего).
      type: object
      required:
        - id
        - speaker
        - start
        - end
        - text
      title: DiarizedSegment
      description: Сегмент транскрипции, перегруппированный по смене говорящего.
    DiarizedWord:
      properties:
        word:
          type: string
          title: Word
          description: Текст слова.
        start:
          type: number
          title: Start
          description: Время начала слова в секундах.
        end:
          type: number
          title: End
          description: Время окончания слова в секундах.
        speaker:
          type: string
          title: Speaker
          description: Идентификатор говорящего (например, 'SPEAKER_01').
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
          description: Уверенность ASR в слове [0, 1] (если доступна).
        speaker_confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Speaker Confidence
          description: >-
            Уверенность атрибуции говорящего = доля слова, покрытая
            diar-сегментом выбранного спикера [0, 1]. 0.0 = слово вне
            диаризации.
      type: object
      required:
        - word
        - start
        - end
        - speaker
      title: DiarizedWord
      description: Слово транскрипции с атрибуцией говорящего.
    DiarizedModels:
      properties:
        transcription:
          type: string
          title: Transcription
          description: Модель транскрипции (branded-имя).
        diarization_requested:
          anyOf:
            - type: string
            - type: 'null'
          title: Diarization Requested
          description: Запрошенная клиентом модель диаризации (`auto`/branded).
        diarization_resolved:
          type: string
          title: Diarization Resolved
          description: Фактически применённая модель диаризации (branded-имя).
      type: object
      required:
        - transcription
        - diarization_resolved
      title: DiarizedModels
      description: Модели, задействованные в combined-обработке (для прозрачности клиенту).
    TranscriptionSegment:
      properties:
        id:
          type: integer
          title: Id
          description: Уникальный идентификатор сегмента транскрибации.
        seek:
          type: integer
          title: Seek
          description: Значение 'seek', представляющее позицию сегмента в аудио.
        start:
          type: number
          title: Start
          description: Время начала сегмента в секундах.
        end:
          type: number
          title: End
          description: Время окончания сегмента в секундах.
        text:
          type: string
          title: Text
          description: Текст транскрибированного сегмента.
        tokens:
          items:
            type: integer
          type: array
          title: Tokens
          description: Список токенов, представляющих текст сегмента.
        avg_logprob:
          type: number
          title: Avg Logprob
          description: Средняя логарифмическая вероятность для сегмента.
        compression_ratio:
          type: number
          title: Compression Ratio
          description: Коэффициент сжатия для сегмента.
        no_speech_prob:
          type: number
          title: No Speech Prob
          description: Вероятность того, что сегмент не содержит речи.
        words:
          anyOf:
            - {}
            - type: 'null'
          title: Words
          description: Детализация по словам (может быть None).
        temperature:
          type: number
          title: Temperature
          description: Температура, использованная при транскрибации для сегмента.
      type: object
      required:
        - id
        - seek
        - start
        - end
        - text
        - tokens
        - avg_logprob
        - compression_ratio
        - no_speech_prob
        - temperature
      title: TranscriptionSegment
      description: Модель данных, представляющая один сегмент транскрибации.
    TranscriptionWord:
      properties:
        end:
          type: number
          title: End
          description: Время окончания слова в секундах.
        start:
          type: number
          title: Start
          description: Время начала слова в секундах.
        word:
          type: string
          title: Word
          description: Текстовое содержание слова.
        probability:
          anyOf:
            - type: number
            - type: 'null'
          title: Probability
          description: >-
            Уверенность ASR в слове [0, 1] (если доступна). backward-compat:
            опционально.
      type: object
      required:
        - end
        - start
        - word
      title: TranscriptionWord
      description: Модель данных, представляющая одно слово в транскрибации.
    DiarizationSegment:
      properties:
        segment_id:
          type: integer
          title: Segment Id
          description: Уникальный идентификатор сегмента диаризации.
        speaker:
          type: string
          title: Speaker
          description: Идентификатор говорящего в сегменте (например, 'SPEAKER_01').
        start:
          type: number
          title: Start
          description: Время начала сегмента в секундах.
        end:
          type: number
          title: End
          description: Время окончания сегмента в секундах.
      type: object
      required:
        - segment_id
        - speaker
        - start
        - end
      title: DiarizationSegment
      description: Модель данных, представляющая один сегмент диаризации.
    SentimentScore:
      properties:
        label:
          type: string
          title: Label
          description: Название класса тональности (Neutral, Positive и т.д.).
        score:
          type: number
          maximum: 1
          minimum: 0
          title: Score
          description: Вероятность класса в диапазоне [0, 1].
      type: object
      required:
        - label
        - score
      title: SentimentScore
      description: Вероятность отдельного класса тональности.
    ProtocolItem:
      properties:
        content:
          type: string
          title: Content
          description: Содержание пункта протокола
      type: object
      required:
        - content
      title: ProtocolItem
      description: Единичный пункт протокола встречи с кратким содержанием.
    QAItem:
      properties:
        question:
          type: string
          title: Question
          description: Вопрос, заданный во время встречи
        answer:
          type: string
          title: Answer
          description: Ответ, данный на вопрос
      type: object
      required:
        - question
        - answer
      title: QAItem
      description: Пара «вопрос-ответ», извлечённая из стенограммы встречи.

````