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

# Get a transcript

> Returns one transcript. Poll it until `status` is `completed` or `failed`.

Poll this every few seconds until `status` is `completed` or `failed`. See [Status values](https://docs.olimi.ai/api-reference/endpoint/speech/speech-to-text.md#status-values).

> [!WARNING]
>
> Use the transcript's `id`, not the `attachmentId` that Upload returns. An `attachmentId` returns `404` `stt_record_not_found`.


## OpenAPI

````yaml get /api/v2/stt/{id}
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}:
    get:
      tags:
        - Speech to Text
      summary: Get a transcript
      description: >-
        Returns one transcript. Poll it until `status` is `completed` or
        `failed`.
      parameters:
        - name: id
          in: path
          required: true
          description: The transcript's `id` (not the `attachmentId` Upload returns).
          schema:
            type: string
            format: uuid
          example: 99e12fe7-e8ed-4c61-be38-3f9786662f21
      responses:
        '200':
          description: The transcript.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SttRecordResponse'
        '400':
          description: '`id` isn''t a valid UUID.'
        '401':
          description: The `X-API-KEY` header is missing or the key isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            `stt_record_not_found`: no transcript with that `id` belongs to your
            company, or it was deleted. Upload's `attachmentIds` also give this;
            use the transcript's `id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - apiKeyAuth: []
components:
  schemas:
    SttRecordResponse:
      type: object
      properties:
        message:
          type: string
          example: Speech-to-text record fetched successfully
        data:
          $ref: '#/components/schemas/SttRecord'
    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
    SttRecord:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The transcript's ID. Use it with Get, Regenerate and Delete.
          example: 99e12fe7-e8ed-4c61-be38-3f9786662f21
        attachmentId:
          type: string
          format: uuid
          description: The uploaded file's ID. This is what Upload returns.
          example: 3c63b9cd-208b-498e-a644-6f1d8aa158a1
        transcript:
          type: string
          description: >-
            The transcript, one `Speaker N:` turn per paragraph. Empty until the
            first transcription completes; during a regenerate it keeps the
            previous text. See [Transcript
            format](/api-reference/endpoint/speech/speech-to-text#transcript-format).
          example: |-
            Speaker 1: أهلاً بيك، إزيك النهارده؟

            Speaker 2: الحمد لله، كله تمام.
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
          description: >-
            See [Status
            values](/api-reference/endpoint/speech/speech-to-text#status-values).
          example: completed
        failureCode:
          type: string
          nullable: true
          enum:
            - empty_transcript
            - provider_error
            - start_failed
            - transcript_fetch_failed
            - missing_transcription_id
            - legacy_unknown
          description: >-
            Why it failed, when `status` is `failed`. See [Failure
            codes](/api-reference/endpoint/speech/speech-to-text#failure-codes).
          example: null
        targetLanguageId:
          type: string
          format: uuid
          nullable: true
          description: >-
            The language the transcript was translated into. `null` when not
            translated.
          example: null
        targetLanguage:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
              example: English UK
            code:
              type: string
              example: en-GB
          example: null
        attachment:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 3c63b9cd-208b-498e-a644-6f1d8aa158a1
            originalName:
              type: string
              description: The uploaded file's name.
              example: recording.wav
            mimeType:
              type: string
              example: audio/wav
            fileSize:
              type: string
              description: Size in bytes, as a string.
              example: '128684'
        createdAt:
          type: string
          format: date-time
          example: '2026-09-29T08:14:29.741Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-09-29T08:14:35.291Z'
  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.