> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olimi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Regenerate a transcript

> Transcribes the same recording again, optionally into a different language.

Transcribes the same recording again, without uploading it again. Use it after a `failed` result, or to translate into a different language.

* **Either ID works:** the transcript's `id` or the file's `attachmentId`.
* **Status goes back to `pending`.** Poll [Get a transcript](https://docs.olimi.ai/api-reference/endpoint/speech/get-stt.md) until it's `completed` or `failed`. The previous transcript stays in `transcript` until the new one is ready, then it's replaced.
* **Language:** send `languageId` to translate into a different language. Leave it out to keep the current setting. Once a transcript has a target language, you can't switch translation off.


## OpenAPI

````yaml post /api/v2/stt/{id}/regenerate
openapi: 3.0.1
info:
  title: Customer Management API
  description: API for managing customer lists and customers within those lists
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-eg.olimi.ai
security:
  - bearerAuth: []
paths:
  /api/v2/stt/{id}/regenerate:
    post:
      tags:
        - Speech to Text
      summary: Regenerate a transcript
      description: >-
        Transcribes the same recording again, optionally into a different
        language.
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The transcript's `id`. The `attachmentId` from Upload also works
            here.
          schema:
            type: string
            format: uuid
          example: 99e12fe7-e8ed-4c61-be38-3f9786662f21
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                languageId:
                  type: string
                  format: uuid
                  description: >-
                    Translate into this language. Leave it out to keep the
                    current setting.
                  example: cd2d9868-1910-40bf-88f7-c490483ac01a
      responses:
        '200':
          description: Transcription started again. Poll Get a transcript.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SttRegenerateResponse'
        '400':
          description: >-
            No transcript or file with that `id` belongs to your company,
            `languageId` doesn't exist, or transcription couldn't be started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NestBadRequest'
        '401':
          description: The `X-API-KEY` header is missing or the key isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - apiKeyAuth: []
components:
  schemas:
    SttRegenerateResponse:
      type: object
      properties:
        message:
          type: string
          example: Transcription regenerated successfully
        data:
          type: object
          properties:
            attachmentId:
              type: string
              format: uuid
              example: 3c63b9cd-208b-498e-a644-6f1d8aa158a1
    NestBadRequest:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: string
          example: No audio files provided
        error:
          type: string
          example: Bad Request
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: string
          description: Machine-readable error code.
          example: agent_not_found
        message:
          type: string
          description: Human-readable text. May change; don't match on it.
          example: Agent not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.