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

# Get Conversation Audio

> Stream or download the audio recording of a specific conversation

## Overview

Retrieve the audio recording of a completed conversation as a binary stream. The response body contains the raw audio data (`audio/mpeg`) which can be streamed directly to an audio player, downloaded as an MP3, or processed programmatically for transcription or archiving.

## Required Permission

`conversations`

## Path Parameters

| Name             | Type   | Required | Description                            |
| ---------------- | ------ | -------- | -------------------------------------- |
| `conversationId` | string | Yes      | Unique identifier of the conversation. |

## Response

### Success (200)

Returns the audio recording as a binary stream with `Content-Type: audio/mpeg`. The response body is the raw MP3 data.

### Error Responses

**403 Forbidden** - Insufficient permissions

```json theme={null}
{
  "status": "failure",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "User does not have access to this conversation"
}
```

**404 Not Found** - Audio recording not available

```json theme={null}
{
  "status": "failure",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Audio URL not found"
}
```

## Example Usage

### Download as MP3 (cURL)

```bash theme={null}
curl -H "x-api-key: <your_api_key>" \
  "https://api.inya.ai/platform/v1/conversations/conv_abc123/audio" \
  --output conversation.mp3
```

### Stream and Play (JavaScript)

```javascript theme={null}
const response = await fetch(
  'https://api.inya.ai/platform/v1/conversations/conv_abc123/audio',
  { headers: { 'x-api-key': '<your_api_key>' } }
);
const blob = await response.blob();
const audioUrl = URL.createObjectURL(blob);
const audio = new Audio(audioUrl);
audio.play();
```

### Stream and Save (Python)

```python theme={null}
import requests

response = requests.get(
  'https://api.inya.ai/platform/v1/conversations/conv_abc123/audio',
  headers={'x-api-key': '<your_api_key>'},
  stream=True
)
with open('conversation.mp3', 'wb') as f:
    for chunk in response.iter_content(chunk_size=8192):
        f.write(chunk)
```

## Use Cases

* Downloading conversation recordings for quality assurance and coaching
* Archiving recordings for compliance and audit requirements
* Feeding recordings into transcription or sentiment analysis pipelines
* Sharing specific calls with team members for review

<Warning>
  Audio recordings may contain sensitive personal information. Ensure proper access controls are in place and comply with applicable data privacy regulations (e.g. GDPR, DPDP Act) before storing or sharing recordings.
</Warning>

<Note>
  Audio availability depends on your recording settings. If recording is disabled for an agent, or the conversation was too short, this endpoint will return a 404 error.
</Note>

<Note>
  Save the `requestId` from every response. You will need it if you contact Inya support to trace a specific request.
</Note>


## OpenAPI

````yaml GET /v1/conversations/{conversationId}/audio
openapi: 3.0.3
info:
  title: Platform Agents API
  description: API endpoints for creating, managing, and interacting with voice agents
  version: 2.1.0
servers:
  - url: https://api.inya.ai/platform
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Agent management operations
  - name: AgentFAQ
    description: Agent FAQ management
  - name: AgentCallTriggers
    description: Outbound call triggers
  - name: ChatSDK
    description: Chat Widget configuration
  - name: Conversations
    description: Conversation logs, statistics, and audio
paths:
  /v1/conversations/{conversationId}/audio:
    get:
      tags:
        - Conversations
      summary: Stream Conversation Audio
      description: >-
        Stream or download the audio recording of a completed conversation as an
        MP3 file.
      operationId: streamConversationAudio
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the conversation.
      responses:
        '200':
          description: Audio recording returned as a binary stream
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - ConversationsApiKeyAuth: []
components:
  responses:
    Forbidden:
      description: Permission denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        requestId:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with 'agents' permission
    ConversationsApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with 'conversations' permission

````