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.
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
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The recording: 16-bit PCM WAV, mono, 8 to 48 kHz, up to about two and a half minutes and 10 MB. See audio. |
model | string | Yes | One of the models below, such as openai/gpt-transcribe. Must be on your virtual key's allowlist. |
language | string | No | The language spoken, as a code like en or de. Without it, the model works it out. |
prompt | string | No | Text to guide the model, such as names and terms it should spell your way. |
response_format | string | No | json (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.
| Model | Provider | Price |
|---|---|---|
openai/gpt-transcribe | OpenAI | $0.0045 a minute |
openai/gpt-4o-mini-transcribe | OpenAI | $0.003 a minute |
openai/gpt-4o-transcribe | OpenAI | $0.006 a minute |
openai/whisper-1 | OpenAI | $0.006 a minute |
groq/whisper-large-v3-turbo | Groq | $0.04 an hour, at least 10 seconds a request |
groq/whisper-large-v3 | Groq | $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:
| Feature | On /v1/audio/transcriptions |
|---|---|
| Virtual keys, model allowlists, RPM limits, key and organization budgets | The same as chat. |
| Monthly quota | One transcription is one request. |
| Usage and cost | Priced per minute of audio, no tokens. Counted toward budgets, analytics and cost alerts like chat usage. |
| Request logs | Logged 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 templates | Not applied: no text goes in, only audio. |
| Fallback chains and backup keys | Not applied: each transcription model is one provider's. |
| Response caching, streaming | Not applied. |
Errors
In OpenAI's error shape, like every Gateway error; see Errors for the ones every endpoint shares, such as authentication and limits.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_body | The request isn't multipart/form-data, or the form couldn't be read. |
| 400 | missing_model, missing_file | The model or file field is missing. |
| 400 | model_not_found | Not one of the models above. |
| 400 | unsupported_response_format | response_format isn't json or text. |
| 404 | transcription_unavailable | Tempr has switched transcriptions off for now. |
| 413 | audio_too_long, audio_too_large | Over about two and a half minutes, or over 10 MB. |
| 415 | unsupported_audio | Not 16-bit PCM WAV, mono, 8 to 48 kHz. |