How to transcribe audio with an API

Turn recordings into text with a speech-to-text model.

Upload the audio

Send the audio file to the transcriptions endpoint and read the text from the response.

Example

from openai import OpenAI

client = OpenAI(api_key="YOUR_TOKENREX_KEY", base_url="https://tokenrex.ai/api/public")
with open("meeting.mp3", "rb") as f:
    t = client.audio.transcriptions.create(model="gpt-transcribe", file=f)
print(t.text)
Get API keyCost calculatorDocs

Questions

Do I need a separate key for each provider?
No. One TokenRex API key works for every enabled model; change only the model ID.

Related