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

> Returns one audio item, with a download link once it's ready.

Use this to poll audio you've just created until `status` is `completed` or `failed`. See [How it works](https://docs.olimi.ai/api-reference/endpoint/speech/text-to-speech.md#how-it-works).

`attachment.url` is only present once `status` is `completed`. Each call returns a fresh link, valid for one hour.


## OpenAPI

````yaml get /api/v2/tts/{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/tts/{id}:
    get:
      tags:
        - Text to Speech
      summary: Get audio
      description: Returns one audio item, with a download link once it's ready.
      parameters:
        - name: id
          in: path
          required: true
          description: The audio's `id`.
          schema:
            type: string
            format: uuid
          example: 457ede41-97c7-44c6-bdd8-b9e4ca37f812
      responses:
        '200':
          description: The audio.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TtsRecordResponse'
        '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: >-
            `tts_record_not_found`: no audio with that `id` belongs to your
            company.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorTts'
      security:
        - apiKeyAuth: []
components:
  schemas:
    TtsRecordResponse:
      type: object
      properties:
        message:
          type: string
          example: Text-to-speech record fetched successfully
        data:
          $ref: '#/components/schemas/TtsRecord'
    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
    ApiErrorTts:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: string
          example: tts_record_not_found
        message:
          type: string
          example: Text-to-speech record not found
    TtsRecord:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The audio's ID.
          example: 457ede41-97c7-44c6-bdd8-b9e4ca37f812
        name:
          type: string
          description: Your label, or `TTS_<timestamp>` if you didn't send one.
          example: greeting
        input:
          type: string
          description: The text that was spoken.
          example: أهلاً بيك، إزيك النهارده؟
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
          description: >-
            See [Status
            values](/api-reference/endpoint/speech/text-to-speech#status-values).
          example: completed
        duration:
          type: integer
          description: >-
            Length of the audio in seconds, rounded down. `0` until the audio is
            ready.
          example: 2
        responseFormat:
          type: string
          description: 'Always `pcm`: the encoding inside the WAV file.'
          example: pcm
        languageId:
          type: string
          format: uuid
          example: 2cdab2de-310d-59a3-ad68-b85b4526e37b
        voiceId:
          type: string
          format: uuid
          example: 118d2470-de1d-5093-86b3-f2d8adec3183
        attachment:
          $ref: '#/components/schemas/TtsAttachment'
        language:
          type: object
          properties:
            code:
              type: string
              example: ar-EG
            name:
              type: string
              example: Arabic - Egyptian
        voice:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 118d2470-de1d-5093-86b3-f2d8adec3183
            name:
              type: string
              example: Farida
            voiceKey:
              type: string
              example: Kore
        createdAt:
          type: string
          format: date-time
          example: '2026-09-29T09:05:44.045Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-09-29T09:05:47.310Z'
    TtsAttachment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d853213e-03da-49af-8d7b-81a818d1a296
        originalName:
          type: string
          description: 'The file name: your `name` plus `.wav`.'
          example: greeting.wav
        mimeType:
          type: string
          example: audio/wav
        fileSize:
          type: string
          description: Size in bytes, as a string. `0` until the audio is ready.
          example: '128684'
        url:
          type: string
          nullable: true
          description: >-
            A temporary download link. Only present once `status` is
            `completed`; expires after one hour.
          example: >-
            https://<storage-host>/tts/d853213e-03da-49af-8d7b-81a818d1a296?X-Amz-Expires=3600&X-Amz-Signature=…
  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.