# Transcription

`POST /v1/audio/transcriptions` — Transcribe an audio file to text.

- Base URL: https://eroq.ai/v1
- Auth: `Authorization: Bearer eroq_sk_…` (create keys at https://eroq.ai/dashboard/keys)
- Credits: 5 per request

Send `multipart/form-data` with a `file` part — **wav or mp3** (other containers return `unsupported_format`; re-encode client-side or record WAV via WebAudio). Language is detected automatically; pass `language` (ISO code) as a hint to improve accuracy.

Built for voice-message-length clips: files are capped at 8MB (about 8 minutes of compressed audio).

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | file | yes | The audio to transcribe (wav or mp3). |
| `model` | string | no | Only `eroq-scribe-one` today. |
| `language` | string | no | ISO language hint, e.g. `en`, `fr`. |

## Example request

```bash
curl https://eroq.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $EROQ_API_KEY" \
  -F model=eroq-scribe-one \
  -F file=@clip.webm
```

```javascript
import { readFile } from 'node:fs/promises'

const form = new FormData()
form.append('model', 'eroq-scribe-one')
form.append('file', new Blob([await readFile('clip.webm')]), 'clip.webm')

const res = await fetch('https://eroq.ai/v1/audio/transcriptions', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.EROQ_API_KEY}` },
  body: form,
})
console.log(await res.json())
```

```python
import os, requests

res = requests.post(
    "https://eroq.ai/v1/audio/transcriptions",
    headers={"Authorization": f"Bearer {os.environ['EROQ_API_KEY']}"},
    data={"model": "eroq-scribe-one"},
    files={"file": open("clip.webm", "rb")},
)
print(res.json())
```

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"mime/multipart"
	"net/http"
	"os"
)

func main() {
	file, _ := os.Open("clip.wav")
	defer file.Close()

	var buf bytes.Buffer
	form := multipart.NewWriter(&buf)
	form.WriteField("model", "eroq-scribe-one")
	part, _ := form.CreateFormFile("file", "clip.wav")
	io.Copy(part, file)
	form.Close()

	req, _ := http.NewRequest("POST", "https://eroq.ai/v1/audio/transcriptions", &buf)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EROQ_API_KEY"))
	req.Header.Set("Content-Type", form.FormDataContentType())

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```

## Response


```json
{
  "model": "eroq-scribe-one",
  "text": "That noise is the reactor missing its coolant flush.",
  "usage": { "credits_spent": 5, "credits_remaining": 882 }
}
```
---
Canonical: https://eroq.ai/docs/transcriptions · Index for agents: https://eroq.ai/llms.txt · OpenAPI: https://eroq.ai/openapi.json
