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

# Audio Transcription

> Transcribe audio files to text over the encrypted API, step by step.

The current catalogue exposes one audio-transcription model: `deepgram/general-nova-3`. Its response uses Deepgram-style `metadata` and `results` fields.

## Basic audio transcription

```typescript theme={"system"}
import { createReadStream } from "node:fs";
import { createRvencClient } from "@premai/api-sdk";

async function main() {
  const apiKey = process.env.PREM_API_KEY;
  const clientKEK = process.env.CLIENT_KEK;
  if (!apiKey || !clientKEK) {
    throw new Error("Set PREM_API_KEY and CLIENT_KEK");
  }

  const client = await createRvencClient({ apiKey, clientKEK });
  const transcription = await client.audio.transcriptions.create({
    file: createReadStream("./audio.wav"),
    model: "deepgram/general-nova-3",
    smart_format: true,
  });

  const alternative = transcription.results?.channels?.[0]?.alternatives?.[0];
  console.log(alternative?.transcript ?? "");
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});
```

For this model, use `diarize` and `smart_format`. The SDK does not send Whisper-specific fields such as `language`, `prompt`, `response_format`, or `timestamp_granularities` when the model ID starts with `deepgram/`.

## Response shape

The response contains:

* `metadata.request_id`, duration, channel count, and resolved Deepgram model information;
* `results.channels[].alternatives[].transcript`;
* confidence and word timing data when the backend returns them.

Do not read `transcription.text` for `deepgram/general-nova-3`; that field is not part of the current response.

## Proxy request

Start the OpenAI-compatible proxy with an explicit KEK:

```bash theme={"system"}
npx -p @premai/api-sdk@1.0.59 confidential-proxy \
  --compat openai \
  --kek "$CLIENT_KEK"
```

Then send multipart audio:

```bash theme={"system"}
curl http://127.0.0.1:8787/v1/audio/transcriptions \
  -H "Authorization: Bearer $PREM_API_KEY" \
  -F "file=@audio.wav" \
  -F "model=deepgram/general-nova-3"
```

The proxy currently returns the same Deepgram-style JSON object. It does not normalize it into OpenAI's `{ "text": "..." }` shape.

## Current limits

* This route is non-streaming.
* The proxy accepts files up to 25 MB.
* `openai/whisper-large-v3` is not a documented runnable model for this route.
* Verify a production audio format with your own representative fixture before rollout.
