# This file was auto-generated by Fern from our API Definition.

import typing
import uuid

import pydantic

from ...core.pydantic_utilities import UniversalBaseModel
from .batch_audio_source import BatchAudioSource
from .processing_mode import ProcessingMode
from .transcription_request_info import TranscriptionRequestInfo


class BatchTranscriptionRequest(UniversalBaseModel):
    """
    Request body for creating a batch transcription. Use either `batch_file_id` (standard mode) or `audio_sources` (express mode), not both.
    """

    processing_mode: typing.Optional[ProcessingMode] = pydantic.Field(default=None)
    """
    Choose how the batch is processed:
    - `standard` (default): Lower cost, processed within 24 hours. Max 500 files. Use with `batch_file_id`.
    - `express`: Higher cost, starts immediately. Max 10 files. Use with `audio_sources`.
    """

    batch_file_id: typing.Optional[uuid.UUID] = pydantic.Field(default=None)
    """
    **For standard mode only.** ID of a previously uploaded batch manifest.
    
    Get this by calling [Upload Batch File](/api-reference/transcribe/upload-batch-file) first.
    """

    audio_sources: typing.Optional[typing.List[BatchAudioSource]] = pydantic.Field(default=None)
    """
    **For express mode only.** List of audio URLs to transcribe (max 10).
    
    Each item needs an `audio_url` and can optionally include a `title`.
    """

    info: TranscriptionRequestInfo = pydantic.Field()
    """
    Transcription settings applied to all files in the batch (model, language, etc.)
    """

    batch_title: typing.Optional[str] = pydantic.Field(default=None)
    """
    Default title prefix for transcriptions. Individual items can override this. Items without titles become "{batch_title} - Item 1", "{batch_title} - Item 2", etc.
    """

    batch_id: typing.Optional[uuid.UUID] = pydantic.Field(default=None)
    """
    Custom UUID for this batch. Auto-generated if not provided.
    """

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
