# Transcribe a dictated description

`POST` `https://goblins-call-api.onrender.com/v1/agents/draft/transcribe`

Turns a short recording into text, for a description that was spoken rather than typed. The studio uses it where the browser has no speech recognition of its own.

Needs a [workspace API key](https://www.cracklehq.com/docs/authentication).

## Errors

- `400` `EMPTY_AUDIO`: The body is empty.
- `413` `AUDIO_TOO_LARGE`: The recording is larger than 8 MB; keep it under a minute.
- `415` `UNSUPPORTED_AUDIO`: The body is not audio, or `Content-Type` does not say which kind.
- `429` `RATE_LIMITED`: More than 60 recordings from this workspace in an hour.
- `502` `TRANSCRIBE_FAILED`: The transcriber did not answer. Try again, or type it.

Every request can also answer `401`, `429` and `500`: see [Errors](https://www.cracklehq.com/docs/errors).

## Notes

- Send the recording itself as the request body, with its type in `Content-Type`: `audio/webm`, `audio/mp4`, `audio/ogg` or `audio/wav`. Up to 8 MB, which is about a minute of speech. The language is detected.

Request:

cURL:

```bash
curl -X POST "https://goblins-call-api.onrender.com/v1/agents/draft/transcribe" \
  -H "Authorization: Bearer $CRACKLE_API_KEY"
```

Node.js:

```js
const response = await fetch('https://goblins-call-api.onrender.com/v1/agents/draft/transcribe', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CRACKLE_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

Python:

```python
import os
import requests

response = requests.post(
    "https://goblins-call-api.onrender.com/v1/agents/draft/transcribe",
    headers={"Authorization": f"Bearer {os.environ['CRACKLE_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
data = response.json()
```

Response · 200 OK:

```json
{
  "text": "A receptionist for my dental clinic in Pune. Books appointments, answers questions about timings and fees, and speaks Hinglish."
}
```

Source: https://www.cracklehq.com/docs/reference/agents/transcribe
