Skip to main content

POST /v1/audio/transcriptions

Transcribe an audio file into text.

  • Method: POST
  • Path: /v1/audio/transcriptions
  • Auth: Bearer token in Authorization header
  • Content-Type: multipart/form-data

Request parameters

  • model (string, required): Transcription model ID (e.g., gpt-4o-transcribe).
  • file (binary, required): The audio file to transcribe.
  • prompt (string, optional): Optional prompt to guide the transcription.
  • language (string, optional): Language hint (BCP-47/ISO code if applicable).

Example requests

from openai import OpenAI

client = OpenAI(base_url="https://api.naga.ac/v1", api_key="YOUR_API_KEY")

with open("audio.mp3", "rb") as f:
transcription = client.audio.transcriptions.create(
model="gpt-4o-transcribe",
file=f,
prompt=None,
language=None,
)
print(transcription.text)

Response

Returns a JSON object with the transcription result, e.g.:

{ "text": "Hello and welcome to NagaAI!" }