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

# Summarize File

> Создаёт задачу на суммаризацию загруженного медиа с выбранным промптом.

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



## OpenAPI

````yaml post /api/v1/ai_service/summarize_file
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/summarize_file:
    post:
      tags:
        - AI Service
      summary: Summarize File
      description: >-
        Создаёт задачу на суммаризацию загруженного медиа с выбранным промптом.


        Возвращает идентификатор асинхронной задачи; статус и результат доступны
        через эндпоинт ``task_status``.
      operationId: summarize_file_api_v1_ai_service_summarize_file_post
      parameters:
        - name: task
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/AITaskTypes'
            default: user_prompt
        - name: prompt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Prompt
        - name: thinking
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            default: false
            title: Thinking
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_summarize_file_api_v1_ai_service_summarize_file_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AITaskSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AITaskTypes:
      type: string
      enum:
        - meeting_summary
        - user_prompt
      title: AITaskTypes
      description: Задачи AI эндпоинтов.
    Body_summarize_file_api_v1_ai_service_summarize_file_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: Body_summarize_file_api_v1_ai_service_summarize_file_post
    AITaskSchedule:
      properties:
        status:
          type: string
          title: Status
          description: 'Статус запуска задачи, может быть: ''scheduled'', ''unauthorized token'
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: Task ID задачи
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Сообщение об ошибке
      type: object
      required:
        - status
      title: AITaskSchedule
    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

````