# Deployments: Transcription

A transcription deployment answers `/v1/audio/transcriptions`. It reads audio and is priced for each second of audio.

[Deployments](https://liquidinference.ai/docs/provider-models.md) has the fields that every kind shares, the listing statuses and the lifecycle. This page has what is special to this kind.

## Register a deployment

Copy the request, set your provider key and change the names. Every endpoint here takes the [provider key](https://liquidinference.ai/docs/provider.md) as a bearer token.

```bash
curl https://router.inference.ai.exchange/v1/provider/models \
  -H "Authorization: Bearer $LIQUID_PROVIDER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "kind": "audio_transcription",
      "deployment_name": "whisper-large-v3",
      "creator": "openai",
      "precision": "fp16",
      "region": "eu-west",
      "max_input_tokens": 4096,
      "input_modalities": [
        {
          "type": "audio",
          "formats": [
            "audio/wav",
            "audio/mpeg"
          ],
          "sources": [
            "base64",
            "url"
          ],
          "max_duration_seconds": 3600,
          "max_bytes": 100000000
        }
      ],
      "output_modalities": [
        {
          "type": "transcript",
          "languages": [
            "en",
            "fr"
          ],
          "segments": true,
          "words": false,
          "max_keyterms": 100
        }
      ]
    }'
```

```python
import os
import requests

response = requests.post(
    "https://router.inference.ai.exchange/v1/provider/models",
    headers={"Authorization": f"Bearer {os.environ['LIQUID_PROVIDER_KEY']}"},
    json={
        "kind": "audio_transcription",
        "deployment_name": "whisper-large-v3",
        "creator": "openai",
        "precision": "fp16",
        "region": "eu-west",
        "max_input_tokens": 4096,
        "input_modalities": [
            {
                "type": "audio",
                "formats": [
                    "audio/wav",
                    "audio/mpeg"
                ],
                "sources": [
                    "base64",
                    "url"
                ],
                "max_duration_seconds": 3600,
                "max_bytes": 100000000
            }
        ],
        "output_modalities": [
            {
                "type": "transcript",
                "languages": [
                    "en",
                    "fr"
                ],
                "segments": True,
                "words": False,
                "max_keyterms": 100
            }
        ]
    },
)
response.raise_for_status()
print(response.json()["status"])
```

```typescript
const response = await fetch('https://router.inference.ai.exchange/v1/provider/models', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LIQUID_PROVIDER_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    kind: 'audio_transcription',
    deployment_name: 'whisper-large-v3',
    creator: 'openai',
    precision: 'fp16',
    region: 'eu-west',
    max_input_tokens: 4096,
    input_modalities: [
      {
        type: 'audio',
        formats: ['audio/wav', 'audio/mpeg'],
        sources: ['base64', 'url'],
        max_duration_seconds: 3600,
        max_bytes: 100000000,
      },
    ],
    output_modalities: [
      {
        type: 'transcript',
        languages: ['en', 'fr'],
        segments: true,
        words: false,
        max_keyterms: 100,
      },
    ],
  }),
})
if (!response.ok) throw new Error(await response.text())
console.log((await response.json()).status)
```

The answer is `201` with the registration. A new registration is `UNLISTED`. `kind` cannot change: a new kind returns `409 kind_changed`.

## What you declare

| Field                             | Where               | Meaning                                                                                                                             |
| --------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `formats`, `sources`, `max_bytes` | `audio` input       | The audio that it reads. `sources` is `url`, `base64` or both.                                                                      |
| `max_duration_seconds`            | `audio` input       | The longest recording, in seconds. The exchange measures the audio before dispatch and excludes a longer one.                       |
| `languages`                       | `transcript` output | ISO 639-1 codes that it reads. Empty states nothing, and your upstream decides.                                                     |
| `segments`, `words`               | `transcript` output | `true` when it returns the time of each segment or word. A buyer who asks for a granularity gets only a deployment that returns it. |
| `max_keyterms`                    | `transcript` output | The most `keyterms` that one request can name. Absent states no limit.                                                              |

A request that names a `language`, a timestamp granularity or more key terms than you take does not reach you.

## Speakers and key terms

Declare the features that your upstream honours in the quote: `transcription.diarize` for speaker labels and `transcription.keyterms` for key terms.

## Quote and serve

Quote one `input.audio` line. The route that your upstream needs is in [Sell transcription](https://liquidinference.ai/docs/provider-transcription.md).

```json
{ "billable": "input.audio", "unit": "second", "usd": 0.0001 }
```

## Charge

The charge is the seconds of audio that you meter, up to the cap, which is the seconds that the exchange measured.

## Next

- Quote the deployment: [Quote over the session](https://liquidinference.ai/docs/provider-quoting.md).
- Get it on the public book: [Deployments](https://liquidinference.ai/docs/provider-models.md#from-registration-to-the-public-book).
