---
title: "Convert Speech to Text & Subtitles API"
slug: convert-speech-to-text-subtitles
url: https://apyhub.com/callable-labs/service/convert-speech-to-text-subtitles
provider: Callable Labs
categories: [Audio Processing]
tags: [speech-to-text, subtitles, srt, transcription, captions]
auth: api_key
version: 0.1.0
service_type: sync
endpoints: 1
atoms: 25
mcp: true
---

# Convert Speech to Text & Subtitles API

Transcribe audio or video from a URL or base64 input. Get text, timed segments, subtitle formats, confidence, and billed minutes.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/callable-labs/convert-speech-to-text-subtitles/v1/transcribe` | What it does Transcribes an audio or video file and returns a structured transcript. You can provid… | 25 |

## Endpoint reference

### Transcribe audio or video

`POST https://api.eu.apyhub.com/callable-labs/convert-speech-to-text-subtitles/v1/transcribe` · 25 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `audio` | body | any | yes | Choose how to send the file: a public URL or the file encoded as base64. |
| `format` | body | string | no | `json` (transcript, segments, timings), `srt`, `vtt` or `txt` One of: json, srt, vtt, txt. Default: `json`. |
| `max_chars` | body | integer | no | Longest segment or subtitle cue, in characters Default: `84`. |
| `max_seconds` | body | number | no | Longest segment or subtitle cue, in seconds Default: `7`. |
| `word_timestamps` | body | boolean | no | Include every word with its start, end and confidence (json) Default: `false`. |

#### Quickstart

Transcribe an audio file from a public URL and return subtitles/transcript in the default JSON format.

```bash
curl -X POST "https://api.eu.apyhub.com/callable-labs/convert-speech-to-text-subtitles/v1/transcribe" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": {
      "url": "https://assets.apyhub.com/samples/sample-speech.mp3"
    }
  }'
```

#### What you'll get back

Returns a JSON object with `text` (the full transcript), `duration` (audio length in seconds), `segments` (the timed transcript segments), `confidence` (average token confidence from 0 to 1), and `billed_minutes` (minutes charged, rounded up).

```json
{
  "text": "Hello and welcome to the show.",
  "duration": 61.2,
  "segments": [
    {
      "start": 0.32,
      "end": 2.4,
      "text": "Hello and welcome to the show."
    }
  ],
  "confidence": 0.97,
  "billed_minutes": 2
}
```

## About

## What it does
Speech to Text Subtitles turns an audio or video file into a transcript or subtitle file. Send a public `url` or a `base64`-encoded file in `audio`, then choose the output `format` as `json`, `srt`, `vtt`, or `txt`.

Use `max_chars` and `max_seconds` to control subtitle cue length, which is useful when you need readable captions for players, editors, or downstream workflows. If you choose `json`, you can also request `word_timestamps` to include each word with its start time, end time, and confidence.

The response gives you the full `text`, total `duration` in seconds, `segments` with start and end times, `confidence` as an average token score, and `billed_minutes` for usage tracking. That makes it straightforward to power media search, caption generation, meeting notes, or transcript storage without post-processing the raw output yourself.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/callable-labs/service/convert-speech-to-text-subtitles
