This report is missing:
- if the API now errors on the exact same call previously successful
- what the file type is being attached, the length, if it is under the documented number of pages, if it would exceed the model input context window, MIME type being used in the data URL, etc
- which API model is giving the issue
- which API endpoint is giving the issue
- which programming language is being used
- (we can infer
openai.APIError means SDK usage)
I created a script to make extensive calls if desired, a variant of the scripting to keep the vision costs in check across all models and endpoints - now with any type of file input from a local file as BASE64. The only thing it reveals is the greatly-increased expense of gpt-5.4 series with the same file, because of large vision input being used. Where I expect this cost bloat and use the mini model as an avoidance technique.
Testing log of a small PDF:
File : test1.pdf (application/pdf)
| model | chat input tokens | responses input tokens |
| ------------------ | ----------------- | ---------------------- |
| gpt-5.4-mini | 1727 | 1829 |
| gpt-5.1-2025-11-13 | 310 | 680 |
| gpt-4.1-2025-04-14 | 311 | 816 |
| gpt-4o-2024-08-06 | 311 | 816 |
Where all models can also answer about the file:
--- Testing gpt-4o-2024-08-06 (Responses)
gpt-4o-2024-08-06 Total input tokens: 816
The document is an image of a webpage titled "My Joke Website." It features
Result: success on PDF as input_file or file_input message attachment.
File types and their MIME mappings by extensions you might find useful - to tell us which caused an input error.
# ---------------------------------------------------------------------------
# MIME-type table (extension → MIME) for all OpenAI-accepted file types
# ---------------------------------------------------------------------------
EXTENSION_TO_MIME: dict[str, str] = {
# PDF
".pdf": "application/pdf",
# Spreadsheets
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
".xls": "application/vnd.ms-excel",
".xla": "application/vnd.ms-excel",
".xlb": "application/vnd.ms-excel",
".xlc": "application/vnd.ms-excel",
".xlm": "application/vnd.ms-excel",
".xlt": "application/vnd.ms-excel",
".xlw": "application/vnd.ms-excel",
".csv": "text/csv",
".tsv": "text/tsv",
".iif": "text/x-iif",
# Rich documents
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
".doc": "application/msword",
".dot": "application/msword",
".odt": "application/vnd.oasis.opendocument.text",
".rtf": "application/rtf",
# Presentations
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
".ppt": "application/vnd.ms-powerpoint",
".pot": "application/vnd.ms-powerpoint",
".ppa": "application/vnd.ms-powerpoint",
".pps": "application/vnd.ms-powerpoint",
".pwz": "application/vnd.ms-powerpoint",
".wiz": "application/vnd.ms-powerpoint",
# Text / code
".txt": "text/plain",
".text": "text/plain",
".log": "text/plain",
".conf": "text/plain",
".md": "text/markdown",
".markdown": "text/markdown",
".rst": "text/x-rst",
".html": "text/html",
".htm": "text/html",
".mht": "text/html",
".mhtml": "text/html",
".xml": "text/xml",
".json": "application/json",
".yaml": "application/x-yaml",
".yml": "application/x-yaml",
".toml": "application/toml",
".ini": "text/x-ini",
".css": "text/css",
".js": "text/javascript",
".mjs": "text/javascript",
".ts": "text/x-typescript",
".py": "text/x-python",
".sh": "text/x-sh",
".bash": "text/x-bash",
".ksh": "text/x-shellscript",
".bat": "text/x-shellscript",
".sql": "application/x-sql",
".c": "text/x-c",
".cc": "text/x-c++",
".cpp": "text/x-c++",
".cxx": "text/x-c++",
".h": "text/x-c",
".hh": "text/x-c",
".java": "text/x-java",
".go": "text/x-go",
".rs": "text/x-rust",
".rb": "text/x-ruby",
".php": "text/x-php",
".cs": "text/x-csharp",
".swift": "text/x-swift",
".kt": "text/x-kotlin",
".pl": "text/x-perl",
".r": "text/x-r",
".asm": "text/x-asm",
".s": "text/x-asm",
".eml": "message/rfc822",
".srt": "text/srt",
".vtt": "text/vtt",
".vcf": "text/x-vcard",
".ics": "text/calendar",
".ifb": "text/calendar",
}
Similar topic - similar timeline of a problem, but when using “background” on Responses: