# Deepgram

> **You are on:** `https://beta-api.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API |
> |---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com |
> | Beta | beta.paywithlocus.com | beta-api.paywithlocus.com |
> | Stage | stage.paywithlocus.com | stage-api.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 from URLs with Nova-3, generate natural speech with 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 |
| **Wrapped API** | `https://beta-api.paywithlocus.com/api/wrapped/deepgram/` | `Authorization: Bearer <LOCUS_API_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":"<string>","model":"<string>","language":"<string>","smart_format":"<boolean>","punctuate":"<boolean>","diarize":"<boolean>","paragraphs":"<boolean>","summarize":"<boolean>","sentiment":"<boolean>","topics":"<boolean>","intents":"<boolean>","detect_entities":"<boolean>"}'
```

### 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":"<string>","model":"<string>","encoding":"<string>","container":"<string>","sample_rate":"<string>"}'
```

### 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":"<string>","sentiment":"<boolean>","summarize":"<boolean>","topics":"<boolean>","intents":"<boolean>","language":"<string>"}'
```

### 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 '{}'
```
