TemprTempr
Docs
Gateway API

Transcriptions

Last updated

POST /v1/audio/transcriptions serves OpenAI's speech-to-text API, with your own OpenAI or Groq key. Point any OpenAI SDK at Tempr and it transcribes on the same virtual key, limits and logs as your chat traffic.

Availability

Transcriptions run on any virtual key whose owner has an OpenAI or Groq key saved.

Request

POST https://api.temprhq.io/v1/audio/transcriptions
Authorization: Bearer tvk_...
Content-Type: multipart/form-data

Form fields

FieldTypeRequiredDescription
filefileYesThe recording: 16-bit PCM WAV, mono, 8 to 48 kHz, up to about two and a half minutes and 10 MB. See audio.
modelstringYesOne of the models below, such as openai/gpt-transcribe. Must be on your virtual key's allowlist.
languagestringNoThe language spoken, as a code like en or de. Without it, the model works it out.
promptstringNoText to guide the model, such as names and terms it should spell your way.
response_formatstringNojson (the default) or text. Other formats get 400 unsupported_response_format.

Example

curl https://api.temprhq.io/v1/audio/transcriptions \
  -H "Authorization: Bearer $TEMPR_KEY" \
  -F file=@meeting.wav \
  -F model=openai/gpt-transcribe \
  -F language=en

With the OpenAI Python SDK:

from openai import OpenAI

client = OpenAI(base_url="https://api.temprhq.io/v1", api_key="tvk_...")

with open("meeting.wav", "rb") as audio:
    result = client.audio.transcriptions.create(
        model="groq/whisper-large-v3-turbo",
        file=audio,
    )
print(result.text)

Response

With response_format json:

{ "text": "Let's move the release to Thursday." }

With text, the transcript alone as text/plain. Every response carries x-tempr-request-id.

Models & prices

The model picks the provider, and the request runs on your own key for it (the organization's key, for an organization's virtual key). Add one in the Portal's provider keys; see Providers & BYOK. A custom endpoint you set for the provider, such as a regional host, is used for transcriptions too.

ModelProviderPrice
openai/gpt-transcribeOpenAI$0.0045 a minute
openai/gpt-4o-mini-transcribeOpenAI$0.003 a minute
openai/gpt-4o-transcribeOpenAI$0.006 a minute
openai/whisper-1OpenAI$0.006 a minute
groq/whisper-large-v3-turboGroq$0.04 an hour, at least 10 seconds a request
groq/whisper-large-v3Groq$0.111 an hour, at least 10 seconds a request

OpenAI shuts down whisper-1, gpt-4o-transcribe and gpt-4o-mini-transcribe on February 26, 2027. From that day, a recording sent to one of them goes to openai/gpt-transcribe instead, at its price.

The provider's own model name works too, as the OpenAI SDKs send it: gpt-transcribe is OpenAI's, and a bare whisper-large-v3 or whisper-large-v3-turbo is Groq's, the only provider serving them. Any other model gets 400 model_not_found, with the list of the models above.

Prices are the providers' list prices per minute of audio. Tempr works out the length from the audio itself, not from what the provider reports, and your provider bills you; Tempr charges nothing per transcription.

Audio

The Gateway takes one format, so it can measure each recording's length, and with it the cost, from the audio itself:

  • WAV with 16-bit PCM samples, one channel (mono), recorded at 8 to 48 kHz. Anything else gets 415 unsupported_audio.
  • Up to about two and a half minutes. A longer recording gets 413 audio_too_long.
  • Up to 10 MB. A larger file gets 413 audio_too_large.

To convert another file, ffmpeg does it in one line, for example ffmpeg -i input.m4a -ac 1 -ar 16000 -c:a pcm_s16le output.wav. For longer audio, split it and send the parts.

What applies

Transcriptions go through the same pipeline as chat, with these differences:

FeatureOn /v1/audio/transcriptions
Virtual keys, model allowlists, RPM limits, key and organization budgetsThe same as chat.
Monthly quotaOne transcription is one request.
Usage and costPriced per minute of audio, no tokens. Counted toward budgets, analytics and cost alerts like chat usage.
Request logsLogged like chat, with the model, status, latency and cost. The audio is never logged. The transcript is logged as the response only when the key captures content; the request then shows only the recording's length.
Guardrails, redaction, prompt templatesNot applied: no text goes in, only audio.
Fallback chains and backup keysNot applied: each transcription model is one provider's.
Response caching, streamingNot applied.

Errors

In OpenAI's error shape, like every Gateway error; see Errors for the ones every endpoint shares, such as authentication and limits.

StatusCodeMeaning
400invalid_bodyThe request isn't multipart/form-data, or the form couldn't be read.
400missing_model, missing_fileThe model or file field is missing.
400model_not_foundNot one of the models above.
400unsupported_response_formatresponse_format isn't json or text.
404transcription_unavailableTempr has switched transcriptions off for now.
413audio_too_long, audio_too_largeOver about two and a half minutes, or over 10 MB.
415unsupported_audioNot 16-bit PCM WAV, mono, 8 to 48 kHz.