openapi: 3.0.3
info:
  title: Auphonic API
  description: |
    The Auphonic REST API allows you to integrate audio post production services
    and algorithms into your scripts, external workflows and third-party applications.

    For the full API documentation, see the [Auphonic API docs](https://auphonic.com/help/api/).

    The API comes in two flavours:
    - A **Simple API** for quick shell scripts and batch processing of multiple files.
    - A complete **JSON API** for full control.

    Resources (presets, productions, services, etc.) are referenced using a UUID,
    a unique string of 22 characters from `[a-zA-Z0-9]`.

    All API responses use a standard envelope format:
    ```json
    {
      "status_code": 200,
      "error_code": null,
      "error_message": "",
      "form_errors": {},
      "data": { ... }
    }
    ```

    ## Authentication

    All API endpoints require authentication (except Info endpoints, which also work without).
    Three authentication methods are supported:

    - **API Key (Bearer Token):** Generate a key in your
      [account settings](https://auphonic.com/accounts/api-key/) and pass it via
      `Authorization: Bearer {api_key}` header or `?bearer_token={api_key}` query parameter.
    - **HTTP Basic Auth:** Use your Auphonic username and password.
      Only recommended for personal scripts, not for third-party apps.
    - **OAuth 2.0:** For third-party applications. Supports the Authorization Code flow
      (web apps) and the Resource Owner Password flow (desktop/mobile apps).

    See the [Authentication documentation](https://auphonic.com/help/api/authentication.html) for details.
  version: "1.0.0"
  contact:
    email: support@auphonic.com
    url: https://auphonic.com

servers:
  - url: https://auphonic.com
    description: Auphonic Production Server

security:
  - bearerAuth: []
  - basicAuth: []
  - oauth2: []

tags:
  - name: Simple API
    description: |
      Simplified **singletrack** production creation in a single multipart/form-data request.
      Only singletrack productions can be created with the Simple API.

      See the [Simple API documentation](https://auphonic.com/help/api/simple_api.html) for details.
  - name: Singletrack vs. Multitrack
    x-traitTag: true
    description: |
      Auphonic supports two production modes with **different parameters**:

      - **[Singletrack](https://auphonic.com/help/api/details.html)** (`is_multitrack: false` or omitted): Process a single audio file.
        Algorithms include filtering, noise reduction, adaptive leveler, loudness normalization, and more.
      - **[Multitrack](https://auphonic.com/help/api/multitrack.html)** (`is_multitrack: true`): Mix and process multiple audio tracks (e.g. separate
        speaker microphones, music tracks). Master-level algorithms control leveling, loudness, and
        noise gate/crosstalk reduction. Per-track algorithms (filtering, noise reduction, fore/background,
        gain, panning) are set individually via `multi_input_files[].algorithms`.

      **Use the dropdown selector in the request/response schemas below to switch between
      Singletrack and Multitrack and see the relevant parameters for each mode.**
  - name: Productions
    description: |
      Create, manage and process audio productions.

      Productions can be **Singletrack** or **Multitrack** — each mode has different algorithm
      parameters. When viewing the request/response schemas, **use the dropdown selector to switch
      between Singletrack and Multitrack** to see only the relevant fields.

      See the [Productions API documentation](https://auphonic.com/help/api/details.html) for details.
  - name: Presets
    description: |
      Create and manage production presets (templates).

      Presets can be **Singletrack** or **Multitrack** — each mode has different algorithm
      parameters. **Use the dropdown selector in the schemas to switch between modes.**

      See the [Presets API documentation](https://auphonic.com/help/api/details.html) for details.
  - name: Services
    description: |
      Manage external service integrations.

      See the [External Services documentation](https://auphonic.com/help/api/query.html#external-services) for details.
  - name: Info
    description: |
      Query available formats, algorithms and service types.

      See the [Info API documentation](https://auphonic.com/help/api/query.html) for details.
  - name: User
    description: |
      User account information.

      See the [User API documentation](https://auphonic.com/help/api/query.html#user-account-info) for details.

paths:
  # ==========================================================================
  # SIMPLE API
  # ==========================================================================

  /api/simple/productions.json:
    post:
      tags: [Simple API]
      summary: Create singletrack production in a single request
      description: |
        Creates a **singletrack** production, uploads a file, sets metadata and optionally starts
        processing — all in a single `multipart/form-data` request.
        Reference an existing [preset](https://auphonic.com/help/api/complex.html) via UUID.

        Only singletrack productions can be created with the Simple API. For multitrack
        productions, use the JSON API endpoints.

        See the [Simple API documentation](https://auphonic.com/help/api/simple_api.html) for details.
      operationId: createSimpleProduction
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                preset:
                  type: string
                  description: "UUID of the preset to use as template. See the [Simple API documentation](https://auphonic.com/help/api/simple_api.html#start-a-production-and-upload-a-file) for details."
                service:
                  type: string
                  description: "UUID of [external service](https://auphonic.com/help/api/simple_api.html#upload-files-with-external-services-sftp-ftp-dropbox-etc) for input file"
                input_file:
                  type: string
                  format: binary
                  description: "Audio/video file upload, HTTP URL, or filename on external service. See the [Simple API documentation](https://auphonic.com/help/api/simple_api.html#start-a-production-and-upload-a-file) for details."
                title:
                  type: string
                  description: "Production title. See the [metadata documentation](https://auphonic.com/help/api/simple_api.html#detailed-audio-metadata) for details."
                artist:
                  type: string
                  description: Artist name
                album:
                  type: string
                  description: Album name
                track:
                  type: integer
                  description: Track number
                subtitle:
                  type: string
                  description: Subtitle
                summary:
                  type: string
                  description: Summary or description
                genre:
                  type: string
                  description: Genre
                year:
                  type: integer
                  description: Year
                publisher:
                  type: string
                  description: Publisher name
                url:
                  type: string
                  format: uri
                  description: Associated URL
                license:
                  type: string
                  description: License name
                license_url:
                  type: string
                  format: uri
                  description: License URL
                tags:
                  type: string
                  description: Comma-separated list of tags
                append_chapters:
                  type: boolean
                  description: Append chapter marks as text to the summary/description field
                image:
                  type: string
                  format: binary
                  description: Cover image file upload or URL
                chapters:
                  type: string
                  format: binary
                  description: |
                    [Chapter marks](https://auphonic.com/help/api/simple_api.html#adding-chapter-marks).
                    Can be sent as a text file upload, a plain string value, or a URL pointing to a chapters file.
                    Format is one chapter per line: `HH:MM:SS.mmm Title <optional_url>`

                    Example:
                    ```
                    00:00:00.000 Intro
                    00:02:30.000 First Topic https://example.com
                    00:10:15.500 Second Topic
                    ```
                output_basename:
                  type: string
                  description: Basename for output filenames. Combined with suffix and ending to form the full filename.
                webhook:
                  type: string
                  format: uri
                  description: "Webhook callback URL. After processing, Auphonic sends an HTTP POST with `uuid`, `status` (3=Done, 2=Error), and `status_string`. See [webhook documentation](https://auphonic.com/help/api/webhook.html)."
                # Audio algorithm parameters
                filtering:
                  type: boolean
                  description: Enable adaptive filtering
                  default: true
                leveler:
                  type: boolean
                  description: Enable adaptive leveler
                  default: true
                normloudness:
                  type: boolean
                  description: "Enable loudness normalization. Adjusts the global, overall loudness to the specified loudness target."
                  default: true
                loudnesstarget:
                  type: integer
                  description: "Loudness target in LUFS (default: -16)"
                  default: -16
                  enum: [-13, -14, -15, -16, -18, -19, -20, -23, -24, -26, -27, -31]
                maxpeak:
                  type: number
                  description: "Maximum true peak level in dBTP. 0=auto (uses optimal value for target loudness), or set a specific limit."
                  default: 0
                  enum: [0, -0.5, -1, -1.5, -2, -3, -4, -5, -6]
                denoise:
                  type: boolean
                  description: "Enable noise and hum reduction. Classifies regions with different background noises and automatically removes noise and hum."
                  default: false
                denoiseamount:
                  type: integer
                  description: "Noise reduction amount in dB (0=auto, -1=off/dehum only)"
                  default: 0
                  enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
                silence_cutter:
                  type: boolean
                  description: Cut silence segments
                  default: false
                filler_cutter:
                  type: boolean
                  description: Cut filler words
                  default: false
                cough_cutter:
                  type: boolean
                  description: Cut cough segments
                  default: false
                music_cutter:
                  type: boolean
                  description: Cut music segments
                  default: false
                cut_mode:
                  type: string
                  description: "What to do with detected cut segments. apply_cuts: remove cut segments from output. export_uncut_audio: keep audio unchanged, only export cut list. set_cuts_to_silence: replace cut segments with silence. See the [automatic cutting documentation](https://auphonic.com/help/web/production.html#automatic-cutting) for details."
                  enum: [apply_cuts, export_uncut_audio, set_cuts_to_silence]
                  default: apply_cuts
                action:
                  type: string
                  enum: [start, save]
                  description: "Set to \"start\" to begin processing immediately, or \"save\" (or omit) to just save. See the [Simple API documentation](https://auphonic.com/help/api/simple_api.html#start-a-production-and-upload-a-file) for details."
      responses:
        '200':
          description: Singletrack production created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/SingletrackProduction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  # ==========================================================================
  # PRODUCTIONS
  # ==========================================================================

  /api/productions.json:
    get:
      tags: [Productions]
      summary: List all productions
      description: |
        Returns details about all productions of the authenticated user.
        Use `limit` and `offset` for pagination. Use `uuids_only=1` or
        `minimal_data=1` to reduce response size.

        **Note:** If not using `uuids_only` or `minimal_data`, the limit
        is restricted to 10.

        With `minimal_data=1`, each production only contains: `uuid`, `is_multitrack`,
        `creation_time`, `metadata` (title only), `status`, and `output_files`
        (format, bitrate, download_url, filename).
        See the [minimal_data documentation](https://auphonic.com/help/api/query.html#query-minimal-data) for details.

        To paginate through all results, increment `offset` by `limit` until fewer
        than `limit` results are returned. There is no total count in the response.

        See the [list productions documentation](https://auphonic.com/help/api/query.html#list-all-productions-and-presets) for details.

        **Rate limit:** 60 requests per 4 minutes. Returns 429 if exceeded. For frequent status checks, use webhooks or the `/api/production/{uuid}/status.json` endpoint instead.
      operationId: listProductions
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/uuids_only'
        - $ref: '#/components/parameters/minimal_data'
      responses:
        '200':
          description: List of productions
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Production'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'

    post:
      tags: [Productions]
      summary: Create a new production
      description: |
        Creates a new audio production. All details (metadata, output files,
        algorithms, outgoing services, chapters, etc.) can be set in the
        JSON request body. To start processing immediately, include
        `"action": "start"`.

        **⬇ Select Singletrack or Multitrack in the request body schema below to see the
        relevant parameters for each mode.** Set `is_multitrack: true` for multitrack productions.

        **Rate limit:** 40 requests per 2 minutes (100 for business accounts). Returns 429 if exceeded.

        See the [create production documentation](https://auphonic.com/help/api/details.html#create-a-production-with-detailed-audio-metadata) for details.
      operationId: createProduction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductionCreateRequest'
            examples:
              "Singletrack (is_multitrack: false)":
                summary: Singletrack production (default)
                value:
                  is_multitrack: false
                  metadata:
                    title: My Production
                  algorithms:
                    leveler: true
                    denoise: false
                    loudnesstarget: -16
                  output_files:
                    - format: mp3
                      bitrate: 128
              "Multitrack (is_multitrack: true)":
                summary: Multitrack production
                value:
                  is_multitrack: true
                  multi_input_files:
                    - type: multitrack
                      id: speaker1
                      input_file: "https://example.com/speaker1.wav"
                    - type: multitrack
                      id: speaker2
                      input_file: "https://example.com/speaker2.wav"
                  algorithms:
                    leveler: true
                    loudnesstarget: -16
                  output_files:
                    - format: mp3
                      bitrate: 128
      responses:
        '200':
          description: Production created successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'

  /api/production/{uuid}.json:
    get:
      tags: [Productions]
      summary: Get production details
      description: |
        Returns full details about a specific production.

        **Rate limit:** 60 requests per 4 minutes. Returns 429 if exceeded. For frequent status checks, use webhooks or the `/api/production/{uuid}/status.json` endpoint instead.

        See the [production details documentation](https://auphonic.com/help/api/query.html#details-about-a-production) for details.
      operationId: getProduction
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Production details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
              example:
                status_code: 200
                error_code: null
                error_message: ""
                form_errors: {}
                data:
                  uuid: "X2bUTQ8z888YaKukkU6vfJ"
                  is_multitrack: false
                  status: 3
                  status_string: "Done"
                  creation_time: "2025-01-15T10:30:00Z"
                  change_time: "2025-01-15T10:35:00Z"
                  start_allowed: true
                  change_allowed: true
                  status_page: "https://auphonic.com/engine/status/X2bUTQ8z888YaKukkU6vfJ"
                  edit_page: "https://auphonic.com/engine/upload/X2bUTQ8z888YaKukkU6vfJ"
                  metadata:
                    title: "My Podcast Episode"
                    artist: "Podcaster"
                    album: "My Podcast"
                    tags: ["podcast", "audio"]
                  algorithms:
                    leveler: true
                    normloudness: true
                    loudnesstarget: -16
                    denoise: false
                    filtering: true
                  output_files:
                    - format: "mp3"
                      bitrate: 128
                      ending: "mp3"
                      filename: "my-podcast-episode.mp3"
                      size: 15728640
                      size_string: "15.0 MB"
                      download_url: "https://auphonic.com/api/download/audio-result/X2bUTQ8z888YaKukkU6vfJ/my-podcast-episode.mp3"
                  statistics:
                    input:
                      loudness: [-20.5, "LUFS"]
                      lra: [2.14, "LU"]
                      peak: [-1.2, "dBTP"]
                    output:
                      loudness: [-16.0, "LUFS"]
                      lra: [1.43, "LU"]
                      peak: [-1.5, "dBTP"]
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'

    post:
      tags: [Productions]
      summary: Update a production
      description: |
        Updates an existing production. All sub-dictionaries (metadata, output_files,
        algorithms, etc.) can be changed. Use `reset_data: true` to clear all existing
        data before applying changes. Use `reset_cover_image: true` to remove the cover image.

        **⬇ Select Singletrack or Multitrack in the request body schema below to see the
        relevant parameters for each mode.**

        See the [create production documentation](https://auphonic.com/help/api/details.html#create-a-production-with-detailed-audio-metadata) for details.
      operationId: updateProduction
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductionCreateRequest'
            examples:
              "Singletrack (is_multitrack: false)":
                summary: Singletrack production (default)
                value:
                  metadata:
                    title: Updated Title
                  algorithms:
                    loudnesstarget: -16
              "Multitrack (is_multitrack: true)":
                summary: Multitrack production
                value:
                  is_multitrack: true
                  multi_input_files:
                    - type: multitrack
                      id: speaker1
                      input_file: "https://example.com/speaker1.wav"
                  algorithms:
                    leveler: true
      responses:
        '200':
          description: Production updated successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete a production
      description: |
        See the [update and delete documentation](https://auphonic.com/help/api/update.html#further-examples) for details.
      operationId: deleteProduction
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Production deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/upload.json:
    post:
      tags: [Productions]
      summary: Upload audio file and/or cover image
      description: |
        Upload local audio/video files and/or cover image to a production.
        Must use `multipart/form-data` encoding.

        **Singletrack:** Use `input_file` for the main audio file.

        **Multitrack:** Use the track ID (from `multi_input_files[].id`) as the form field name for each track.
        Example: `-F "speech track=@file1.wav" -F "music track=@file2.wav"`

        **Intro/Outro:** Use `intro_file`/`outro_file` for single intro/outro,
        or the track ID for multiple intros/outros.

        See the [file upload documentation](https://auphonic.com/help/api/complex.html#start-a-production-and-upload-a-local-file) for details.
      operationId: uploadProductionFile
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                input_file:
                  type: string
                  format: binary
                  description: Main audio/video file (singletrack productions)
                image:
                  type: string
                  format: binary
                  description: Cover image file
                intro_file:
                  type: string
                  format: binary
                  description: Intro audio file (single intro shortcut)
                outro_file:
                  type: string
                  format: binary
                  description: Outro audio file (single outro shortcut)
              additionalProperties:
                type: string
                format: binary
                description: |
                  Additional track files for multitrack productions or multiple intros/outros.
                  Use the track ID (from multi_input_files[].id) as the field name.
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/start.json:
    post:
      tags: [Productions]
      summary: Start production processing
      description: |
        Starts the audio post production for the given production UUID.

        See the [start production documentation](https://auphonic.com/help/api/complex.html#start-a-production-and-upload-a-local-file) for details.
      operationId: startProduction
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Production started
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/stop.json:
    post:
      tags: [Productions]
      summary: Stop production processing
      description: |
        Stops a currently processing production.

        See the [update and delete documentation](https://auphonic.com/help/api/update.html#further-examples) for details.
      operationId: stopProduction
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Production stopped
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/publish.json:
    post:
      tags: [Productions]
      summary: Publish production to outgoing services
      description: |
        Publishes the finished production to all configured outgoing file transfers.
        Only takes effect if the production has outgoing services and `in_review` is true.

        See the [outgoing file transfers documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details.
      operationId: publishProduction
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Production published
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/status.json:
    get:
      tags: [Productions]
      summary: Get production status
      description: |
        Returns the current status code and status string of a production.
        For frequent status checks, prefer using webhooks instead.

        See the [production details documentation](https://auphonic.com/help/api/query.html) for details.
      operationId: getProductionStatus
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Production status
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          uuid:
                            type: string
                          status:
                            type: integer
                          status_string:
                            type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/output_files.json:
    post:
      tags: [Productions]
      summary: Add or update output files
      description: |
        Add output file format configurations to a production.

        See the [output files documentation](https://auphonic.com/help/api/details.html#output-files) for details.
      operationId: setProductionOutputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/OutputFileRequest'
      responses:
        '200':
          description: Output files updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete all output files
      description: |
        Removes all output file configurations from a production.
      operationId: deleteProductionOutputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Output files deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/chapters.json:
    post:
      tags: [Productions]
      summary: Add chapters
      description: |
        Add chapter marks to a production. Each chapter requires a start time and title.

        See the [chapters documentation](https://auphonic.com/help/api/complex.html#adding-chapters) for details.
      operationId: setProductionChapters
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ChapterRequest'
      responses:
        '200':
          description: Chapters added
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete all chapters
      description: |
        Removes all chapter marks from a production.
      operationId: deleteProductionChapters
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Chapters deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/algorithms.json:
    post:
      tags: [Productions]
      summary: Set audio algorithms
      description: |
        Set audio processing algorithm parameters for a production.
        See the `/api/info/algorithms.json` endpoint for all available parameters and values.

        **⬇ Select Singletrack or Multitrack in the request body schema below** to see the
        relevant algorithm parameters for each mode.

        For multitrack productions, per-track algorithm settings (e.g. `backforeground`, `gain`, `pan`)
        are set via `multi_input_files[].algorithms`, while this endpoint sets the master-level algorithms.

        See the [multitrack algorithm documentation](https://auphonic.com/help/api/multitrack.html#multitrack-audio-algorithm-settings) for details.
      operationId: setProductionAlgorithms
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlgorithmsRequest'
      responses:
        '200':
          description: Algorithms updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/metadata.json:
    post:
      tags: [Productions]
      summary: Set metadata
      description: |
        Set or update audio metadata for a production.

        See the [metadata documentation](https://auphonic.com/help/api/details.html#create-a-production-with-detailed-audio-metadata) for details.
      operationId: setProductionMetadata
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataRequest'
      responses:
        '200':
          description: Metadata updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/outgoing_services.json:
    get:
      tags: [Productions]
      summary: List production outgoing services
      description: |
        Returns outgoing service configurations for a production.

        See the [outgoing file transfers documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details.
      operationId: getProductionOutgoingServices
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Outgoing services list
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/OutgoingService'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    post:
      tags: [Productions]
      summary: Add outgoing services
      description: |
        Add outgoing file transfer services to a production.
        Reference services by UUID. Some services accept additional parameters
        (e.g. SoundCloud: sharing, downloadable; YouTube: privacy, category).

        See the [outgoing file transfers documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details.
      operationId: setProductionOutgoingServices
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/OutgoingServiceRequest'
      responses:
        '200':
          description: Outgoing services added
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete all outgoing services
      description: |
        Removes all outgoing service configurations from a production.
      operationId: deleteProductionOutgoingServices
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Outgoing services deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/speech_recognition.json:
    post:
      tags: [Productions]
      summary: Set speech recognition
      description: |
        Add or update speech recognition settings for a production.
        For external services (Google, Amazon, Speechmatics), provide the service UUID.
        For Auphonic Whisper, omit the UUID and just provide a language.
        Set `shownotes: true` to enable automatic shownotes and chapters generation.

        See the [speech recognition documentation](https://auphonic.com/help/api/details.html#adding-speech-recognition) for details.
      operationId: setProductionSpeechRecognition
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeechRecognitionRequest'
      responses:
        '200':
          description: Speech recognition updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Remove speech recognition
      description: |
        Remove speech recognition service from a production.
      operationId: deleteProductionSpeechRecognition
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Speech recognition removed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/multi_input_files.json:
    post:
      tags: [Productions]
      summary: Add multi-input files (intros, outros, inserts, multitrack)
      description: |
        Add multiple input files to a production. Each call appends files.
        Supported types: `intro`, `outro`, `insert`, `multitrack`.
        Files can be referenced via external service UUID + filename, HTTP URL, or uploaded separately.

        See the [multitrack documentation](https://auphonic.com/help/api/multitrack.html) for details.
      operationId: setProductionMultiInputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                multi_input_files:
                  type: array
                  items:
                    $ref: '#/components/schemas/MultiInputFileRequest'
      responses:
        '200':
          description: Multi-input files added
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete all multi-input files
      description: |
        Removes all intro, outro, insert and multitrack files from a production.
      operationId: deleteProductionMultiInputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Multi-input files deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/multi_input_files/{track_id}.json:
    post:
      tags: [Productions]
      summary: Update a specific multi-input file track
      description: |
        Update a specific multi-input file identified by track ID.

        See the [multitrack documentation](https://auphonic.com/help/api/multitrack.html) for details.
      operationId: updateProductionMultiInputFileTrack
      parameters:
        - $ref: '#/components/parameters/uuid'
        - name: track_id
          in: path
          required: true
          description: Track identifier
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MultiInputFileRequest'
      responses:
        '200':
          description: Track updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete a specific multi-input file track
      description: |
        Remove a specific multi-input file identified by track ID.
      operationId: deleteProductionMultiInputFileTrack
      parameters:
        - $ref: '#/components/parameters/uuid'
        - name: track_id
          in: path
          required: true
          description: Track identifier
          schema:
            type: string
      responses:
        '200':
          description: Track deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/cuts.json:
    post:
      tags: [Productions]
      summary: Add cuts
      description: |
        Add audio cut segments to a production. Cuts are specified as a list of
        `[start_time, end_time]` arrays in seconds. Cut times must be relative
        to the main input file.

        See the [cuts documentation](https://auphonic.com/help/api/details.html#adding-cuts) for details.
      operationId: setProductionCuts
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CutsRequest'
      responses:
        '200':
          description: Cuts added
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete all cuts
      description: |
        Removes all audio cut segments from a production.
      operationId: deleteProductionCuts
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Cuts deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/segments.json:
    post:
      tags: [Productions]
      summary: Set denoise segments
      description: |
        Set denoise segments for a production. Segments define time regions with
        individual denoise/filter settings. Segments must be contiguous (no gaps
        or overlaps). If a segment has no explicit settings, defaults are applied.

        See the [segments documentation](https://auphonic.com/help/api/details.html#adding-segments) for details.
      operationId: setProductionSegments
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentsRequest'
      responses:
        '200':
          description: Segments updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete all segments
      description: |
        Removes all denoise segments from a production.
      operationId: deleteProductionSegments
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Segments deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/production/{uuid}/webhook.json:
    get:
      tags: [Productions]
      summary: Get production webhook
      description: |
        Returns the webhook URL configured for a production.

        See the [webhooks documentation](https://auphonic.com/help/api/webhook.html) for details.
      operationId: getProductionWebhook
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Webhook URL
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          webhook:
                            type: string
                            format: uri
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    post:
      tags: [Productions]
      summary: Set production webhook
      description: |
        Set a webhook URL for a production. After processing is finished,
        Auphonic will send an HTTP POST to this URL with `uuid`, `status` (3=Done, 2=Error), and `status_string`.
        First tries application/x-www-form-urlencoded, retries with multipart/form-data on failure.

        See the [webhooks documentation](https://auphonic.com/help/api/webhook.html#add-a-webhook-to-a-production) for details.
      operationId: setProductionWebhook
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook:
                  type: string
                  format: uri
                  description: Callback URL
      callbacks:
        productionComplete:
          '{$request.body#/webhook}':
            post:
              summary: Webhook notification after processing
              description: |
                Sent when production processing completes (success or error).
                First attempts application/x-www-form-urlencoded, retries with
                multipart/form-data if the first attempt fails.
              requestBody:
                content:
                  application/x-www-form-urlencoded:
                    schema:
                      type: object
                      required: [uuid, status, status_string]
                      properties:
                        uuid:
                          type: string
                          description: Production UUID
                        status:
                          type: integer
                          description: "3=Done, 2=Error"
                          enum: [2, 3]
                        status_string:
                          type: string
                          description: Human-readable status
              responses:
                '200':
                  description: Webhook received successfully
      responses:
        '200':
          description: Webhook set
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Production'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Productions]
      summary: Delete production webhook
      description: |
        Removes the webhook from a production.

        See the [webhooks documentation](https://auphonic.com/help/api/webhook.html#delete-a-webhook) for details.
      operationId: deleteProductionWebhook
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Webhook deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  # ==========================================================================
  # PRESETS
  # ==========================================================================

  /api/presets.json:
    get:
      tags: [Presets]
      summary: List all presets
      description: |
        Returns details about all presets of the authenticated user.
        Use `preset_type` to filter by preset type.

        To paginate through all results, increment `offset` by `limit` until fewer
        than `limit` results are returned. There is no total count in the response.

        See the [list presets documentation](https://auphonic.com/help/api/query.html#list-all-productions-and-presets) for details.
      operationId: listPresets
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/uuids_only'
        - $ref: '#/components/parameters/minimal_data'
        - name: preset_type
          in: query
          description: Filter presets by type
          schema:
            type: string
            enum: [personal_presets, auphonic_presets, all_presets]
            default: personal_presets
      responses:
        '200':
          description: List of presets
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'

    post:
      tags: [Presets]
      summary: Create a new preset
      description: |
        Creates a new preset (production template). Requires `preset_name`.
        Chapters and input files cannot be set on presets.

        **⬇ Select Singletrack or Multitrack in the request body schema below to see the
        relevant parameters for each mode.** Set `is_multitrack: true` for multitrack presets.

        See the [preset creation documentation](https://auphonic.com/help/api/details.html#creation-of-presets) for details.
      operationId: createPreset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresetCreateRequest'
            examples:
              "Singletrack (is_multitrack: false)":
                summary: Singletrack preset (default)
                value:
                  is_multitrack: false
                  preset_name: My Preset
                  algorithms:
                    leveler: true
                    denoise: false
                    loudnesstarget: -16
                  output_files:
                    - format: mp3
                      bitrate: 128
              "Multitrack (is_multitrack: true)":
                summary: Multitrack preset
                value:
                  is_multitrack: true
                  preset_name: My Multitrack Preset
                  algorithms:
                    leveler: true
                    loudnesstarget: -16
                  output_files:
                    - format: mp3
                      bitrate: 128
      responses:
        '200':
          description: Preset created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  /api/preset/{uuid}.json:
    get:
      tags: [Presets]
      summary: Get preset details
      description: |
        See the [preset details documentation](https://auphonic.com/help/api/query.html#details-about-a-preset) for details.
      operationId: getPreset
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Preset details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    post:
      tags: [Presets]
      summary: Update a preset
      description: |
        **⬇ Select Singletrack or Multitrack in the request body schema below to see the
        relevant parameters for each mode.**

        See the [update and delete documentation](https://auphonic.com/help/api/update.html) for details.
      operationId: updatePreset
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresetCreateRequest'
            examples:
              "Singletrack (is_multitrack: false)":
                summary: Singletrack preset (default)
                value:
                  preset_name: Updated Preset
                  algorithms:
                    loudnesstarget: -16
              "Multitrack (is_multitrack: true)":
                summary: Multitrack preset
                value:
                  is_multitrack: true
                  preset_name: Updated Multitrack Preset
                  algorithms:
                    leveler: true
      responses:
        '200':
          description: Preset updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Presets]
      summary: Delete a preset
      description: |
        See the [update and delete documentation](https://auphonic.com/help/api/update.html) for details.
      operationId: deletePreset
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Preset deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/upload.json:
    post:
      tags: [Presets]
      summary: Upload preset cover image
      description: |
        See the [file upload documentation](https://auphonic.com/help/api/complex.html#start-a-production-and-upload-a-local-file) for details.
      operationId: uploadPresetImage
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: Cover image file
      responses:
        '200':
          description: Image uploaded
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/output_files.json:
    post:
      tags: [Presets]
      summary: Add preset output files
      description: |
        See the [output files documentation](https://auphonic.com/help/api/details.html#output-files) for details.
      operationId: setPresetOutputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/OutputFileRequest'
      responses:
        '200':
          description: Output files updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Presets]
      summary: Delete preset output files
      operationId: deletePresetOutputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Output files deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/outgoing_services.json:
    get:
      tags: [Presets]
      summary: List preset outgoing services
      description: |
        See the [outgoing file transfers documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details.
      operationId: getPresetOutgoingServices
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Outgoing services list
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/OutgoingService'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    post:
      tags: [Presets]
      summary: Add preset outgoing services
      description: |
        See the [outgoing file transfers documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details.
      operationId: setPresetOutgoingServices
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/OutgoingServiceRequest'
      responses:
        '200':
          description: Outgoing services added
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Presets]
      summary: Delete preset outgoing services
      operationId: deletePresetOutgoingServices
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Outgoing services deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/algorithms.json:
    post:
      tags: [Presets]
      summary: Set preset algorithms
      description: |
        **⬇ Select Singletrack or Multitrack in the request body schema below** to see the
        relevant algorithm parameters for each mode.

        See the [audio algorithms documentation](https://auphonic.com/help/api/details.html#audio-algorithms) for details.
      operationId: setPresetAlgorithms
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlgorithmsRequest'
      responses:
        '200':
          description: Algorithms updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/metadata.json:
    post:
      tags: [Presets]
      summary: Set preset metadata
      description: |
        See the [metadata documentation](https://auphonic.com/help/api/details.html#create-a-production-with-detailed-audio-metadata) for details.
      operationId: setPresetMetadata
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataRequest'
      responses:
        '200':
          description: Metadata updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/multi_input_files.json:
    post:
      tags: [Presets]
      summary: Add preset multi-input files
      description: |
        See the [multitrack presets documentation](https://auphonic.com/help/api/multitrack.html) for details.
      operationId: setPresetMultiInputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                multi_input_files:
                  type: array
                  items:
                    $ref: '#/components/schemas/MultiInputFileRequest'
      responses:
        '200':
          description: Multi-input files added
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Presets]
      summary: Delete preset multi-input files
      operationId: deletePresetMultiInputFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Multi-input files deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/multi_input_files/{track_id}.json:
    post:
      tags: [Presets]
      summary: Update a specific preset multi-input file track
      description: |
        See the [multitrack documentation](https://auphonic.com/help/api/multitrack.html) for details.
      operationId: updatePresetMultiInputFileTrack
      parameters:
        - $ref: '#/components/parameters/uuid'
        - name: track_id
          in: path
          required: true
          description: Track identifier
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MultiInputFileRequest'
      responses:
        '200':
          description: Track updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Presets]
      summary: Delete a specific preset multi-input file track
      operationId: deletePresetMultiInputFileTrack
      parameters:
        - $ref: '#/components/parameters/uuid'
        - name: track_id
          in: path
          required: true
          description: Track identifier
          schema:
            type: string
      responses:
        '200':
          description: Track deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  /api/preset/{uuid}/webhook.json:
    get:
      tags: [Presets]
      summary: Get preset webhook
      description: |
        See the [webhooks documentation](https://auphonic.com/help/api/webhook.html#add-a-webhook-to-a-preset) for details.
      operationId: getPresetWebhook
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Webhook URL
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          webhook:
                            type: string
                            format: uri
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    post:
      tags: [Presets]
      summary: Set preset webhook
      description: |
        See the [webhooks documentation](https://auphonic.com/help/api/webhook.html#add-a-webhook-to-a-preset) for details.
      operationId: setPresetWebhook
      parameters:
        - $ref: '#/components/parameters/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook:
                  type: string
                  format: uri
      responses:
        '200':
          description: Webhook set
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Preset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

    delete:
      tags: [Presets]
      summary: Delete preset webhook
      description: |
        See the [webhooks documentation](https://auphonic.com/help/api/webhook.html#delete-a-webhook) for details.
      operationId: deletePresetWebhook
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: Webhook deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'

  # ==========================================================================
  # SERVICES
  # ==========================================================================

  /api/services.json:
    get:
      tags: [Services]
      summary: List all external services
      description: |
        Returns all registered external services (Dropbox, FTP, SFTP, YouTube,
        SoundCloud, etc.) of the authenticated user. Each service has a type-specific
        set of fields.

        See the [external services documentation](https://auphonic.com/help/api/details.html#query-external-services) for details.
      operationId: listServices
      responses:
        '200':
          description: List of services
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/ServiceAccount'
              example:
                status_code: 200
                error_code: null
                error_message: ""
                form_errors: {}
                data:
                  - uuid: "AbCdEfGhIjKlMnOpQrStUv"
                    display_name: "My Dropbox"
                    type: "dropbox"
                    incoming: true
                    outgoing: true
                    email: "user@example.com"
                  - uuid: "WxYzAbCdEfGhIjKlMnOpQr"
                    display_name: "Production Server"
                    type: "sftp"
                    incoming: true
                    outgoing: true
                    host: "sftp.example.com"
                    port: 22
                    path: "/uploads"
                    base_url: "https://cdn.example.com/uploads"
        '401':
          $ref: '#/components/responses/Unauthorized'

  /api/service/{uuid}/ls.json:
    get:
      tags: [Services]
      summary: List files on external service
      description: |
        Returns a list of all supported audio and video files on the external
        service with the given UUID.

        **Rate limit:** 10 requests per minute (40 for business accounts). Returns 429 if exceeded.

        See the [list files documentation](https://auphonic.com/help/api/query.html#list-files-on-an-external-service) for details.
      operationId: listServiceFiles
      parameters:
        - $ref: '#/components/parameters/uuid'
      responses:
        '200':
          description: List of files
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          type: string
                        example: ["my_audio.mp3", "my_video.avi", "next_file.ogg"]
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'

  /api/service/connect.json:
    post:
      tags: [Services]
      summary: Connect external webhook service
      description: |
        Register an external webhook service. Only available via OAuth2 authentication.
        Used by third-party services to register as publishing targets within Auphonic.

        The webhook receives production data as a signed JWT. Verify the JWT signature
        using the OAuth2 client secret.

        See the [External Services documentation](https://auphonic.com/help/api/external_service.html) for details.
      operationId: connectService
      security:
        - oauth2: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - display_name
                - webhook_url
              properties:
                display_name:
                  type: string
                  description: Display name for the service
                webhook_url:
                  type: string
                  format: uri
                  description: Webhook URL that receives production data
                custom_data:
                  type: string
                  description: Custom data to include with webhook calls
      responses:
        '200':
          description: Service connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'

  # ==========================================================================
  # INFO
  # ==========================================================================

  /api/info.json:
    get:
      tags: [Info]
      summary: Get all API info
      description: |
        Returns all info endpoints in a single response: output file formats,
        service types, audio algorithms, and production status codes.

        See the [Info API documentation](https://auphonic.com/help/api/query.html) for details.
      operationId: getAllInfo
      security:
        - bearerAuth: []
        - basicAuth: []
        - oauth2: []
        - {}
      responses:
        '200':
          description: All API info
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          output_files:
                            type: object
                            additionalProperties:
                              $ref: '#/components/schemas/OutputFormatInfo'
                          service_types:
                            type: object
                            additionalProperties:
                              $ref: '#/components/schemas/ServiceTypeInfo'
                          algorithms:
                            type: object
                            additionalProperties:
                              $ref: '#/components/schemas/AlgorithmInfo'
                          production_status:
                            type: object
                            description: |
                              Map of status code to status string. Status codes:
                              0=File Upload, 1=Waiting, 2=Error, 3=Done, 4=Audio Processing,
                              5=Audio Encoding, 6=Outgoing File Transfer, 7=Audio Mono Mixdown,
                              8=Split Audio On Chapter Marks, 9=Incomplete, 10=Production Not Started Yet,
                              11=Production Outdated, 12=Incoming File Transfer, 13=Stopping the Production,
                              14=Speech Recognition, 15=Production Changed
                            additionalProperties:
                              type: string

  /api/info/{subject}.json:
    get:
      tags: [Info]
      summary: Get specific API info
      description: |
        Returns info for a specific subject: `output_files`, `service_types`,
        `algorithms`, or `production_status`.

        See the [Info API documentation](https://auphonic.com/help/api/query.html) for details.
      operationId: getInfo
      security:
        - bearerAuth: []
        - basicAuth: []
        - oauth2: []
        - {}
      parameters:
        - name: subject
          in: path
          required: true
          description: The info topic to query
          schema:
            type: string
            enum: [output_files, service_types, algorithms, production_status]
      responses:
        '200':
          description: Info for the requested subject
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object

  # ==========================================================================
  # USER
  # ==========================================================================

  /api/user.json:
    get:
      tags: [User]
      summary: Get current user account info
      description: |
        Returns information and settings of the authenticated user account.

        See the [User API documentation](https://auphonic.com/help/api/query.html#user-account-info) for details.
      operationId: getUser
      responses:
        '200':
          description: User account info
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/User'
              example:
                status_code: 200
                error_code: null
                error_message: ""
                form_errors: {}
                data:
                  username: "podcaster"
                  email: "podcaster@example.com"
                  user_id: "abc123def456"
                  date_joined: "2023-06-01T12:00:00Z"
                  credits: 4.5
                  onetime_credits: 2.0
                  recurring_credits: 2.5
                  recharge_date: "2025-02-01T00:00:00Z"
                  recharge_recurring_credits: 2.5
                  notification_email: true
                  error_email: true
                  warning_email: true
                  low_credits_email: true
                  low_credits_threshold: 1
        '401':
          $ref: '#/components/responses/Unauthorized'

  # ==========================================================================
  # DOWNLOADS
  # ==========================================================================

  /api/download/{dtype}/{uuid}/{filename}:
    get:
      tags: [Productions]
      summary: Download production result file
      description: |
        Download an output file from a production. The exact URL is provided
        in the `download_url` field of the production's output files.
        May redirect (3XX) to a storage backend.

        **Rate limit:** 30 downloads per 5 minutes per production. Returns 429 if exceeded.

        See the [download documentation](https://auphonic.com/help/api/query.html#download-result-media-files) for details.
      operationId: downloadFile
      parameters:
        - name: dtype
          in: path
          required: true
          description: "Download type (e.g. audio-result, audio-upload, preset)"
          schema:
            type: string
        - name: uuid
          in: path
          required: true
          description: Production or preset UUID
          schema:
            type: string
        - name: filename
          in: path
          required: true
          description: Output filename
          schema:
            type: string
      responses:
        '200':
          description: File content
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '302':
          description: Redirect to storage backend
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'

# ==============================================================================
# COMPONENTS
# ==============================================================================

components:

  # --------------------------------------------------------------------------
  # Security Schemes
  # --------------------------------------------------------------------------
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        API Key or OAuth2 access token. Use header `Authorization: Bearer {token}`
        or query parameter `?bearer_token={token}`.

    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication with Auphonic username and password.

    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication for third-party applications.
      flows:
        authorizationCode:
          authorizationUrl: https://auphonic.com/oauth2/authorize/
          tokenUrl: https://auphonic.com/oauth2/token/
          scopes: {}
        password:
          tokenUrl: https://auphonic.com/oauth2/token/
          scopes: {}

  # --------------------------------------------------------------------------
  # Reusable Parameters
  # --------------------------------------------------------------------------
  parameters:
    uuid:
      name: uuid
      in: path
      required: true
      description: "UUID of the resource (22-character alphanumeric string)"
      schema:
        type: string
        pattern: '^[a-zA-Z0-9]{22}$'
        example: KKw7AxpLrDBQKLVnQCBtCh

    limit:
      name: limit
      in: query
      description: "Maximum number of results to return (default: 100). When returning full production/preset data (without uuids_only or minimal_data), the maximum is capped at 10."
      schema:
        type: integer
        minimum: 1
        default: 100
        example: 10

    offset:
      name: offset
      in: query
      description: Number of results to skip (for pagination, 0-indexed)
      schema:
        type: integer
        minimum: 0
        default: 0

    uuids_only:
      name: uuids_only
      in: query
      description: "Set to 1 to return only UUIDs instead of full objects"
      schema:
        type: integer
        enum: [0, 1]

    minimal_data:
      name: minimal_data
      in: query
      description: "Set to 1 to return only minimal data for each item. See [minimal_data documentation](https://auphonic.com/help/api/query.html#query-minimal-data) for details."
      schema:
        type: integer
        enum: [0, 1]

  # --------------------------------------------------------------------------
  # Reusable Responses
  # --------------------------------------------------------------------------
  responses:
    BadRequest:
      description: Bad request - validation errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponseEnvelope'
          example:
            status_code: 400
            error_code: null
            error_message: "Validation failed"
            form_errors:
              metadata:
                - "This field is required."
            data: {}

    Unauthorized:
      description: Authentication required or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponseEnvelope'
          example:
            status_code: 401
            error_code: null
            error_message: "Authentication required"
            form_errors: {}
            data: {}

    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponseEnvelope'
          example:
            status_code: 404
            error_code: null
            error_message: "Not found"
            form_errors: {}
            data: {}

    RateLimited:
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponseEnvelope'
          example:
            status_code: 429
            error_code: null
            error_message: "Too many requests"
            form_errors: {}
            data: {}

  # --------------------------------------------------------------------------
  # Schemas
  # --------------------------------------------------------------------------
  schemas:

    # ========== Response Envelope ==========

    ApiResponseEnvelope:
      type: object
      properties:
        status_code:
          type: integer
          description: HTTP status code
          example: 200
        error_code:
          type: string
          nullable: true
          description: Error code identifier, null on success
        error_message:
          type: string
          description: Human-readable error message, empty on success
          example: ""
        form_errors:
          type: object
          description: Field-level validation errors
          additionalProperties:
            type: array
            items:
              type: string
        data:
          description: Response payload (varies per endpoint)
      required:
        - status_code
        - error_code
        - error_message
        - form_errors
        - data

    # ========== Production ==========

    Production:
      description: |
        **⬇ Select Singletrack or Multitrack below** to see the relevant response fields for each mode.
        Singletrack and multitrack productions have different algorithm parameters.
      oneOf:
        - $ref: '#/components/schemas/SingletrackProduction'
        - $ref: '#/components/schemas/MultitrackProduction'
      discriminator:
        propertyName: is_multitrack
        mapping:
          "false": '#/components/schemas/SingletrackProduction'
          "true": '#/components/schemas/MultitrackProduction'

    ProductionBase:
      type: object
      required: [uuid, status, status_string, is_multitrack, creation_time, change_time, start_allowed, change_allowed, status_page, edit_page]
      properties:
        uuid:
          type: string
          description: Unique identifier (22 characters)
          example: X2bUTQ8z888YaKukkU6vfJ
        status:
          type: integer
          description: |
            Current processing status code:
            0=File Upload, 1=Waiting, 2=Error, 3=Done, 4=Audio Processing,
            5=Audio Encoding, 6=Outgoing File Transfer, 7=Audio Mono Mixdown,
            8=Split Audio On Chapter Marks, 9=Incomplete, 10=Not Started Yet,
            11=Production Outdated, 12=Incoming File Transfer, 13=Stopping,
            14=Speech Recognition, 15=Production Changed
          enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
          example: 3
        status_string:
          type: string
          description: Human-readable status
          example: Done
        error_status:
          type: integer
          nullable: true
          description: Processing status where an error occurred
        error_message:
          type: string
          description: Error message if an error occurred
        warning_status:
          type: integer
          nullable: true
          description: Processing status where a warning occurred
        warning_message:
          type: string
          description: Warning message if a warning occurred
        preset:
          type: string
          nullable: true
          description: UUID of the preset used (if any)
        image:
          type: string
          nullable: true
          format: uri
          description: Cover image URL (original resolution)
        thumbnail:
          type: string
          nullable: true
          format: uri
          description: Thumbnail URL (200x200)
        creation_time:
          type: string
          format: date-time
          description: Production creation time (UTC)
        change_time:
          type: string
          format: date-time
          description: Last system change time (UTC)
        output_files:
          type: array
          items:
            $ref: '#/components/schemas/OutputFile'
        outgoing_services:
          type: array
          items:
            $ref: '#/components/schemas/OutgoingService'
        review_before_publishing:
          type: boolean
          description: Whether to require review before publishing
        in_review:
          type: boolean
          description: Whether the production is currently in review
        metadata:
          $ref: '#/components/schemas/Metadata'
        chapters:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/Chapter'
        input_file:
          type: string
          nullable: true
          description: Input audio/video filename
        length:
          type: number
          nullable: true
          description: Output audio length in seconds
        length_timestring:
          type: string
          nullable: true
          description: "Output audio length as HH:MM:SS.mmm"
        channels:
          type: integer
          nullable: true
          description: Number of input audio channels
        samplerate:
          type: integer
          nullable: true
          description: Input audio sample rate in Hz
        bitrate:
          type: number
          nullable: true
          description: Input audio bitrate in kbps
        webhook:
          type: string
          nullable: true
          format: uri
          description: Webhook callback URL
        format:
          type: string
          nullable: true
          description: Input audio file format (mp3, vorbis, aac, etc.)
        has_video:
          type: boolean
          nullable: true
          description: Whether input file contains a video track
        cut_start:
          type: number
          nullable: true
          description: Time in seconds to cut from the start
        cut_end:
          type: number
          nullable: true
          description: Time in seconds to cut from the end
        waveform_image:
          type: string
          nullable: true
          format: uri
          description: URL of the output waveform image
        output_basename:
          type: string
          nullable: true
          description: Basename for output filenames
        start_allowed:
          type: boolean
          description: Whether it is allowed to start the production
        change_allowed:
          type: boolean
          description: Whether it is allowed to change the production
        service:
          type: string
          nullable: true
          description: Service UUID for incoming file transfer
        status_page:
          type: string
          format: uri
          description: URL to the Auphonic status web page
        edit_page:
          type: string
          format: uri
          description: URL to the Auphonic edit web page
        multi_input_files:
          type: array
          items:
            $ref: '#/components/schemas/MultiInputFile'
        statistics:
          type: object
          nullable: true
          description: "Audio processing statistics. Only available for finished productions (status 2, 3, or 10). Structure varies by production type. Query a finished production to see the full statistics."
          properties:
            input:
              type: object
              description: Input file audio statistics
              properties:
                loudness:
                  type: array
                  description: "Integrated loudness [value, unit]"
                  items: {}
                  example: [-20.5, "LUFS"]
                lra:
                  type: array
                  description: "Loudness range [value, unit]"
                  items: {}
                  example: [2.14, "LU"]
                peak:
                  type: array
                  description: "True peak level [value, unit]"
                  items: {}
                  example: [-1.2, "dBTP"]
            output:
              type: object
              description: Output file audio statistics
              properties:
                loudness:
                  type: array
                  items: {}
                  example: [-16.0, "LUFS"]
                lra:
                  type: array
                  items: {}
                  example: [1.43, "LU"]
                peak:
                  type: array
                  items: {}
                  example: [-1.5, "dBTP"]
          additionalProperties: true
        used_credits:
          $ref: '#/components/schemas/UsedCredits'
        speech_recognition:
          $ref: '#/components/schemas/SpeechRecognition'
        shownotes:
          $ref: '#/components/schemas/ShowNotes'
        cuts:
          type: array
          nullable: true
          description: Audio cut segments as arrays of [start, end] in seconds
          items:
            type: array
            items:
              type: number
            minItems: 2
            maxItems: 2

    SingletrackProduction:
      allOf:
        - type: object
          properties:
            is_multitrack:
              type: boolean
              description: Always false for singletrack productions
              enum: [false]
            algorithms:
              $ref: '#/components/schemas/SingletrackAlgorithms'
        - $ref: '#/components/schemas/ProductionBase'

    MultitrackProduction:
      allOf:
        - type: object
          properties:
            is_multitrack:
              type: boolean
              description: Always true for multitrack productions
              enum: [true]
            algorithms:
              $ref: '#/components/schemas/MultitrackMasterAlgorithms'
        - $ref: '#/components/schemas/ProductionBase'

    # ========== Preset ==========

    Preset:
      description: |
        **⬇ Select Singletrack or Multitrack below** to see the relevant response fields for each mode.
        Singletrack and multitrack presets have different algorithm parameters.
      oneOf:
        - $ref: '#/components/schemas/SingletrackPreset'
        - $ref: '#/components/schemas/MultitrackPreset'
      discriminator:
        propertyName: is_multitrack
        mapping:
          "false": '#/components/schemas/SingletrackPreset'
          "true": '#/components/schemas/MultitrackPreset'

    PresetBase:
      type: object
      required: [uuid, preset_name, is_multitrack, creation_time]
      properties:
        uuid:
          type: string
          example: YnzGYccbzEj5MQwiSGfrqC
        preset_name:
          type: string
          description: Name of the preset
        image:
          type: string
          nullable: true
          format: uri
        thumbnail:
          type: string
          nullable: true
          format: uri
        creation_time:
          type: string
          format: date-time
        output_files:
          type: array
          items:
            $ref: '#/components/schemas/OutputFile'
        outgoing_services:
          type: array
          items:
            $ref: '#/components/schemas/OutgoingService'
        review_before_publishing:
          type: boolean
        metadata:
          $ref: '#/components/schemas/Metadata'
        output_basename:
          type: string
          nullable: true
        webhook:
          type: string
          nullable: true
          format: uri
        multi_input_files:
          type: array
          items:
            $ref: '#/components/schemas/MultiInputFile'
        speech_recognition:
          $ref: '#/components/schemas/SpeechRecognition'

    SingletrackPreset:
      allOf:
        - type: object
          properties:
            is_multitrack:
              type: boolean
              description: Always false for singletrack presets
              enum: [false]
            algorithms:
              $ref: '#/components/schemas/SingletrackAlgorithms'
        - $ref: '#/components/schemas/PresetBase'

    MultitrackPreset:
      allOf:
        - type: object
          properties:
            is_multitrack:
              type: boolean
              description: Always true for multitrack presets
              enum: [true]
            algorithms:
              $ref: '#/components/schemas/MultitrackMasterAlgorithms'
        - $ref: '#/components/schemas/PresetBase'

    # ========== Metadata ==========

    Metadata:
      type: object
      properties:
        title:
          type: string
        artist:
          type: string
        album:
          type: string
        track:
          type: string
          nullable: true
        subtitle:
          type: string
        summary:
          type: string
        genre:
          type: string
        year:
          type: string
          nullable: true
        publisher:
          type: string
        url:
          type: string
        license:
          type: string
        license_url:
          type: string
        append_chapters:
          type: boolean
          description: Append chapter marks as text to the summary/description field
        tags:
          type: array
          items:
            type: string
        location:
          $ref: '#/components/schemas/Location'

    Location:
      type: object
      properties:
        latitude:
          type: string
          example: "47.070"
        longitude:
          type: string
          example: "15.439"

    # ========== Chapter ==========

    Chapter:
      type: object
      required: [start, start_sec, title]
      properties:
        start:
          type: string
          description: "Start time as HH:MM:SS[.mmm], relative to main input file"
          example: "00:02:18"
        start_sec:
          type: number
          description: Start time in seconds, relative to main input file
          example: 138.0
        start_output:
          type: string
          description: "Start time as HH:MM:SS.mmm, relative to output files (includes intro length)"
        start_output_sec:
          type: number
          description: Start time in seconds, relative to output files
        title:
          type: string
          description: Chapter title
        url:
          type: string
          description: Chapter URL (for enhanced podcasts)
        image:
          type: string
          nullable: true
          format: uri
          description: Chapter image URL

    # ========== Output File ==========

    OutputFile:
      type: object
      required: [format, ending, filename]
      properties:
        format:
          type: string
          description: "Output format (mp3, aac, flac, vorbis, opus, wav, video, etc.)"
          example: mp3
        bitrate:
          type: integer
          nullable: true
          description: Bitrate in kbps (for lossy formats)
          example: 96
        mono_mixdown:
          type: boolean
          description: Whether to create a mono mixdown
        split_on_chapters:
          type: boolean
          description: Whether to split the output on chapter marks
        suffix:
          type: string
          description: Suffix added to the output filename
        ending:
          type: string
          description: File extension
          example: mp3
        filename:
          type: string
          description: Full output filename
        size:
          type: integer
          nullable: true
          description: File size in bytes
        size_string:
          type: string
          nullable: true
          description: Human-readable file size
        checksum:
          type: string
          nullable: true
          description: MD5 checksum of the output file
        download_url:
          type: string
          nullable: true
          format: uri
          description: URL to download the output file
        outgoing_services:
          type: array
          description: UUIDs of outgoing services assigned to this output file
          items:
            type: string

    # ========== Outgoing Service (in production/preset responses) ==========

    OutgoingService:
      type: object
      description: |
        An external service configured for outgoing file transfers.
        Fields present depend on the service `type`.
        Query `/api/info/service_types.json` for available service types and their parameters.
        Common fields (uuid, display_name, type, incoming, outgoing) are always present.
        Type-specific fields (email, host, port, path, bucket, etc.) are only present for
        applicable service types.
      properties:
        uuid:
          type: string
        display_name:
          type: string
        type:
          type: string
          description: "Service type (dropbox, gdrive, soundcloud, youtube, ftp, sftp, etc.)"
        transfer_success:
          type: boolean
          description: Whether the file transfer was successful
        error_message:
          type: string
          description: Error message if transfer failed
        result_page:
          type: string
          nullable: true
          description: Web page generated by the external service
        result_urls:
          type: array
          description: URLs of copied output files on external servers
          items:
            type: string
        incoming:
          type: boolean
          description: Whether service supports incoming file transfers
        outgoing:
          type: boolean
          description: Whether service supports outgoing file transfers
        # Type-specific fields (present depending on service type)
        email:
          type: string
          description: Account email (Dropbox, Google Drive, OneDrive)
        host:
          type: string
          description: Server hostname (FTP, SFTP, Libsyn)
        port:
          type: integer
          description: Server port (FTP, SFTP, Libsyn)
        path:
          type: string
          description: Server path (FTP, SFTP)
        base_url:
          type: string
          description: Base URL for file access (FTP, SFTP, WebDAV, Blubrry)
        sharing:
          type: string
          description: "Sharing setting (SoundCloud: public/private)"
        downloadable:
          type: boolean
          description: Whether file is downloadable (SoundCloud, Spreaker)
        track_type:
          type: string
          description: Track type (SoundCloud)
        privacy:
          type: string
          description: "Privacy setting (YouTube: public/private)"
        category:
          type: string
          description: Category (YouTube)
        distribution:
          type: string
          description: "Distribution setting (Facebook: everywhere/no_story/secret)"
        embeddable:
          type: boolean
          description: Whether video is embeddable (Facebook)
        show:
          type: string
          description: Show name (Spreaker)
        bucket:
          type: string
          description: S3 bucket name (Amazon S3, Archive.org)
        key_prefix:
          type: string
          description: S3 key prefix (Amazon S3)
        canned_acl:
          type: string
          description: S3 canned ACL (Amazon S3)
        endpoint:
          type: string
          description: S3-compatible endpoint (Generic S3)
        program_keyword:
          type: string
          description: Program keyword (Blubrry)
        podcast:
          type: object
          description: Podcast info (OAuth Hoster services like PodBean, Captivate)
          properties:
            id:
              type: string
            title:
              type: string

    # ========== Service Account (from GET /api/services) ==========

    ServiceAccount:
      type: object
      description: |
        An external service account registered by the user.
        Fields present depend on the service `type`.
        Query `/api/info/service_types.json` for available service types and their parameters.
        Common fields (uuid, display_name, type, incoming, outgoing) are always present.
        Type-specific fields (email, host, port, path, bucket, etc.) are only present for
        applicable service types.
      properties:
        uuid:
          type: string
        display_name:
          type: string
        type:
          type: string
          description: "Service type identifier"
        incoming:
          type: boolean
        outgoing:
          type: boolean
        email:
          type: string
        host:
          type: string
        port:
          type: integer
        path:
          type: string
        base_url:
          type: string
        permissions:
          type: string
        bucket:
          type: string
        key_prefix:
          type: string
        canned_acl:
          type: string
        endpoint:
          type: string
        program_keyword:
          type: string
        url:
          type: string
          description: WebDAV URL
        libsyn_show_slug:
          type: string
        libsyn_directory:
          type: string
        podcast:
          type: object
          properties:
            id:
              type: string
            title:
              type: string

    # ========== Algorithms ==========

    SingletrackAlgorithms:
      type: object
      nullable: true
      description: |
        Audio processing algorithm parameters for singletrack productions.
        See the [audio algorithms documentation](https://auphonic.com/help/api/details.html#more-settings-for-audio-algorithms) for details.
      properties:
        # Filtering
        filtering:
          type: boolean
          description: Enable adaptive filtering
          default: true
        filtermethod:
          type: string
          description: "Filter method"
          enum: [hipfilter, autoeq, bwe]
          default: hipfilter
        # Leveler
        leveler:
          type: boolean
          description: Enable adaptive leveler
          default: true
        levelermode:
          type: string
          description: "Leveler mode (response only, read-only). Automatically set based on which parameters are provided."
          readOnly: true
          enum: [default, musicspeech, broadcast]
        levelerstrength:
          type: integer
          description: "Leveler strength — sets both speech and music strength. If levelerstrength_speech and/or levelerstrength_music are provided, those take priority for their respective segment types."
          default: 100
          enum: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]
        compressor:
          type: string
          description: "Compressor — sets both speech and music compressor. If compressor_speech and/or compressor_music are provided, those take priority for their respective segment types."
          enum: [auto, soft, medium, hard, "off"]
          default: auto
        compressor_speech:
          type: string
          description: "Compressor for speech segments. Overrides compressor for speech."
          enum: [auto, soft, medium, hard, "off"]
          default: auto
        compressor_music:
          type: string
          description: "Compressor for music segments. Overrides compressor for music (same=use compressor/compressor_speech value)."
          enum: [same, auto, soft, medium, hard, "off"]
        levelerstrength_speech:
          type: integer
          description: "Leveler strength for speech segments. Overrides levelerstrength for speech."
          enum: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]
        levelerstrength_music:
          type: integer
          description: "Leveler strength for music segments. Overrides levelerstrength for music (-1=same as speech)."
          enum: [-1, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
        musicgain:
          type: integer
          description: "Add gain to music segments in dB"
          default: 0
          enum: [-6, -5, -4, -3, -2, 0, 2, 3, 4, 5, 6]
        msclassifier:
          type: string
          description: "MusicSpeech classifier — set to speech or music to override automatic classification for the entire file"
          enum: [on, speech, music]
          default: "on"
        # Broadcast mode
        maxlra:
          type: integer
          description: "Broadcast mode: Max loudness range in LU (0=auto)"
          default: 0
          enum: [0, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20]
        maxs:
          type: integer
          description: "Broadcast mode: Max short-term loudness in LU relative to target loudness (0=auto)"
          default: 0
          enum: [0, 3, 4, 5, 6, 8, 9, 10, 12]
        maxm:
          type: integer
          description: "Broadcast mode: Max momentary loudness in LU relative to target loudness (0=auto)"
          default: 0
          enum: [0, 8, 9, 10, 11, 12, 15, 18, 20]
        # Loudness Normalization
        normloudness:
          type: boolean
          description: "Enable loudness normalization. Adjusts the global, overall loudness to the specified loudness target."
          default: true
        loudnesstarget:
          type: integer
          description: "Loudness target in LUFS (default: -16)"
          default: -16
          enum: [-13, -14, -15, -16, -18, -19, -20, -23, -24, -26, -27, -31]
        maxpeak:
          type: number
          description: "Maximum true peak level in dBTP. 0=auto (uses optimal value for target loudness), or set a specific limit."
          default: 0
          enum: [0, -0.5, -1, -1.5, -2, -3, -4, -5, -6]
        dualmono:
          type: boolean
          description: "Treat mono production as dual-mono (-3LU offset)"
          default: false
        loudnessmethod:
          type: string
          description: "Loudness measurement method: program (default), dialog (measure dialog/voice loudness), rms (RMS-based loudness normalization for Audible/ACX)"
          enum: [program, dialog, rms]
          default: program
        # Noise Reduction
        denoise:
          type: boolean
          description: "Enable noise and hum reduction. Classifies regions with different background noises and automatically removes noise and hum."
          default: false
        denoisemethod:
          type: string
          description: "Denoise method. Classic: automatic noise/hum analysis. Static/Dynamic/Speech Isolation: advanced AI-based methods with reverb and breath reduction."
          enum: [classic, static, dynamic, speech_isolation]
          default: classic
        denoiseamount:
          type: integer
          description: "Noise reduction amount in dB. For classic: 0=auto, -1=off (dehum only), 3-100. For static/dynamic/speech_isolation: 0=full (100 dB), -1=off, 3-100."
          default: 0
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        deverbamount:
          type: integer
          description: "Reverb reduction amount in dB (0=full 100 dB, -1=off, 3-100). Requires denoisemethod static, dynamic or speech_isolation."
          default: 0
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        debreathamount:
          type: integer
          description: "Breath reduction amount in dB (-1=off, 3-100). Requires denoisemethod dynamic or speech_isolation."
          default: -1
          enum: [-1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        dehum:
          type: integer
          description: "Hum reduction base frequency (0=auto, 50 or 60 Hz). Used with denoisemethod classic."
          enum: [0, 50, 60]
          default: 0
        dehumamount:
          type: integer
          description: "Hum reduction amount in dB (0=auto, -1=off, 3-100). Used with denoisemethod classic."
          default: 0
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 100]
        # Cutting
        cutter:
          type: boolean
          description: "Master cutting switch (response only, read-only). Automatically enabled when any individual cutter is set to true."
          readOnly: true
        silence_cutter:
          type: boolean
          description: Cut silence segments
          default: false
        filler_cutter:
          type: boolean
          description: Cut filler words
          default: false
        cough_cutter:
          type: boolean
          description: Cut cough segments
          default: false
        music_cutter:
          type: boolean
          description: Cut music segments
          default: false
        cut_mode:
          type: string
          description: "What to do with detected cut segments. apply_cuts: remove cut segments from output. export_uncut_audio: keep audio unchanged, only export cut list. set_cuts_to_silence: replace cut segments with silence. See the [automatic cutting documentation](https://auphonic.com/help/web/production.html#automatic-cutting) for details."
          enum: [apply_cuts, export_uncut_audio, set_cuts_to_silence]
          default: apply_cuts
        fadetime:
          type: integer
          description: "Fade in/out time in ms (0-5000, default 100)"
          default: 100
          minimum: 0
          maximum: 5000
        segments:
          type: array
          description: |
            Denoise segments with per-segment settings. Allows applying different noise reduction
            settings to specific parts of the audio. Segments must be contiguous (no gaps or overlaps).
            Requires `denoise: true` to take effect.
          items:
            $ref: '#/components/schemas/Segment'

    MultitrackMasterAlgorithms:
      type: object
      nullable: true
      description: |
        Master-level audio processing algorithm parameters for multitrack productions.
        **Note:** Loudness normalization is always enabled for multitrack productions
        (there is no `normloudness` toggle — use `loudnesstarget` to set the target level).
        Per-track settings (filtering, denoise, backforeground, gain, pan, etc.) are in TrackAlgorithms.
        See the [multitrack algorithm documentation](https://auphonic.com/help/api/multitrack.html#more-settings-for-multitrack-audio-algorithms) for details.
      properties:
        # Leveler
        leveler:
          type: boolean
          description: Enable adaptive leveler
          default: true
        levelermode:
          type: string
          description: "Leveler mode (response only, read-only). Automatically set based on which parameters are provided."
          readOnly: true
          enum: [default, musicspeech, broadcast]
        # Broadcast mode
        maxlra:
          type: integer
          description: "Broadcast mode: Max loudness range in LU (0=auto)"
          default: 0
          enum: [0, 5, 6, 8, 9, 10, 12, 15, 18, 20, 25, 30]
        maxs:
          type: integer
          description: "Broadcast mode: Max short-term loudness in LU relative to target loudness (0=auto)"
          default: 0
          enum: [0, 3, 4, 5, 6, 8, 9, 10, 12]
        maxm:
          type: integer
          description: "Broadcast mode: Max momentary loudness in LU relative to target loudness (0=auto)"
          default: 0
          enum: [0, 8, 9, 10, 11, 12, 15, 18, 20]
        # Loudness Normalization
        loudnesstarget:
          type: integer
          description: "Loudness target in LUFS (default: -16)"
          default: -16
          enum: [-13, -14, -15, -16, -18, -19, -20, -23, -24, -26, -27, -31]
        maxpeak:
          type: number
          description: "Maximum true peak level in dBTP. 0=auto (uses optimal value for target loudness), or set a specific limit."
          default: 0
          enum: [0, -0.5, -1, -1.5, -2, -3, -4, -5, -6]
        dualmono:
          type: boolean
          description: "Treat mono production as dual-mono (-3LU offset)"
          default: false
        loudnessmethod:
          type: string
          description: "Loudness measurement method: program (default), dialog (measure dialog/voice loudness), rms (RMS-based loudness normalization for Audible/ACX)"
          enum: [program, dialog, rms]
          default: program
        # Noise Gate
        gate:
          type: boolean
          description: Adaptive noise gate
          default: true
        crossgate:
          type: boolean
          description: Crosstalk/bleed reduction (mic bleed removal)
          default: true
        # Cutting
        cutter:
          type: boolean
          description: "Master cutting switch (response only, read-only). Automatically enabled when any individual cutter is set to true."
          readOnly: true
        silence_cutter:
          type: boolean
          description: Cut silence segments
          default: false
        filler_cutter:
          type: boolean
          description: Cut filler words
          default: false
        cough_cutter:
          type: boolean
          description: Cut cough segments
          default: false
        music_cutter:
          type: boolean
          description: Cut music segments
          default: false
        cut_mode:
          type: string
          description: "What to do with detected cut segments. apply_cuts: remove cut segments from output. export_uncut_audio: keep audio unchanged, only export cut list. set_cuts_to_silence: replace cut segments with silence. See the [automatic cutting documentation](https://auphonic.com/help/web/production.html#automatic-cutting) for details."
          enum: [apply_cuts, export_uncut_audio, set_cuts_to_silence]
          default: apply_cuts

    TrackAlgorithms:
      type: object
      nullable: true
      description: |
        Per-track audio processing algorithm parameters for multitrack productions.
      properties:
        filtering:
          type: boolean
          description: Enable adaptive filtering
          default: true
        filtermethod:
          type: string
          description: "Filter method"
          enum: [hipfilter, autoeq, bwe]
          default: hipfilter
        denoise:
          type: boolean
          description: "Enable noise and hum reduction. Classifies regions with different background noises and automatically removes noise and hum."
          default: false
        denoisemethod:
          type: string
          description: "Denoise method for per-track noise reduction"
          enum: [classic, static, dynamic, speech_isolation]
          default: classic
        denoiseamount:
          type: integer
          description: "Noise reduction amount in dB (0=auto, -1=off, 3-100)"
          default: 0
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        deverbamount:
          type: integer
          description: "Reverb reduction amount in dB (0=full 100 dB, -1=off, 3-100). Requires denoisemethod static, dynamic or speech_isolation."
          default: 0
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        debreathamount:
          type: integer
          description: "Breath reduction amount in dB (-1=off, 3-100). Requires denoisemethod dynamic or speech_isolation."
          default: -1
          enum: [-1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        dehum:
          type: integer
          description: "Hum reduction base frequency (0=auto, 50 or 60 Hz). Used with denoisemethod classic."
          enum: [0, 50, 60]
          default: 0
        dehumamount:
          type: integer
          description: "Hum reduction amount in dB (0=auto, -1=off, 3-100). Used with denoisemethod classic."
          default: 0
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 100]
        backforeground:
          type: string
          description: "Fore/background classification for this track"
          enum: [auto, foreground, background, unchanged, ducking]
          default: auto
        backgroundgain:
          type: number
          description: "Background gain in dB (default: -18). Applied when track is set to background."
          default: -18
          enum: [-3, -6, -8, -10, -12, -14, -16, -18, -20, -22, -24, -26]
        ducking_fadetime:
          type: number
          description: "Ducking fade time in ms (default: 500). Applied when backforeground is ducking."
          default: 500
          enum: [125, 250, 375, 500, 750, 1000, 1500, 2000]
        gain:
          type: number
          description: "Gain adjustment in dB"
          default: 0
          enum: [-30, -23, -18, -15, -12, -8, -6, -5, -4, -3, -2, 0, 2, 3, 4, 5, 6]
        levelerstrength:
          type: integer
          description: "Leveler strength (0-100)"
          default: 100
          enum: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
        compressor:
          type: string
          description: "Compressor"
          enum: [auto, soft, medium, hard, "off"]
          default: auto
        pan:
          type: string
          description: "Stereo panning"
          enum: [L100, L75, L50, L25, L20, L15, L10, L05, C, R05, R10, R15, R20, R25, R50, R75, R100]
        msclassifier:
          type: string
          description: "MusicSpeech classifier — set to speech or music to override automatic classification"
          enum: [on, speech, music]
          default: "on"
        segments:
          type: array
          description: |
            Denoise segments with per-segment settings. Allows applying different noise reduction
            settings to specific parts of the track. Segments must be contiguous.
            Requires `denoise: true` to take effect. Segment times are relative to the track file.
          items:
            $ref: '#/components/schemas/Segment'

    # ========== Multi-Input File ==========

    MultiInputFile:
      type: object
      required: [id, type]
      properties:
        id:
          type: string
          description: Identifier for the input file
        type:
          type: string
          description: "File type: intro, outro, insert, or multitrack"
          enum: [intro, outro, insert, multitrack]
        input_file:
          type: string
          description: Filename or URL of the input file
        service:
          type: string
          nullable: true
          description: UUID of external service
        input_length:
          type: number
          nullable: true
          description: Input file length in seconds
        input_channels:
          type: integer
          nullable: true
        input_samplerate:
          type: integer
          nullable: true
        input_bitrate:
          type: number
          nullable: true
        input_filetype:
          type: string
          nullable: true
        offset:
          type: number
          nullable: true
          description: Overlap/insert offset in seconds
        algorithms:
          $ref: '#/components/schemas/TrackAlgorithms'

    # ========== Speech Recognition ==========

    SpeechRecognition:
      type: object
      nullable: true
      description: Speech recognition configuration
      properties:
        uuid:
          type: string
          description: UUID of the speech recognition service
        type:
          type: string
          description: "Speech recognition type (google, witai, amazon, speechmatics, whisper)"
        language:
          type: string
          description: "Language code (e.g. en, de). Whisper uses ISO 639-1 two-letter codes; external services may use locale codes (e.g. en-US). Default: auto."
        keywords:
          type: array
          items:
            type: string
          description: Keywords to improve recognition accuracy
        shownotes:
          type: boolean
          description: Whether automatic shownotes generation is enabled
        shownotes_summary_example:
          type: string
          description: Example summary to guide shownotes generation
        subtitle:
          type: string
          description: Subtitle output format
          enum: [srt, webvtt]
        speech:
          type: string
          description: Speech data output format
          enum: [json, xml]
        transcript:
          type: string
          description: Transcript output format
          enum: [html, txt]
        speaker_diarization_num_speakers:
          type: integer
          nullable: true
          description: Number of speakers for diarization (Whisper only)
        speaker_diarization_names:
          type: array
          nullable: true
          items:
            type: string
          description: Speaker names for diarization (Whisper only)

    # ========== Show Notes ==========

    ShowNotes:
      type: object
      nullable: true
      description: Auto-generated show notes from speech recognition
      properties:
        summaries:
          type: object
          properties:
            long:
              type: array
              items:
                type: string
            brief:
              type: array
              items:
                type: string
            subtitle:
              type: array
              items:
                type: string
        tags:
          type: array
          items:
            type: string

    # ========== Used Credits ==========

    UsedCredits:
      type: object
      nullable: true
      description: Credits consumed by this production (in hours)
      properties:
        recurring:
          type: number
          description: Recurring credits used
        onetime:
          type: number
          description: One-time credits used
        combined:
          type: number
          description: Total credits used

    # ========== User ==========

    User:
      type: object
      required: [username, email, user_id, date_joined, credits, onetime_credits, recurring_credits]
      properties:
        username:
          type: string
        email:
          type: string
          format: email
        user_id:
          type: string
          description: Unique user identifier (stable even when username changes)
        date_joined:
          type: string
          format: date-time
        credits:
          type: number
          description: Total available credits in hours
        onetime_credits:
          type: number
          description: Available one-time credits in hours
        recurring_credits:
          type: number
          description: Available recurring credits in hours
        recharge_date:
          type: string
          format: date-time
          description: Date when recurring credits are recharged
        recharge_recurring_credits:
          type: number
          description: Amount of recurring credits recharged
        notification_email:
          type: boolean
        error_email:
          type: boolean
        warning_email:
          type: boolean
        low_credits_email:
          type: boolean
        low_credits_threshold:
          type: integer
          description: Low credits warning threshold

    # ========== Info Schemas ==========

    OutputFormatInfo:
      type: object
      properties:
        display_name:
          type: string
          example: MP3
        type:
          type: string
          description: "Format type: lossy, lossless, video, or description"
          enum: [lossy, lossless, video, description]
        bitrates:
          type: array
          items:
            type: string
          description: Available bitrates (lossy formats only)
        bitrate_strings:
          type: array
          items:
            type: string
          description: Human-readable bitrate descriptions
        default_bitrate:
          type: string
          description: Default bitrate (lossy formats only)
        endings:
          type: array
          items:
            type: string
          description: File extensions

    ServiceTypeInfo:
      type: object
      properties:
        display_name:
          type: string
        parameters:
          type: object
          nullable: true
          description: Available parameters for this service type
          additionalProperties:
            type: object
            properties:
              display_name:
                type: string
              type:
                type: string
                enum: [checkbox, select]
              default_value: {}
              options:
                type: array
                items:
                  type: object
                  properties:
                    display_name:
                      type: string
                    value: {}

    AlgorithmInfo:
      type: object
      properties:
        display_name:
          type: string
        type:
          type: string
          enum: [checkbox, select]
        default_value: {}
        description:
          type: string
        belongs_to:
          type: string
          description: Parent algorithm this parameter belongs to
        options:
          type: array
          items:
            type: object
            properties:
              display_name:
                type: string
              value: {}

    # ========== Request Schemas ==========

    ProductionCreateRequest:
      description: |
        **⬇ Select Singletrack or Multitrack below** to see the relevant request fields for each mode.
        Set `is_multitrack: true` for multitrack productions, or omit/set to `false` for singletrack.
      oneOf:
        - $ref: '#/components/schemas/SingletrackProductionCreateRequest'
        - $ref: '#/components/schemas/MultitrackProductionCreateRequest'
      discriminator:
        propertyName: is_multitrack
        mapping:
          "false": '#/components/schemas/SingletrackProductionCreateRequest'
          "true": '#/components/schemas/MultitrackProductionCreateRequest'

    ProductionCreateRequestBase:
      type: object
      description: Common fields for creating or updating a production
      properties:
        preset:
          type: string
          description: "UUID of preset to use as template. See the [preset documentation](https://auphonic.com/help/api/complex.html) for details."
        input_file:
          type: string
          description: URL of input file (HTTP, or filename on external service)
        service:
          type: string
          description: "UUID of external service for input file. See the [external services documentation](https://auphonic.com/help/api/complex.html#upload-files-with-external-services-sftp-ftp-dropbox-etc) for details."
        metadata:
          description: "Audio metadata. See the [metadata documentation](https://auphonic.com/help/api/details.html#create-a-production-with-detailed-audio-metadata) for details."
          allOf:
            - $ref: '#/components/schemas/MetadataRequest'
        output_files:
          type: array
          description: "Output file formats. See the [output files documentation](https://auphonic.com/help/api/details.html#output-files) for details."
          items:
            $ref: '#/components/schemas/OutputFileRequest'
        outgoing_services:
          type: array
          description: "Outgoing file transfers. See the [outgoing services documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details."
          items:
            $ref: '#/components/schemas/OutgoingServiceRequest'
        review_before_publishing:
          type: boolean
          description: "Require review before publishing results to outgoing services. If true and outgoing_services are set, the production will enter review state after processing."
          default: false
        chapters:
          type: array
          description: |
            Chapter marks for the production. Each chapter requires a start time and title.
            Chapter times must be relative to the main input file — intro length is added automatically.
            Alternatively, pass a URL string pointing to a chapters text file.
            See the [chapters documentation](https://auphonic.com/help/api/complex.html#adding-chapters) for details.
          items:
            $ref: '#/components/schemas/ChapterRequest'
        output_basename:
          type: string
          description: Basename for output filenames. Combined with suffix and ending to form the full filename.
        speech_recognition:
          description: "Speech recognition configuration. Output formats (subtitle, speech, transcript) should be defined in output_files instead. See the [speech recognition documentation](https://auphonic.com/help/api/details.html#adding-speech-recognition) for details."
          allOf:
            - $ref: '#/components/schemas/SpeechRecognitionRequest'
        webhook:
          type: string
          format: uri
          description: "Webhook callback URL. After processing, Auphonic sends an HTTP POST with `uuid`, `status` (3=Done, 2=Error), and `status_string`. First tries application/x-www-form-urlencoded, retries with multipart/form-data on failure. See [webhook documentation](https://auphonic.com/help/api/webhook.html)."
        image:
          type: string
          description: Cover image URL
        cuts:
          type: array
          description: "Audio cuts as [[start, end], ...] in seconds. Cut times must be relative to the main input file. See the [cuts documentation](https://auphonic.com/help/api/details.html#adding-cuts) for details."
          items:
            type: array
            items:
              type: number
            minItems: 2
            maxItems: 2
        cut_start:
          type: number
          description: "Cut from start of audio in seconds. Removes audio before this point."
        cut_end:
          type: number
          description: "Cut from end of audio in seconds. Removes audio after this point."
        action:
          type: string
          enum: [start, save]
          description: "Set to \"start\" to begin processing immediately, or \"save\" (or omit) to just save. See the [upload documentation](https://auphonic.com/help/api/complex.html#upload-files-with-http) for details."
        reset_data:
          type: boolean
          description: "Reset all production data before applying changes. Clears metadata, chapters, output files, services, intros/outros — but NOT the input file. See the [update documentation](https://auphonic.com/help/api/update.html) for details."
        reset_cover_image:
          type: boolean
          description: "Remove the cover image. See the [cover image documentation](https://auphonic.com/help/api/update.html#delete-a-cover-image) for details."
        preset_cover_image:
          type: string
          description: "UUID of preset to copy cover image from. See the [preset cover image documentation](https://auphonic.com/help/api/update.html#use-a-cover-image-from-a-preset) for details."

    SingletrackProductionCreateRequest:
      allOf:
        - type: object
          description: Request body for creating or updating a singletrack production
          properties:
            is_multitrack:
              type: boolean
              description: "Must be false or omitted for singletrack productions. **Use this selector to switch between Singletrack and Multitrack and see the different parameters for each mode.**"
              enum: [false]
            algorithms:
              $ref: '#/components/schemas/SingletrackAlgorithms'
            multi_input_files:
              type: array
              description: |
                Optional [intro, outro, or insert files](https://auphonic.com/help/api/details.html#adding-intro-and-outro) for singletrack productions.
                Per-track algorithms are not available for singletrack — algorithm settings are only applied at the production level.
              items:
                $ref: '#/components/schemas/SingletrackMultiInputFileRequest'
        - $ref: '#/components/schemas/ProductionCreateRequestBase'

    MultitrackProductionCreateRequest:
      allOf:
        - type: object
          description: Request body for creating or updating a multitrack production
          properties:
            is_multitrack:
              type: boolean
              description: "Must be true for multitrack productions. **Use this selector to switch between Singletrack and Multitrack and see the different parameters for each mode.**"
              enum: [true]
            algorithms:
              $ref: '#/components/schemas/MultitrackMasterAlgorithms'
            multi_input_files:
              type: array
              description: |
                Audio tracks and optional intro/outro files. **Set `type: multitrack` for each audio track** to include it
                in the multitrack mix. Per-track algorithm settings (filtering, denoise, gain, pan, etc.) are set via
                the `algorithms` object on each track.
                See the [intro/outro documentation](https://auphonic.com/help/api/details.html#adding-intro-and-outro) for adding intros/outros.
              items:
                $ref: '#/components/schemas/MultiInputFileRequest'
        - $ref: '#/components/schemas/ProductionCreateRequestBase'

    PresetCreateRequest:
      description: |
        **⬇ Select Singletrack or Multitrack below** to see the relevant request fields for each mode.
        Set `is_multitrack: true` for multitrack presets, or omit/set to `false` for singletrack.
      oneOf:
        - $ref: '#/components/schemas/SingletrackPresetCreateRequest'
        - $ref: '#/components/schemas/MultitrackPresetCreateRequest'
      discriminator:
        propertyName: is_multitrack
        mapping:
          "false": '#/components/schemas/SingletrackPresetCreateRequest'
          "true": '#/components/schemas/MultitrackPresetCreateRequest'

    PresetCreateRequestBase:
      type: object
      description: Common fields for creating or updating a preset
      properties:
        preset_name:
          type: string
          description: Name of the preset (required for creation)
        metadata:
          description: "Audio metadata. See the [metadata documentation](https://auphonic.com/help/api/details.html#create-a-production-with-detailed-audio-metadata) for details."
          allOf:
            - $ref: '#/components/schemas/MetadataRequest'
        output_files:
          type: array
          description: "Output file formats. See the [output files documentation](https://auphonic.com/help/api/details.html#output-files) for details."
          items:
            $ref: '#/components/schemas/OutputFileRequest'
        outgoing_services:
          type: array
          description: "Outgoing file transfers. See the [outgoing services documentation](https://auphonic.com/help/api/details.html#outgoing-file-transfers) for details."
          items:
            $ref: '#/components/schemas/OutgoingServiceRequest'
        review_before_publishing:
          type: boolean
          description: "Require review before publishing results to outgoing services"
          default: false
        output_basename:
          type: string
          description: Basename for output filenames
        speech_recognition:
          description: "Speech recognition configuration. Output formats (subtitle, speech, transcript) should be defined in output_files instead. See the [speech recognition documentation](https://auphonic.com/help/api/details.html#adding-speech-recognition) for details."
          allOf:
            - $ref: '#/components/schemas/SpeechRecognitionRequest'
        webhook:
          type: string
          format: uri
          description: "Webhook callback URL. After processing, Auphonic sends an HTTP POST with `uuid`, `status` (3=Done, 2=Error), and `status_string`. First tries application/x-www-form-urlencoded, retries with multipart/form-data on failure. See [webhook documentation](https://auphonic.com/help/api/webhook.html)."
        image:
          type: string
          description: Cover image URL

    SingletrackPresetCreateRequest:
      allOf:
        - type: object
          description: Request body for creating or updating a singletrack preset
          properties:
            is_multitrack:
              type: boolean
              description: "Must be false or omitted for singletrack presets. **Use this selector to switch between Singletrack and Multitrack and see the different parameters for each mode.**"
              enum: [false]
            algorithms:
              $ref: '#/components/schemas/SingletrackAlgorithms'
            multi_input_files:
              type: array
              description: |
                Optional [intro/outro files](https://auphonic.com/help/api/details.html#adding-intro-and-outro). Intros/outros in presets require external services.
                Per-track algorithms are not available for singletrack — algorithm settings are only applied at the production level.
              items:
                $ref: '#/components/schemas/SingletrackMultiInputFileRequest'
        - $ref: '#/components/schemas/PresetCreateRequestBase'

    MultitrackPresetCreateRequest:
      allOf:
        - type: object
          description: Request body for creating or updating a multitrack preset
          properties:
            is_multitrack:
              type: boolean
              description: "Must be true for multitrack presets. **Use this selector to switch between Singletrack and Multitrack and see the different parameters for each mode.**"
              enum: [true]
            algorithms:
              $ref: '#/components/schemas/MultitrackMasterAlgorithms'
            multi_input_files:
              type: array
              description: |
                Audio tracks and optional intro/outro files. **Set `type: multitrack` for each audio track** to include it
                in the multitrack mix. Per-track algorithm settings (filtering, denoise, gain, pan, etc.) are set via
                the `algorithms` object on each track.
                See the [intro/outro documentation](https://auphonic.com/help/api/details.html#adding-intro-and-outro) for adding intros/outros.
                Intros/outros in presets require external services.
              items:
                $ref: '#/components/schemas/MultiInputFileRequest'
        - $ref: '#/components/schemas/PresetCreateRequestBase'

    MetadataRequest:
      type: object
      description: Audio metadata fields (all optional, supports variable substitution)
      properties:
        title:
          type: string
        artist:
          type: string
        album:
          type: string
        track:
          type: integer
        subtitle:
          type: string
        summary:
          type: string
        genre:
          type: string
        year:
          type: integer
        publisher:
          type: string
        url:
          type: string
          format: uri
        license:
          type: string
        license_url:
          type: string
          format: uri
        tags:
          type: array
          items:
            type: string
        append_chapters:
          type: boolean
        location:
          type: object
          properties:
            latitude:
              type: string
            longitude:
              type: string

    OutputFileRequest:
      type: object
      required:
        - format
      properties:
        format:
          type: string
          description: |
            Output format. Audio: mp3, mp3-vbr, aac (M4A/MP4), vorbis (OGG), opus, flac, alac, wav, wav-24bit.
            Video: video (same format as input), audiogram (waveform video).
            Other: input (original file), descr (production description), stats (processing statistics),
            chaps (chapter marks txt), psc (Podlove Simple Chapters), pod2chaps (Podcasting 2.0 Chapters JSON),
            cut-list (filler/silence cut list), image (cover image), tracks (individual multitrack tracks as zip).
            Speech recognition: speech (data as json/xml), subtitle (srt/webvtt), transcript (html/txt).
          enum: [mp3, mp3-vbr, aac, vorbis, opus, flac, alac, wav, wav-24bit, video, audiogram, input, descr, stats, chaps, psc, pod2chaps, cut-list, image, tracks, speech, subtitle, transcript]
        bitrate:
          type: integer
          description: "Bitrate in kbps (for lossy formats). If not set, the default bitrate for the format is used. Query available bitrates via /api/info/output_files.json."
        mono_mixdown:
          type: boolean
          description: Create a mono mixdown of the output
          default: false
        split_on_chapters:
          type: boolean
          description: Split the output file on chapter marks
          default: false
        suffix:
          type: string
          description: "Suffix added before file extension (e.g. '-small' → 'basename-small.mp3')"
        ending:
          type: string
          description: "File extension override (e.g. 'm4a' for AAC, 'wav.zip' or 'flac.zip' for tracks format, 'ReaperRegions.csv' or 'DaVinciResolve.edl' for cut-list)"
        filename:
          type: string
          description: Full output filename override (must have correct extension). Takes priority over suffix/ending/output_basename.
        outgoing_services:
          type: array
          description: UUIDs of outgoing services to send this file to. If not set, all output files are sent to all services.
          items:
            type: string

    ChapterRequest:
      type: object
      required:
        - start
        - title
      properties:
        start:
          type: string
          description: "Start time as HH:MM:SS[.mmm]"
          example: "00:02:18"
        title:
          type: string
        url:
          type: string
        image:
          type: string
          description: Chapter image as URL or base64-encoded data

    AlgorithmsRequest:
      description: |
        **⬇ Select Singletrack or Multitrack below** to see the algorithm parameters for each mode.
      oneOf:
        - $ref: '#/components/schemas/SingletrackAlgorithms'
        - $ref: '#/components/schemas/MultitrackMasterAlgorithms'

    OutgoingServiceRequest:
      type: object
      required:
        - uuid
      properties:
        uuid:
          type: string
          description: UUID of the external service
        # Service-specific optional parameters
        sharing:
          type: string
          description: "SoundCloud/Spreaker: public or private"
        downloadable:
          type: boolean
          description: "SoundCloud/Spreaker: allow downloads"
        track_type:
          type: string
          description: "SoundCloud: track type"
        privacy:
          type: string
          description: "YouTube: public or private"
        category:
          type: string
          description: "YouTube: video category"
        distribution:
          type: string
          description: "Facebook: everywhere, no_story, or secret"
        embeddable:
          type: boolean
          description: "Facebook: allow embedding"
        draft:
          type: boolean
          description: "Captivate/PodBean: save as draft"
        type:
          type: string
          description: "Captivate: episode type (normal, trailer, bonus). PodBean: episode type (public, premium, private)"
        show:
          type: string
          description: "Spreaker: show name"
        podcast:
          type: string
          description: "RSS.com: podcast identifier"

    SingletrackMultiInputFileRequest:
      type: object
      description: |
        An intro, outro, or insert file for singletrack productions.
        See the [intro/outro documentation](https://auphonic.com/help/api/details.html#adding-intro-and-outro) for details.
      required:
        - type
      properties:
        type:
          type: string
          description: |
            Type of input file. See the [intro/outro documentation](https://auphonic.com/help/api/details.html#adding-intro-and-outro) for details.
            intro: played before main audio. outro: played after main audio. insert: inserted at offset position.
          enum: [intro, outro, insert]
        id:
          type: string
          description: "Identifier for the file. Used as form field name for direct file upload."
        input_file:
          type: string
          description: Filename on external service or HTTP URL
        service:
          type: string
          description: UUID of external service for the input file
        offset:
          type: number
          description: "Offset in seconds. For intro: overlap with next audio. For outro: overlap with previous audio. For insert: position in main audio file."

    MultiInputFileRequest:
      type: object
      description: |
        A multitrack track, intro, outro, or insert file.
        **Use `type: multitrack` for each individual audio track** in a multitrack production.
        See the [intro/outro documentation](https://auphonic.com/help/api/details.html#adding-intro-and-outro) for details on intros/outros.
      required:
        - type
      properties:
        type:
          type: string
          description: |
            **Use `multitrack` to add an audio track** to the multitrack mix (e.g. a speaker microphone or music track).
            intro/outro: played before/after main audio (see [intro/outro documentation](https://auphonic.com/help/api/details.html#adding-intro-and-outro)).
            insert: inserted at offset position.
          enum: [intro, outro, insert, multitrack]
        id:
          type: string
          description: "Identifier for the track. Used as form field name for direct file upload, and as a readable label for multitrack tracks."
        input_file:
          type: string
          description: Filename on external service or HTTP URL
        service:
          type: string
          description: UUID of external service for the input file
        offset:
          type: number
          description: "Offset in seconds. For multitrack: when the track starts (0 = aligned with first track). For intro: overlap with next audio. For outro: overlap with previous audio. For insert: position in main audio file."
        algorithms:
          $ref: '#/components/schemas/TrackAlgorithms'

    SpeechRecognitionRequest:
      type: object
      description: |
        Speech recognition configuration. For external services (Google, Amazon, Speechmatics), provide `uuid`.
        For Auphonic Whisper (restricted to paying users), omit `uuid` and provide `language`.

        **Note:** Speech recognition output formats (subtitle, speech, transcript) are defined via
        `output_files`, not here. Add an output file with the appropriate format (e.g. `subtitle`, `speech`, `transcript`)
        to get the desired output.
      properties:
        uuid:
          type: string
          description: UUID of external speech recognition service (omit for Auphonic Whisper)
        language:
          type: string
          description: |
            Language code for speech recognition. Required. Use `auto` for automatic language detection.

            **Whisper (built-in):** Uses ISO 639-1 two-letter codes.
            Available: auto, af, am, ar, as, az, ba, be, bg, bn, bo, br, bs, ca, cs, cy, da, de, el, en, es, et, eu, fa, fi, fo, fr, gl, gu, ha, haw, he, hi, hr, ht, hu, hy, id, is, it, ja, jw, ka, kk, km, kn, ko, la, lb, ln, lo, lt, lv, mg, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, nn, no, oc, pa, pl, ps, pt, ro, ru, sa, sd, si, sk, sl, sn, so, sq, sr, su, sv, sw, ta, te, tg, th, tk, tl, tr, tt, uk, ur, uz, vi, yi, yo.

            **External services** (Google, Amazon, Speechmatics): May use locale codes (e.g. en-US, de-DE).
        keywords:
          type: array
          items:
            type: string
          description: Keywords and phrases to improve recognition accuracy
        shownotes:
          type: boolean
          description: "Enable automatic shownotes and chapter generation (restricted to paying users)"
        shownotes_summary_example:
          type: string
          description: Example summary to guide shownotes generation style
        speaker_diarization_num_speakers:
          type: integer
          nullable: true
          description: Number of speakers for speaker diarization (Whisper only)
        speaker_diarization_names:
          type: array
          nullable: true
          items:
            type: string
          description: Speaker names for speaker diarization (Whisper only)

    Segment:
      type: object
      description: |
        A segment defines unique noise reduction settings for a specific time range of the audio.
        Segments must be contiguous: no gaps or overlaps, and each segment's start must equal the previous segment's stop.
      required:
        - start
        - stop
      properties:
        start:
          type: number
          description: Segment start time in seconds (must be >= 0)
        stop:
          type: number
          description: Segment end time in seconds (must be > start)
        denoisemethod:
          type: string
          description: "Noise reduction method for this segment. speech: removes everything except speech. music: preserves speech/music/effects, removes noise. classic: classic noise reduction. off: disable noise reduction."
          enum: [speech, music, classic, "off"]
        denoiseamount:
          type: integer
          description: "Noise reduction amount in dB for this segment (0=full/auto, -1=off). Available for speech, music, classic."
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        deverbamount:
          type: integer
          description: "Reverb reduction amount in dB for this segment (0=full/auto, -1=off). Available for speech and music methods."
          enum: [0, -1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        debreathamount:
          type: integer
          description: "Breath reduction amount in dB for this segment (-1=off). Available for speech method only."
          enum: [-1, 3, 6, 9, 12, 15, 18, 24, 30, 36, 100]
        filtermethod:
          type: string
          description: "Filter method for this segment. Set to 'off' to disable filtering for this segment."
          enum: [hipfilter, autoeq, bwe, "off"]

    SegmentsRequest:
      type: object
      properties:
        algorithms:
          type: object
          properties:
            segments:
              type: array
              items:
                $ref: '#/components/schemas/Segment'

    CutsRequest:
      type: object
      properties:
        cuts:
          type: array
          description: "List of cuts as [start_time, end_time] arrays in seconds"
          items:
            type: array
            items:
              type: number
            minItems: 2
            maxItems: 2
          example: [[1.5, 2.1], [10.24, 10.48]]
