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

# AI Proxy audio compression with x-bt-compress-audio

export const plans_0 = "Any"

export const deployments_0 = "Any"

export const data_plane_version_0 = undefined

export const use_case_0 = undefined

<Note>
  **Applies to:**

  * Plan - {plans_0}
  * Deployment - {deployments_0}
  * {data_plane_version_0}
  * {use_case_0}
</Note>

## Summary

The `x-bt-compress-audio` header controls audio storage format in Braintrust logs without affecting real-time audio quality between clients and OpenAI. Audio compression occurs at storage time, not proxy time, meaning the proxy passes audio data unmodified while only compressing what gets stored in Braintrust for cost optimization.

## How It Works

When using the `x-bt-compress-audio` header with OpenAI Realtime API requests through the Braintrust AI Proxy, audio compression happens after network capture but before writing to storage. The audio flow works as follows:

* **Client ↔ Proxy ↔ OpenAI:** Uncompressed audio (no quality or latency impact)
* **Proxy → Braintrust Storage:** Compressed as MP3 when header is present, otherwise stored as WAV

This means real-time audio quality and latency remain unchanged for end users, while storage costs can be reduced by using compressed audio logs. Omitting the header stores uncompressed WAV files for higher fidelity log analysis.
