Skip to content

gpt-4o-transcribe client.audio.transcriptions.create fails on all supported audio types (“This model does not support the format you provided.”) #2477

@M0inUddin

Description

@M0inUddin

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

When calling client.audio.transcriptions.create(model="gpt-4o-transcribe", file=...) I consistently receive:

openai.BadRequestError: Error code: 400 - {'error': {'message': 'This model does not support the format you provided.', 'type': 'invalid_request_error', 'param': 'messages', 'code': 'unsupported_format'}}

regardless of supplying the file as:

  • wav (PCM‑16, 16 kHz, mono)
  • mp3
  • m4a (AAC)
  • an in‑memory BytesIO buffer with .name set to the proper extension

The same code works fine with the whisper-1 model, but gpt-4o-transcribe/mini always rejects the input, even though I have verified via ffprobe/sox that my files are valid PCM‑16 WAV, standard MP3, or AAC.

To Reproduce

from openai import OpenAI
from dotenv import load_dotenv
from io import BytesIO
import os

load_dotenv()
client = OpenAI()

# 1) Try WAV on disk
with open("audio.wav", "rb") as f:
    resp = client.audio.transcriptions.create(
        model="gpt-4o-transcribe",
        file=f
    )
print(resp)

# 2) Try MP3 on disk
with open("audio.mp3", "rb") as f:
    resp = client.audio.transcriptions.create(
        model="gpt-4o-transcribe",
        file=f
    )
print(resp)

# 3) Try M4A on disk
with open("audio.m4a", "rb") as f:
    resp = client.audio.transcriptions.create(
        model="gpt-4o-transcribe",
        file=f
    )
print(resp)

# 4) Try BytesIO wrapper
data = open("audio.wav", "rb").read()
buffer = BytesIO(data)
buffer.name = "audio.wav"
buffer.seek(0)
resp = client.audio.transcriptions.create(
    model="gpt-4o-transcribe",
    file=buffer
)
print(resp)

Code snippets

from openai import OpenAI

from dotenv import load_dotenv

load_dotenv()

client = OpenAI()

audio_file = open("temp/audio.wav", "rb")
transcription = client.audio.transcriptions.create(
    model="gpt-4o-transcribe", file=audio_file
)
print(transcription.text)

OS

Windows 11

Python version

3.13

Library version

openai==1.97.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions