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

# Get generation audio

> Get a short-lived signed link to the stored audio of one generation, by its id.



## OpenAPI

````yaml api-reference/openapi.json GET /v1/tts/history/{inference_id}/audio
openapi: 3.1.0
info:
  title: Chariot API
  version: '1'
  description: >-
    Chariot is a voice AI platform built for Indian and English languages.
    Convert text into natural-sounding speech over a simple REST call, an HTTP
    audio stream, or a low-latency WebSocket, and transcribe speech to text over
    a streaming WebSocket or from a prerecorded file (Beta). This reference
    documents the public, API-key-authenticated endpoints.
  contact:
    name: Chariot Support
    email: support@chariot.in
    url: https://chariot.in
servers:
  - url: https://api.chariot.in
    description: Production
security:
  - APIKeyHeader: []
tags:
  - name: Text to Speech
    description: Convert text into speech synchronously or as a stream.
  - name: Speech to Text
    description: >-
      Transcribe prerecorded files (Beta) and review streaming speech-to-text
      sessions.
  - name: Voices
    description: Browse the voice catalog.
  - name: Account
    description: Inspect your credit balance and usage.
paths:
  /v1/tts/history/{inference_id}/audio:
    get:
      tags:
        - Text to Speech
      summary: Get generation audio
      description: >-
        Return a short-lived signed link to the stored audio of one generation,
        by its id: the `Inference-Id` header of `POST /v1/tts`, the
        `X-inference-id` header of `POST /v1/tts/stream`, or `inference_id` in
        `GET /v1/tts/history`. This is the recommended way to get audio after
        the response, and it works for every generation in your workspace that
        has stored audio.


        The link is valid for about 15 minutes and never past
        `content_expires_at`. Request a new link whenever you need one instead
        of storing it. Pass `redirect=true` to receive a `302` redirect to the
        link, so `curl -L` or an `<audio src>` works in one step. Responses
        carry `Cache-Control: private, no-store`.


        Audio is stored after the response finishes, so a request made right
        after a generation can return `404` for a few seconds. Returns `404`
        when the generation is not in your workspace or has no stored audio, and
        `410` once its content has expired under your workspace's data retention
        setting.


        **Rate limit:** 600 link requests per workspace per minute. Over that,
        the request returns `429`.
      operationId: getTtsAudio
      parameters:
        - name: inference_id
          in: path
          required: true
          description: The generation's id.
          schema:
            type: string
            format: uuid
        - name: redirect
          in: query
          required: false
          description: >-
            When `true`, respond with `302` and a `Location` header pointing to
            the signed link instead of JSON.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: A signed link to the audio.
          headers:
            Cache-Control:
              description: Always `private, no-store`.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TTSAudioLink'
              examples:
                kept:
                  summary: Kept until deleted
                  value:
                    inference_id: 3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13
                    url: >-
                      https://storage.example.com/tts_audio.wav?signature=REDACTED
                    url_expires_at: '2026-11-02T10:15:00Z'
                    content_expires_at: null
                retention:
                  summary: Under a 7-day retention setting
                  value:
                    inference_id: 3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13
                    url: >-
                      https://storage.example.com/tts_audio.wav?signature=REDACTED
                    url_expires_at: '2026-11-02T10:15:00Z'
                    content_expires_at: '2026-11-09T09:58:12Z'
        '302':
          description: Redirect to the signed link (`redirect=true`).
          headers:
            Location:
              description: The signed link to the audio.
              schema:
                type: string
                format: uri
            Cache-Control:
              description: Always `private, no-store`.
              schema:
                type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            The generation is not in your workspace, or it has no stored audio
            (for example a WebSocket session with `enable_logging=false`, a
            failed generation, or audio that is still being stored).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                error: EntityNotFoundException
                message: No audio for generation 3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13
        '410':
          description: >-
            The generation's content has expired under your workspace's data
            retention setting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 410
                error: ContentExpiredException
                message: >-
                  Audio for generation 3f2c9a71-5b0e-4d7a-9c1e-8a4b6d2f0e13 is
                  no longer retained
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          description: >-
            More than 600 link requests in a minute for your workspace. Retry
            after a minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 429
                error: TooManyRequestsException
                message: Too many audio link requests. Retry in a minute.
      security:
        - APIKeyHeader: []
components:
  schemas:
    TTSAudioLink:
      type: object
      description: A short-lived link to one generation's stored audio.
      required:
        - inference_id
        - url
        - url_expires_at
        - content_expires_at
      properties:
        inference_id:
          type: string
          format: uuid
          description: The generation's id.
        url:
          type: string
          format: uri
          description: >-
            Signed link to the audio as `audio/wav`. Anyone with the link can
            download the audio until it expires, so do not log, cache, or share
            it.
        url_expires_at:
          type: string
          format: date-time
          description: >-
            When this link stops working: about 15 minutes after the request,
            and never later than `content_expires_at`. Request a fresh link
            after it expires.
        content_expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the audio itself expires under your workspace's data retention
            setting. `null` means it is kept until deleted.
    Error:
      type: object
      description: Standard error envelope returned by all endpoints.
      properties:
        statusCode:
          type: integer
          description: HTTP status code, echoed in the body.
        error:
          type: string
          description: Machine-readable error class name.
        message:
          type: string
          description: Human-readable description of what went wrong.
      required:
        - statusCode
        - error
        - message
  responses:
    Unauthorized:
      description: Authentication failed. The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No credentials provided
              value:
                statusCode: 401
                error: UnauthorizedException
                message: No API key or user credentials provided
            invalid:
              summary: Invalid or unknown API key
              value:
                statusCode: 401
                error: UnauthorizedException
                message: Invalid API Key or user credentials
    ValidationError:
      description: >-
        The request failed validation. This includes malformed JSON, missing or
        wrongly typed fields, out-of-range values, and business-rule violations
        such as text length limits or a voice that is not ready for synthesis.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            text_too_long:
              summary: Text over the 500-character limit
              value:
                statusCode: 422
                error: ValidationException
                message: >-
                  Input text of length 812 is more than maximum character count
                  of 500 characters!
            voice_not_ready:
              summary: Voice still processing
              value:
                statusCode: 422
                error: ValidationException
                message: >-
                  Voice 3acc7441-4dce-4245-a365-0bae822c8c30 is not ready for
                  TTS yet!
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: chariotai-api-key
      description: >-
        Your Chariot API key, generated from the dashboard. Send it in the
        `chariotai-api-key` header on every request.

````

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