# Deepgram

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Industry-leading speech AI — transcribe audio with Nova-3, generate speech with Flux or Aura-2 TTS, and analyze text for sentiment, topics, intents, and summaries.

**Category:** AI / Speech | **Website:** [deepgram.com](https://deepgram.com) | **Docs:** [developers.deepgram.com/reference/deepgram-api-overview](https://developers.deepgram.com/reference/deepgram-api-overview)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **MPP (Tempo)** | `https://deepgram.mpp.paywithlocus.com/deepgram/` | HTTP 402 auto-payment |
| **Locus Pro Wrapped API** | `https://api.paywithlocus.com/api/wrapped/credits/deepgram/` | `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` + `Idempotency-Key` |

**OpenAPI discovery:** `GET https://deepgram.mpp.paywithlocus.com/openapi.json`

## Endpoints

### Transcribe Audio

Transcribe a pre-recorded audio file from a public URL using Deepgram Nova-3 (default). Returns the full transcript with optional enrichments: punctuation, speaker diarization, smart formatting, paragraphs, sentiment, summary, topics, intents, and entity detection.

**Estimated cost:** $0.05 + $0.003 fee

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Publicly accessible URL of the audio file to transcribe |
| `model` | string | No | STT model to use (default: nova-3). Options: nova-3, nova-2, enhanced, base |
| `language` | string | No | BCP-47 language code (default: en). E.g. es, fr, de, ja |
| `smart_format` | boolean | No | Apply smart formatting (numbers, dates, punctuation). Recommended. |
| `punctuate` | boolean | No | Add punctuation and capitalization |
| `diarize` | boolean | No | Identify and label individual speakers |
| `paragraphs` | boolean | No | Split transcript into readable paragraphs |
| `summarize` | boolean | No | Generate a summary of the audio content |
| `sentiment` | boolean | No | Detect emotional sentiment throughout the audio |
| `topics` | boolean | No | Identify topics discussed in the audio |
| `intents` | boolean | No | Detect speaker intents throughout the audio |
| `detect_entities` | boolean | No | Extract named entities (people, places, organizations) |

```bash
curl -X POST https://deepgram.mpp.paywithlocus.com/deepgram/transcribe \
  -H "Content-Type: application/json" \
  -d '{"url":"https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav","model":"nova-3","smart_format":true}'
```

### Text to Speech

Convert text to natural-sounding speech using Deepgram Aura-2 voices. Returns base64-encoded audio (MP3 by default). Choose from 46+ English voices and voices in Spanish, French, German, Dutch, Italian, and Japanese.

**Estimated cost:** $0.02 + $0.003 fee

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `text` | string | Yes | Text to convert to speech. Max ~2000 chars recommended per call. |
| `model` | string | No | TTS voice model (default: aura-2-thalia-en). Format: aura-2-{voice}-{lang}. E.g. aura-2-apollo-en, aura-2-thalia-en, aura-2-orion-en |
| `encoding` | string | No | Audio encoding (default: mp3). Options: mp3, linear16, flac, mulaw, alaw, opus, aac |
| `container` | string | No | Audio container format. Options: mp3, wav, ogg, none |
| `sample_rate` | string | No | Output sample rate in Hz (e.g. 24000, 16000, 8000) |

```bash
curl -X POST https://deepgram.mpp.paywithlocus.com/deepgram/speak \
  -H "Content-Type: application/json" \
  -d '{"text":"Locus API acceptance verification.","model":"aura-2-thalia-en"}'
```

### Flux Text to Speech

Synthesize a complete block of text with Deepgram Flux TTS using the stateless batch REST transport. Returns base64-encoded audio.

**Estimated cost:** ~$0.045 per 1,000 characters + $0.003 fee

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `text` | string | Yes | Complete block of text to synthesize |
| `model` | string | Yes | Flux voice model in flux-{voice}-{language} format (e.g. flux-haley-en, flux-alexis-en, flux-kit-en) |
| `encoding` | string | No | Audio encoding: mp3 (default), opus, flac, aac, linear16, mulaw, or alaw |
| `container` | string | No | Output container where applicable (e.g. wav or ogg) |
| `sample_rate` | number | No | Output sample rate; supported values depend on encoding |
| `bit_rate` | number | No | Bit rate for supported compressed encodings |
| `speed` | number | No | Speech-rate multiplier from 0.85 to 1.15 in 0.05 increments |
| `expressivity` | number | No | Delivery register from -2 (calmer) to 2 (more animated) |

```bash
curl -X POST https://deepgram.mpp.paywithlocus.com/deepgram/speak-flux \
  -H "Content-Type: application/json" \
  -d '{"text":"Locus API acceptance verification.","model":"flux-haley-en"}'
```

### Analyze Text

Run Deepgram text intelligence on any text — sentiment analysis, topic detection, intent recognition, and summarization. Enable features via query parameters.

**Estimated cost:** $0.01 + $0.003 fee

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `text` | string | Yes | Text to analyze |
| `sentiment` | boolean | No | Detect positive/negative/neutral sentiment |
| `summarize` | boolean | No | Generate a concise summary |
| `topics` | boolean | No | Identify topics in the text |
| `intents` | boolean | No | Detect speaker/writer intents |
| `language` | string | No | BCP-47 language code (default: en) |

```bash
curl -X POST https://deepgram.mpp.paywithlocus.com/deepgram/analyze \
  -H "Content-Type: application/json" \
  -d '{"text":"Locus provides payment infrastructure for software agents.","sentiment":true,"topics":true,"language":"en"}'
```

### List Models

List all available Deepgram STT and TTS models with their capabilities, supported languages, and metadata.

**Estimated cost:** $0.001 + $0.003 fee

_No parameters required._

```bash
curl -X POST https://deepgram.mpp.paywithlocus.com/deepgram/list-models \
  -H "Content-Type: application/json" \
  -d '{}'
```
