https://api.morphllm.com/v1.
Use
morph-transcribe for anything already recorded. Use morph-transcribe-live when you need the words while they are being spoken: voice agents, live captions, dictation.
First request
Set your Morph API key, then transcribe a 10-second public sample by URL:- Python
- TypeScript
Options
The OpenAI fields work as on OpenAI. Morph adds named options for the things the model was trained to do.
Options combine. This request spells two names correctly, drops fillers, and labels speakers with word timestamps, all at once:
verbose_json, stream with verbose_json, srt, vtt or diarize, or transcription options sent to morph-transcribe-live.
There is no system prompt on the transcription endpoints. The model card says to leave the system prompt empty for transcription and translation, so each option sets one clause of the card’s own instruction instead; free-form instructions would take requests off the tested path. prompt is context about the audio, not an instruction.
morph-transcribe-live takes file or url, model, language, response_format (json, text, or verbose_json without words) and stream.
Key terms and context
Pass names and jargon inkeyterms[] (one form field per term) and a sentence about the audio in prompt:
prompt and keyterms together hold up to 2,000 characters. Newlines and angle brackets are dropped. In the OpenAI SDK, pass them as extra_body={"keyterms": ["mutton", "turnips"]}.
Verbatim or clean
style: verbatim (the default) writes what was said, fillers and repetitions included. style: clean drops fillers (“um”, “uh”) and accidental repetitions and keeps every other word as spoken.
Speaker labels and word timestamps
Ask forverbose_json with word timestamps, and diarize for speaker labels:
segments[]: runs of speech from one speaker, withspeaker,start,endandtext. Withdiarize, plainjsoncarriessegmentstoo, so you get speakers without asking forverbose_json.words[]: each word withstartandendin seconds, andspeakerwhendiarizeis on (elsenull).text: always plain. Speaker labels never appear inline. Speaker labels work in 13 languages.language: the spoken language as a lowercase English name, present only when known (for example, when you sentlanguage).
diarize return the words and segments with speaker: null.
Word times are returned only when they cover the whole transcript; a partial word list is never returned. On some recordings, mostly long ones where several people talk over each other, the times cannot be placed for every word. The response then keeps text and the speaker segments (with start and end set to null), leaves out words, and carries "timestamps_incomplete": true with the header x-morph-timestamps-incomplete: true. The transcript itself is complete and billed as usual.
Audio events
tag_audio_events: true keeps the model’s non-speech tags in the text: events as <ev:*> and speaking style as <sty:*>. Without it, those tags are removed.
Subtitles
response_format: srt or vtt returns subtitles cut from word timestamps. A cue holds up to 7 seconds and 84 characters and breaks at the end of a sentence or a change of speaker. With diarize, vtt cues carry a <v Speaker N> voice tag.
timestamps_unavailable and is not billed. Request json or text to get the transcript.
Translation
POST /v1/audio/translations transcribes and translates in one step, into English by default. Set target_language (a code or an English name) to translate from English into another language.
morph-transcribe only, with prompt, keyterms[], stream and the json, text and verbose_json formats. style: clean, diarize, tag_audio_events, timestamps and subtitles are refused with a 400: the model’s translation task has no wording, speaker or event clause, and word times align the source speech, not the translation. With the OpenAI SDK, client.audio.translations.create(model="morph-transcribe", file=audio) returns English.
Large files by URL
For audio that is already online, or too large to upload comfortably, send JSON withurl instead of file. Every other field is the same, with arrays as JSON arrays:
Streaming
Setstream: true to receive the transcript as server-sent events while it is written. Streaming works with the json and text formats.
transcript.text.done; there is no [DONE] line. If the engine fails mid-stream, the last event is {"type": "error", "error": {...}}.
Realtime
morph-transcribe-live speaks OpenAI’s realtime transcription protocol, so OpenAI realtime transcription clients connect with the URL and model changed. Connect to wss://api.morphllm.com/v1/realtime?intent=transcription with your key in the Authorization header, send session.update, then base64 PCM audio. The server sends text deltas and one completed transcript per turn.
This script streams the sample and prints the transcript. It needs ffmpeg and pip install "websockets>=14":
turn_detection: None makes the script end the turn itself with input_audio_buffer.commit. Leave it out for a microphone: server voice activity detection then opens a turn when speech starts and commits it after 500 ms of silence.
Session settings, in session.audio.input:
chunk_ms and language are Morph extensions to OpenAI’s session. chunk_ms can also be set at connect time with ?chunk_ms=. The model card lists 40 locales; the 32 below transcribe out of the box (its transcription-ready and broad-coverage tiers), and the 8 adaptation-ready locales need fine-tuning, so they are not accepted: en-US, en-GB, es-US, es-ES, fr-FR, fr-CA, it-IT, pt-BR, pt-PT, nl-NL, de-DE, tr-TR, ru-RU, ar-AR, hi-IN, ja-JP, ko-KR, vi-VN, uk-UA, pl-PL, sv-SE, cs-CZ, nb-NO, da-DK, bg-BG, fi-FI, hr-HR, sk-SK, zh-CN, hu-HU, ro-RO and et-EE; a bare code such as de picks the first locale for it.
The full event list is on the realtime reference.
Limits
Errors
Errors use the OpenAI envelope:{"error": {"message", "type", "param", "code"}}.
On the WebSocket, a bad event returns an
error event and the session stays open; a failed turn returns conversation.item.input_audio_transcription.failed.
Usage and billing
Audio bills as input tokens at 12.5 tokens per second of audio, rounded up: 45,000 per audio hour, metered every 80 ms with no minimum. Only audio is billed; the instruction,prompt and keyterms are not, so the price is exactly per audio hour. Output tokens are free. Key terms and speaker labels have no surcharge.
json and verbose_json responses carry usage: seconds of audio, input_tokens billed (ceil(seconds x 12.5)), output_tokens free. A response whose transcript ends before the audio does carries "truncated": true and the header x-morph-truncated: true. That happens when the transcript hit the length cap, which points to a model repetition loop and not a long file, or when the model stopped transcribing and the text was cut at that point. The API checks each file transcript for both and for an early ending, and may run the audio a second time before answering; you are billed once. A streamed response reports usage in transcript.text.done; a realtime turn reports its seconds in the completed event, and a realtime session bills every second of audio appended, silence included. The usage dashboard shows audio hours under Speech to text.