Transcribe audio or video

The spoken words of an audio or video link as text with timed segments: files, podcast episodes, and X, TikTok, Instagram, Facebook and Vimeo videos.

Try it in the dashboard 10 free credits when you sign up, no card.

GET/v1/audio/transcribe

Costs 1 credit per 2 items requested. Only requests that return data are charged.

Parameters

NameTypeDescription
urlrequired string A public link: an audio or video file (.mp3, .m4a, .wav, .mp4, .m3u8 ...), a podcast episode (its file, an Apple Podcasts episode link with ?i=, a Spotify episode link, or a feed: its newest episode), or an X, TikTok, Instagram, Facebook or Vimeo video.
max_minutesoptional integer Transcribe at most this many minutes from the start of the recording. Every started 2 minutes allowed cost 1 credit, also when the recording is shorter. Default: 4. From 1 to 30.
languageoptional string The language spoken, as a two-letter code (en, es, de ...). Leave it out to detect the language; set it for short or noisy recordings.

Example request

curl "https://pipefetch.com/v1/audio/transcribe?url=https%3A%2F%2Fgithub.com%2Fopenai%2Fwhisper%2Fraw%2Fmain%2Ftests%2Fjfk.flac&max_minutes=4" \
  -H "x-api-key: YOUR_API_KEY"

Example response

A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.

200 OK · application/json
{
  "data": {
    "url": "https://github.com/openai/whisper/raw/main/tests/jfk.flac",
    "title": "jfk.flac",
    "transcript": "And so, my fellow Americans, ask not what your country can do for you. Ask what you can do for your country.",
    "language": "English",
    "transcriptSource": "speech_to_text",
    "durationSeconds": 11,
    "transcribedSeconds": 11,
    "truncated": false,
    "hook": "And so, my fellow Americans, ask not what your country can do for you.",
    "wordCount": 22,
    "wordsPerMinute": 139,
    "speechSeconds": 9.5,
    "segments": [
      {
        "start": 0.3,
        "end": 7.08,
        "text": "And so, my fellow Americans, ask not what your country can do for",
        "speaker": null
      },
      {
        "start": 7.08,
        "end": 7.42,
        "text": "you.",
        "speaker": null
      }
    ],
    "platform": "file",
    "author": null,
    "showTitle": null,
    "publishedAt": null,
    "thumbnailUrl": null,
    "mediaUrl": "https://github.com/openai/whisper/raw/main/tests/jfk.flac",
    "feedUrl": null,
    "itemId": null
  },
  "credits": {
    "used": 2,
    "remaining": 98
  }
}

Good to know

  • The price follows max_minutes: 1 credit per started 2 minutes, so 2 credits for the default 4 minutes and 15 credits for 30. A recording longer than max_minutes is transcribed from its start up to that length, and truncated is true.
  • Speech-to-text is Whisper large-v3 turbo, which recognises about 100 languages. segments are the transcript in timed lines (start and end in seconds); hook is the opening line.
  • A podcast episode whose feed carries the publisher's own transcript is answered from it (transcriptSource publisher), with the speakers it names.
  • A recording without speech (music only), without a sound track, a link that leads to no file, a deleted post, an encrypted (DRM) stream and a Spotify-only show answer 404 with a code that says which (no_speech, no_audio, not_found, no_media, drm_protected, spotify_only), and cost nothing. When a site refuses the request or speech-to-text is busy, the answer is 502 upstream_error, free and worth a retry.
  • YouTube links are refused before anything is charged: /v1/youtube/transcript reads YouTube's own captions.

Errors

Every error has the same shape, and none of them is charged. The full list is in the error reference.

Looking for an overview and use cases? See the Audio & Video Transcription API page.