---
title: "Convert speech to text"
method: POST
path: "/api"
---

# Convert speech to text

`POST /api`

Transcribe audio with support for multiple languages and context awareness

## Request body

- object
  - `audio` string, required — base64 encoded, 16kHz wav audio. Max size is 25MB / 6 minutes of audio
  - `properties` object, required — Additional configuration properties for the transcription
    - `language` string — 2-digit ISO language code
    - `app_type` 'ai' | 'email' | 'other' — Flow formats appropriately depending on if the user is prompting AI, writing an email, or other tasks.
    - `dictionary` string[] — List of dictionary words to help with transcription accuracy
    - `after_text` string — The text immediately after the cursor. Flow uses it to decide spacing / punctuation.
    - `before_text` string — The text immediately before the cursor. Flow uses it to decide spacing / punctuation.
    - `selected_text` string — The text the user has highlighted. Flow uses it to decide spacing / punctuation.

## Response `200`

Successful transcription

- object
  - `id` string, uuid — Unique identifier for the transcription
  - `text` string — The transcribed text with formatting
  - `detected_language` string — Detected language code
  - `total_time` integer — Total processing time in milliseconds
  - `generated_tokens` integer — Number of tokens used

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `413` — Payload too large
- `500` — Internal server error

---

[API](https://skmtc.dev/wisprflow/apis/client-side-authentication-api.md) · [All operations](https://skmtc.dev/wisprflow/apis/client-side-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/wisprflow/client-side-authentication-api/revisions/b310f2be849d/schema)
