# Transcribe recorded speech

`POST /api/ai-chat/transcribe`

Authentication: no security requirement declared for this operation.

Responses:

- 200: Transcript.

- 400: No audio uploaded.

- 413: Recording exceeds the 25 MB limit.

- 503: No provider available to transcribe, or every attempt failed. Body: `{ message, code, settingsPath }` where `code` is an `AiSpeechErrorCode`.

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/ai-chat/transcribe'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/ai-chat/transcribe', {
  method: 'POST',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post('http://localhost:3000/api/ai-chat/transcribe')
print(response.text)
```
