# Audio to LLM

Last updated: 2026-11-19

**The problem.** A transcript holds the answers your team needs, but nobody has time to read an hour of call to
find them: what did the customer complain about, which action items were agreed and by whom, did the agent read
the legal notice. A [summary](/live/summarization/) answers one question; your team has its own.

**How it works.** Audio to LLM asks your own questions, your **prompts**, about the transcript of a pre-recorded
(batch) job, in the same job. Once the file is transcribed, each prompt is sent with the transcript to a large
language model (**LLM**: an AI model that reads a text and writes an answer), and each answer comes back in the
job's `result`, one per prompt. It is one of the [add-ons](/pre-recorded/add-ons/) of a pre-recorded job.

Gladia Enterprise does not host that LLM itself. The person who runs your Gladia Enterprise cluster (its
**operator**) connects one, or your **workspace** (your account, in Gladia Workspace) brings its own. Until one is
connected, audio to LLM is refused with a `400`: nothing is ever dropped silently.

## At a glance

| | |
|---|---|
| Live API | Pre-recorded only |
| Pre-recorded (batch) | `audio_to_llm` ([how](/pre-recorded/add-ons/#audio-to-llm)) |
| Languages | Every language of the model ([supported languages](/languages/supported-languages/)) |

| | |
|---|---|
| Options | `audio_to_llm: true` and `audio_to_llm_config.prompts` |
| Where | Pre-recorded (batch) jobs, `POST /v2/pre-recorded`; not live sessions (their end-of-call LLM add-on is [summarization](/live/summarization/)) |
| Prompts | 1 to 10 prompts per job, each up to 4,000 characters |
| Model | Any model of your cluster's LLM provider, named in `audio_to_llm_config.model`; omitted, the cluster's default ([Pick a model](#pick-a-model)) |
| Result | `result.audio_to_llm`: one answer per prompt, in the order of your prompts |
| Served? | `GET /v2/features` says `"addons": {"audio_to_llm": true}` once your cluster has an LLM for it |

## Where it works

A pre-recorded job runs on Gladia Enterprise's own pre-recorded hosts, or on Gladia's standard API, as your
cluster's operator chose ([Where pre-recorded jobs run](/pre-recorded/where-jobs-run/)). Audio to LLM runs on the
first only.

| your cluster | `"audio_to_llm": true` |
|---|---|
| Jobs on its own pre-recorded hosts, an LLM connected for audio to LLM (by the operator or your workspace) | runs: one answer per prompt |
| Jobs on its own pre-recorded hosts, no LLM connected | `400`, `validation_errors`: `audio_to_llm: not supported: no LLM is configured on this gateway` |
| Jobs sent to Gladia's standard API | `400`, `validation_errors`: `audio_to_llm: not available on Gladia Enterprise with Gladia's pre-recorded API` |

A refused job is never created and never billed. Ask your Gladia contact, or your cluster's operator, to connect
an LLM, then send the same request again.

## Step by step

### 1. Check that your cluster serves it

`GET /v2/features` says which products your cluster offers, and its `addons` which LLM add-ons it has an LLM for.

```bash
curl https://eu1.api.gladia.io/v2/features \
  -H "x-gladia-key: $GLADIA_API_KEY"
```

`"addons": {"audio_to_llm": true}`: your cluster has one. `false`: the cluster has none, or its LLM add-ons are
off. A workspace with its own LLM may still get audio to LLM, which this public answer cannot know: create the
job, a refusal is a `400` and nothing is billed.

### 2. Create a job with your prompts

The SDKs upload the file, create the job with your prompts and read it until it is done; over HTTP, upload the file
with `POST /v2/upload` (or give any public URL), then create the job. Put your API key in the `GLADIA_API_KEY`
environment variable, then run `python audio_to_llm.py call.wav`.

**Python SDK**

```python title="audio_to_llm.py" e2e="skip: needs an LLM on the cluster's own pre-recorded hosts, run by tests/docs/test_doc_examples_cluster_llm.py"
# pip install -U "gladiaio-sdk>=2.2"
import os
import sys

from gladiaio_sdk import GladiaClient

API_URL = os.environ.get("GLADIA_API_URL", "https://eu1.api.gladia.io")
client = GladiaClient(api_key=os.environ["GLADIA_API_KEY"], api_url=API_URL)

# A local file is uploaded first, then the job runs and is read until it is done.
job = client.prerecorded().transcribe(
    sys.argv[1],
    {
        "audio_to_llm": True,
        "audio_to_llm_config": {
            "prompts": ["Extract the key points", "List the action items, with their owner"],
        },
    },
    interval=1,
)
answers = job.result.audio_to_llm
if not answers or not answers.success:
    sys.exit(f"no answers: {answers.error if answers else 'no audio_to_llm entry'}")
for answer in answers.results or []:
    print(f"## {answer.results.prompt}\n{answer.results.response}")
```

**JavaScript SDK**

```js title="audio_to_llm.mjs" e2e="skip: needs an LLM on the cluster's own pre-recorded hosts, run by tests/docs/test_doc_examples_cluster_llm.py"
// npm install @gladiaio/sdk
import { GladiaClient } from "@gladiaio/sdk";

const client = new GladiaClient({
  apiKey: process.env.GLADIA_API_KEY,
  apiUrl: process.env.GLADIA_API_URL ?? "https://eu1.api.gladia.io",
});

// A local file is uploaded first, then the job runs and is read until it is done.
const job = await client.preRecorded().transcribeUntyped(
  process.argv[2],
  {
    audio_to_llm: true,
    audio_to_llm_config: {
      prompts: ["Extract the key points", "List the action items, with their owner"],
    },
  },
  { interval: 1000 },
);
const answers = job.result?.audio_to_llm;
if (!answers?.success) throw new Error(`no answers: ${JSON.stringify(answers?.error ?? "no audio_to_llm entry")}`);
for (const answer of answers.results ?? []) {
  console.log(`## ${answer.results.prompt}\n${answer.results.response}`);
}
```

**HTTP**

Upload the file first ([Transcribe a file](/pre-recorded/transcribe-a-file/)), then create the job on its `audio_url`:

```bash
curl -X POST https://eu1.api.gladia.io/v2/pre-recorded \
  -H "x-gladia-key: $GLADIA_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "audio_url": "https://eu1.api.gladia.io/file/0199d7a2-0000-7000-8000-00000000f11e",
    "audio_to_llm": true,
    "audio_to_llm_config": {
      "prompts": [
        "Extract the key points",
        "List the action items, with their owner"
      ]
    }
  }'
```

Over HTTP, the answer is the job's `id` and its `result_url`.

### 3. Read the answers

Read the job until its `status` is `done`:

```bash
curl https://eu1.api.gladia.io/v2/pre-recorded/$JOB_ID \
  -H "x-gladia-key: $GLADIA_API_KEY"
```

The answers are the `audio_to_llm` entry of the job's `result`, next to the transcript:

```json
{
  "id": "0199d7a2-6a10-7c22-8d4e-5f6a7b8c9d1a",
  "request_id": "G-0199d7a3",
  "version": 2,
  "status": "done",
  "created_at": "2026-11-09T09:14:03.000Z",
  "completed_at": "2026-11-09T09:14:12.000Z",
  "custom_metadata": null,
  "error_code": null,
  "kind": "pre-recorded",
  "post_session_metadata": {},
  "file": {
    "id": "0199d7a2-0000-7000-8000-00000000f11e",
    "filename": "call.wav",
    "source": null,
    "audio_duration": 6.0,
    "number_of_channels": 1
  },
  "request_params": {
    "audio_to_llm": true,
    "audio_to_llm_config": {
      "prompts": ["Extract the key points", "List the action items, with their owner"]
    }
  },
  "result": {
    "metadata": {
      "audio_duration": 6.0,
      "number_of_distinct_channels": 1,
      "billing_time": 6.0,
      "transcription_time": 1.4
    },
    "transcription": {
      "full_transcript": "Can you deliver on Friday instead? Sure, I am sending you a new tracking link.",
      "languages": ["en"],
      "utterances": []
    },
    "audio_to_llm": {
      "success": true,
      "is_empty": false,
      "exec_time": 3.1,
      "error": null,
      "results": [
        {
          "success": true,
          "is_empty": false,
          "exec_time": 2.2,
          "error": null,
          "results": {
            "prompt": "Extract the key points",
            "response": "- The delivery moves to Friday.\n- A new tracking link is sent."
          }
        },
        {
          "success": true,
          "is_empty": false,
          "exec_time": 3.0,
          "error": null,
          "results": {
            "prompt": "List the action items, with their owner",
            "response": "- Agent: send the new tracking link."
          }
        }
      ]
    }
  }
}
```

- `audio_to_llm`: the add-on's entry. `success` is `false` when the add-on could not run at all (a prompt's own
  failure is in that prompt's entry); `exec_time` is how long the whole add-on took, in seconds.
- `audio_to_llm.results`: one entry per prompt, in the order of your prompts. Each has its own `success`,
  `error` and `exec_time`, and its `results`: the `prompt` you sent and the LLM's `response`, as text.

With a [callback](/pre-recorded/callbacks/), the same `result` comes in the `transcription.success` event.

## Pick a model

`audio_to_llm_config.model` names the model your prompts are asked of, by its code, once your cluster's operator
turned model choice on (until then, `model` is refused with a `400`). Omitted, the job runs on the default model
your cluster's operator chose. The model always runs on your cluster's own LLM provider, at your
workspace's sovereignty level: a regional workspace's transcript never leaves its region, whatever model it
names.

```json
{
  "audio_url": "https://eu1.api.gladia.io/file/0199d7a2-0000-7000-8000-00000000f11e",
  "audio_to_llm": true,
  "audio_to_llm_config": {
    "prompts": ["List the action items, each with its owner."],
    "model": "google/gemini-3.5-flash-lite"
  }
}
```

`GET /v2/audio-to-llm/models` (your API key) lists the models your workspace may name, the default one, and what
each is billed per million tokens. `GET /v2/audio-to-llm/catalog` (no API key) gives the same for every
sovereignty level of the cluster: the lists below are its answer. A provider that serves hundreds of models shows
its 100 most used; any other model it serves is accepted too.

Your text never reaches a provider that keeps it or trains on it: every call asks for zero data retention, and a
model that no such provider serves is neither listed nor accepted.

A model the provider does not serve is refused with a `400` when the job is created, nothing billed:
`` audio_to_llm_config.model: <model> is not a model of this cluster's LLM provider (GET /v2/audio-to-llm/models lists them) ``.
A model the provider serves but whose price is not known is refused the same way (`` <model> has no known price on this
cluster ``): pick a model `GET /v2/audio-to-llm/models` lists with a price. A workspace with its own LLM may name any
model its provider serves.

<AudioToLlmModels />

## Prompt examples

Each prompt is one question, answered from the transcript. Say what you want and how you want it written
(a list, one sentence, yes or no): the answer is free text, and a precise format is easier for your code to use.

A support call, checked for quality:

```json
{
  "audio_url": "https://eu1.api.gladia.io/file/0199d7a2-0000-7000-8000-00000000f11e",
  "audio_to_llm": true,
  "audio_to_llm_config": {
    "prompts": [
      "What is the customer's problem? Answer in one sentence.",
      "Was the problem solved during the call? Answer yes or no, then why in one sentence.",
      "Did the agent tell the customer that the call is recorded? Answer yes or no."
    ]
  }
}
```

A sales call, for the CRM:

```json
{
  "audio_url": "https://eu1.api.gladia.io/file/0199d7a2-0000-7000-8000-00000000f11e",
  "audio_to_llm": true,
  "audio_to_llm_config": {
    "prompts": [
      "List the objections the prospect raised, one per line.",
      "Which competitors are named? List them, or answer none.",
      "What is the next step agreed, and when?"
    ]
  }
}
```

A meeting, for the minutes:

```json
{
  "audio_url": "https://eu1.api.gladia.io/file/0199d7a2-0000-7000-8000-00000000f11e",
  "diarization": true,
  "audio_to_llm": true,
  "audio_to_llm_config": {
    "prompts": [
      "List the decisions made in this meeting, one per line.",
      "List the action items, each with its owner and its deadline when one is said.",
      "Which questions were left open?"
    ]
  }
}
```

## Limits and gotchas

- **`prompts` is required.** There are no default prompts: `"audio_to_llm": true` without them is a `400`
  (`audio_to_llm_config.prompts must be provided when audio_to_llm is true`). Send 1 to 10 prompts, each up to
  4,000 characters; more is a `400` that names the limit.
- **The model is a model of your cluster's provider.** `audio_to_llm_config.model` picks among them
  ([Pick a model](#pick-a-model)); a model from another provider, or one it does not serve, is a `400`. A request
  written for Gladia's cloud may keep its `model` only if your cluster's provider serves it.
- **`audio_to_llm: true` is the switch.** `audio_to_llm_config` alone asks for it too; `"audio_to_llm": false`
  turns it off whatever the config says.
- **One question per prompt.** Each prompt is its own call to the LLM, with no memory of the other prompts: a
  prompt cannot refer to the answer of another. They run in parallel, a few at a time: ten prompts take a few
  times as long as one, not ten times.
- **The answer is in the call's language.** The LLM is told to reply in the language most of the call is in,
  whatever the language of your prompt.
- **It reads what you receive.** Each prompt is sent with the transcript after your
  [custom spelling](/features/custom-spelling/) and the [PII redaction](/features/pii-redaction/): the personal
  data you asked to hide never reaches the LLM.
- **One prompt failing does not fail the others.** Its entry says `"success": false` with an `error` and
  `"results": null`; the other prompts, the transcript and the other add-ons are there. Match the answers to your
  prompts by their position, or by `results.prompt`.
- **A very long recording** is read up to its first 200,000 characters of transcript (about three hours of
  speech): a question about what was said after that gets no answer from it.
- **A silent file** gives `"is_empty": true` and `"results": null`: no LLM is called.
- **Which LLM answers**: your workspace's own LLM when it has one, else the one your cluster's operator connected
  for audio to LLM, else the cluster's default. Your transcript is sent to that LLM only for this job.
- **Billing**: audio to LLM is billed what its LLM provider charged for the job's calls (your prompts and the
  transcript sent with them, and the answers, counted in tokens: the pieces of words an LLM reads and writes),
  plus your cluster's markup. The prices listed in [Pick a model](#pick-a-model) are what a million tokens of each
  model costs you; a job's bill follows what the provider actually charged for it, caching and discounts
  included. A workspace with its own LLM is not billed for it by Gladia: its provider bills it directly. Only a
  job that ends `done` is billed; a job refused or failed is not.

## Troubleshooting

| symptom | cause | fix |
|---|---|---|
| `400`: `audio_to_llm: not supported: no LLM is configured on this gateway` | no LLM serves audio to LLM for your workspace | ask your operator to connect one, or remove the option |
| `400`: `audio_to_llm: not available on Gladia Enterprise with Gladia's pre-recorded API` | your cluster sends its jobs to Gladia's standard API | ask your operator; audio to LLM runs on the cluster's own pre-recorded hosts |
| `400`: `audio_to_llm_config.prompts must be provided when audio_to_llm is true` | no prompts | add `audio_to_llm_config.prompts` |
| `400`: `audio_to_llm_config.model: … is not a model of this cluster's LLM provider` | the provider does not serve that model | pick one from `GET /v2/audio-to-llm/models`, or omit `model` for the default |
| `400`: `audio_to_llm_config.model: … has no known price on this cluster` | the model's price is not known, so it cannot be billed | pick a model listed with a price |
| one entry of `audio_to_llm.results` with `"success": false` | the LLM failed, refused or took too long on that prompt | read its `error`; the other answers are there |

## Related pages

- [Pre-recorded (batch) transcription add-ons](/pre-recorded/add-ons/)
- [Summarization](/live/summarization/)
- [Where pre-recorded jobs run](/pre-recorded/where-jobs-run/)
- [PII redaction](/features/pii-redaction/)
