Berget AI Audio API

Audio processing endpoints including transcription services

GitHub OpenAPI

Operations 2

POST /v1/audio/transcriptions File transcription #
GET /v1/realtime Realtime transcription #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/berget-ai:berget-ai-audio-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

berget-ai-audio-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Berget Ai Audio API
  version: 1.0.0
  contact:
    name: Berget AI Support
    email: support@berget.ai
    url: https://berget.ai/support
  license:
    name: Proprietary
    url: https://berget.ai/terms
  description: 'Operations tagged Audio across 2 of this provider''s published API definitions: berget-ai-openapi.json, berget-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.berget.ai
  description: Production API
- url: https://api.stage.berget.ai
  description: Stage API
tags:
- name: Audio
  description: Audio processing endpoints including transcription services
paths:
  /v1/audio/transcriptions:
    post:
      operationId: createTranscription
      summary: File transcription
      tags:
      - Audio
      description: 'Transcribes audio into the input language. OpenAI-compatible; WhisperX-specific options (align, diarize, speaker_embeddings) are supported as extensions.


        Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm.


        ## Response


        With `response_format=verbose_json` the response follows the OpenAI shape: `text`, `duration`, `language`, and a flat `segments` array (each `{ id, start, end, text, speaker? }`). When word timestamps are available they are returned as a flat `words` array. Segments are **not** nested under `segments.segments`.


        ## Quick Start


        ```bash

        curl -X POST https://api.berget.ai/v1/audio/transcriptions \

        -H "Authorization: Bearer YOUR_API_KEY" \

        -F file=@audio.mp3 \

        -F model=KBLab/kb-whisper-large

        ```


        ## WhisperX Features


        ### Word-Level Timestamps (align)

        Enable `align=true` for precise word timing. Required for subtitle formats (srt, vtt).


        ### Speaker Diarization (diarize)

        Enable `diarize=true` to identify and separate different speakers.


        ### Speaker Embeddings

        Enable `speaker_embeddings=true` to include speaker identity vectors.'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  description: The audio file to transcribe (binary)
                model:
                  description: ID of the model to use
                  type: string
                language:
                  description: ISO-639-1 language code
                  type: string
                prompt:
                  description: Optional text to steer transcription style
                  type: string
                response_format:
                  description: Output format
                  type: string
                temperature:
                  description: Sampling temperature (0–1)
                  type: string
                timestamp_granularities:
                  description: Granularities CSV
                  type: string
                include:
                  description: Extra data to include
                  type: string
                stream:
                  description: Stream via SSE
                  type: string
                chunking_strategy:
                  type: string
                known_speaker_names:
                  type: string
                known_speaker_references:
                  type: string
                align:
                  type: string
                diarize:
                  type: string
                speaker_embeddings:
                  type: string
                highlight_words:
                  type: string
                suppress_numerals:
                  type: string
                hotwords:
                  type: string
                batch_size:
                  type: string
                chunk_size:
                  type: string
      security:
      - BearerAuth: []
      responses:
        '200':
          description: Transcription response. `verbose_json`/`diarized_json` return the verbose object with a flat `segments` array (each `{ id, start, end, text, speaker? }`), plus `text`, `duration`, `language`, and a flat `words` array when available. `json` returns `{ text }`; text/srt/vtt return a string.
          content:
            application/json:
              schema:
                anyOf:
                - type: string
                description: Transcription response. `verbose_json`/`diarized_json` return the verbose object with a flat `segments` array (each `{ id, start, end, text, speaker? }`), plus `text`, `duration`, `language`, and a flat `words` array when available. `json` returns `{ text }`; text/srt/vtt return a string.
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Invalid request
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Authentication error
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Model not found
        '413':
          description: Audio file too large
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Audio file too large
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Rate limit exceeded
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Server error
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error message
                      type:
                        type: string
                        description: Error type (e.g. "invalid_request_error")
                      param:
                        description: The parameter that caused the error
                        type:
                        - string
                        - 'null'
                      code:
                        description: Error code
                        type:
                        - string
                        - 'null'
                    required:
                    - message
                    - type
                    - code
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
                description: Service unavailable
    servers:
    - url: https://api.berget.ai
      description: Production API
    - url: https://api.stage.berget.ai
      description: Stage API
  /v1/realtime:
    get:
      tags:
      - Audio
      summary: Realtime transcription
      description: 'Stream live audio and receive transcript deltas as speech arrives, plus a

        final transcript when you commit a turn. **OpenAI Realtime API (GA)

        compatible** — the official OpenAI SDK works as a drop-in: point its base

        URL at our host and use your Berget API key. This is a **WebSocket** endpoint; it is documented here as a GET for

        readability. Upgrading the connection returns `101 Switching Protocols`. ## Connect


        ```

        wss://api.berget.ai/v1/realtime?intent=transcription

        Authorization: Bearer

        ```


        ## Quick start


        ```javascript

        // Configure the session (GA shape)

        ws.send(JSON.stringify({

        type: ''session.update'',

        session: {

        type: ''transcription'',

        audio: {

        input: {

        format: { type: ''audio/pcm'', rate: 24000 },

        transcription: { model: ''klang/pianissimo'', languages: [''sv''], chunk_seconds: 3 }

        }

        }

        }

        }))


        // Stream audio: base64-encoded PCM16 little-endian, mono

        ws.send(JSON.stringify({ type: ''input_audio_buffer.append'', audio: '''' }))


        // Finish the turn — not needed with server VAD (see Compatibility notes)

        ws.send(JSON.stringify({ type: ''input_audio_buffer.commit'' }))

        ```


        With server VAD enabled (`session.audio.input.turn_detection:

        { type: ''server_vad'' }`, see Compatibility notes below), turns are committed

        automatically on speech pauses and the explicit commit above is not needed. ## Client → Server events


        | Event | Purpose |

        |---|---|

        | `session.update` | Configure the session (model, languages, chunk_seconds, turn_detection). |

        | `input_audio_buffer.append` | Append base64 audio in the session format (PCM16 or G.711; any chunking, e.g. every 100 ms). |

        | `input_audio_buffer.commit` | Finish the current turn manually (not needed with server_vad). Empty buffer errors `code: ''input_audio_buffer_commit_empty''`. |


        ## Server → Client events


        | Event | Purpose |

        |---|---|

        | `session.created` / `session.updated` | Full, effective session configuration. `session.id` has a `sess_` prefix. |

        | `conversation.created` | Conversation container (`conv_` id), emitted right after `session.created`. |

        | `input_audio_buffer.committed` | A turn was accepted; `previous_item_id` links the item chain. |

        | `conversation.item.created` | A new transcription item was created for the turn. |

        | `input_audio_buffer.cleared` | The buffer was emptied by a client `input_audio_buffer.clear`. |

        | `input_audio_buffer.speech_started` / `input_audio_buffer.speech_stopped` | Server-side VAD detected speech start/stop (server_vad mode), carrying `audio_start_ms` / `audio_end_ms` and `item_id`. |

        | `conversation.item.input_audio_transcription.delta` | Incremental transcript text for the current turn, in strict audio order. |

        | `conversation.item.input_audio_transcription.completed` | Final transcript for the turn, with `usage: { type: ''duration'', seconds }`. |

        | `conversation.item.input_audio_transcription.failed` | An item-scoped transcription failure. |

        | `error` | Error object: `{ type, code, message, param }` — errors caused by one of your events also echo back its `event_id`. |


        ## Berget extensions


        These follow OpenAI''s format and are ignored by stock clients:


        | Field | Meaning |

        |---|---|

        | `chunk_id` (on deltas) | Strictly ascending chunk identifier. Deltas arrive in strict audio order; `completed` is the final transcript. |

        | `chunk_seconds` (session config) | Target seconds of speech per server-side segment (~latency/accuracy tradeoff). **Must be set under `session.audio.input.transcription.chunk_seconds`** (not under `session.audio.input`); fields placed at the wrong level are silently ignored. Default: **3** seconds for `klang/pianissimo` (lower = faster partials, slightly more per-segment context loss). |


        > `prompt`, `temperature` and `keywords` (OpenAI/Whisper tuning params)

        > are not supported on this model and are ignored. ## Compatibility notes


        - **Model**: `klang/pianissimo`

        - **`turn_detection`**: set it under `session.audio.input.turn_detection`.'
      security:
      - BearerAuth: []
      parameters:
      - name: intent
        in: query
        required: true
        schema:
          type: string
          enum:
          - transcription
        description: Session intent. Only `transcription` is supported.
      responses:
        '101':
          description: Switching Protocols — the WebSocket upgrade succeeded; the session protocol above applies from here.
        '401':
          description: Unauthorized — missing or invalid API key / token.
      operationId: getV1Realtime
      x-operation-id-source: derived
    servers:
    - url: https://api.berget.ai
      description: Production API
    - url: https://api.stage.berget.ai
      description: Stage API
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API key
      description: 'Bearer token or API key. Pass either a JWT token or an API key (sk_ber_*) in the Authorization header as: Bearer <token>'
x-refined-from:
- berget-ai-openapi.json
- berget-ai-openapi.yml