OpenAI API Supported File Types by Endpoint (2026)
What "OpenAI API supported file types" actually depends on
The query openai api supported file types looks like one list. It is not. Which formats you can send depends on the API surface you are calling, and often on the purpose you set when you upload the file.
A .docx or .xlsx that works as a Responses API input_file will be rejected if you attach it as a Chat Completions file part — that path accepts only PDF. A .csv you can send as input_file is not a File Search retrieval format. An image you analyze with input_image is a different object from a document input_file. Audio for /v1/audio/transcriptions has its own 25 MB format list.
This article stays on official OpenAI API formats. It is not a ChatGPT upload guide, and it is not about pointing a client at a compatible base_url. Compatible servers can expose a similar /v1 path and still reject or silently ignore types the official API accepts; that contract is covered in What Is an OpenAI-Compatible API?. If you are changing base_url through a proxy, verify file uploads on that path separately — see OpenAI API Proxy.
The official source of truth for document inputs is the file inputs guide. The lists below follow that page and the related Files, File Search, vision, and transcription docs. Formats change; if a request fails, trust the current error and the live docs over this article.
Responses API: the broad input_file list
For the Responses API, send documents as input_file items. You can provide:
- Base64-encoded file data (
file_data) - An uploaded file ID (
file_id) from the Files API - An external file URL (
file_url)
The common categories accepted as input_file are:
- PDF:
.pdf - Text and code:
.txt,.md,.json,.html,.xml, and a long list of source and log extensions - Rich documents:
.doc,.docx,.rtf,.odt(plus related Word, Pages, and Google Docs types in the full official table) - Presentations:
.ppt,.pptx(plus related PowerPoint, Keynote, and Google Slides types) - Spreadsheets:
.csv,.xls,.xlsx(plus.tsv,.iif, and other Excel extensions in the official table)
The full extension and MIME list is on the same page. Do not assume an unofficial extension works just because a sibling format does.
How the API treats each category
Processing is not the same for every type:
- PDFs, on vision-capable models such as
gpt-4oand later, are read as extracted text plus page images. You can setdetailon theinput_fileitem toauto,low, orhighto control how page images are processed. If you omit it,detaildefaults toauto. Official docs note that for GPT-5.6 and later models,autouseshigh; for earlier models it useslow.detailaffects page images only; extracted PDF text is still included. - Non-PDF documents and text (for example
.docx,.pptx,.txt, and code files) are extracted as text only. Embedded images and charts are not sent into the model context. If you need those diagrams, convert the file to PDF first, then send the PDF asinput_file. - Spreadsheet-like files (
.xlsx,.xls,.csv,.tsv,.iif) go through a spreadsheet-specific flow. The API parses up to the first 1,000 rows per sheet and adds model-generated summary and header metadata, rather than stuffing the entire sheet into context. For heavy aggregations or joins, official docs point you to other tools such as Hosted Shell, or to File Search for large corpora.
Chat Completions: PDF only
Chat Completions accepts only .pdf (application/pdf) as file content parts, whether you send file_data or file_id. External file_url is not supported on this API. Chat Completions file inputs also do not support the PDF detail field.
If you need a .docx, .pptx, .xlsx, or a text or code file in a Chat Completions request, do not attach it as a file part. Official guidance is to use the Responses API for non-PDF file inputs, or to read the file in your application and send the extracted text as a text content part.
This is the single most common reason a "supported file type" test fails: the format is valid on Responses and invalid on Chat Completions.
Files API uploads: purpose decides what you may send
Uploading with the Files API is a separate step from passing a file to a model. Create file accepts a purpose that constrains the format:
user_data— the flexible purpose for files you plan to pass as model inputs. Official file-input guidance says you can upload with any supported purpose, but you should useuser_datafor that path.assistants— Assistants API files. Those files have their own type list and a size cap of 2 million tokens per file; see the Assistants tools documentation.fine-tune—.jsonlonly, in the required fine-tuning schema.batch—.jsonlonly, up to 200 MB, in the Batch request schema. Batch files expire after 30 days by default; other purposes persist until you delete them unless you setexpires_after.vision— images used for vision fine-tuning.evals— evaluation datasets.
Storage limits on this endpoint: an individual file can be up to 512 MB, and each project can store up to 2.5 TB of files.
A file can upload successfully and still be unusable on the next call if the purpose does not match how you intend to use it. Check purpose before you debug the format list.
Example: upload a PDF with user_data, then pass its file_id into Responses as input_file.
from openai import OpenAI
client = OpenAI() # official API; do not point this example at a compatible base_url
uploaded = client.files.create(
file=open("briefing.pdf", "rb"),
purpose="user_data",
)
response = client.responses.create(
model="gpt-4.1", # pick a vision-capable model from your project for PDFs with page images
input=[
{
"role": "user",
"content": [
{"type": "input_text", "text": "Summarize this document and list any tables."},
{"type": "input_file", "file_id": uploaded.id},
],
}
],
)
print(response.output_text)The model ID in the example is a placeholder. Use a model your project can actually call, and prefer a vision-capable model when the PDF has meaningful page images.
File Search does not use the same list
If the file is large, or you want retrieval instead of stuffing the document into one request, use File Search over a vector store. Upload the file first, attach it to the vector store, wait until indexing status is completed, then enable the file_search tool.
The retrieval format list is narrower than Responses input_file. Officially documented formats include PDF, Word (.doc, .docx), PowerPoint (.pptx), plain text, Markdown, HTML, JSON, and common source files such as .py, .js, .ts, .java, .go, .cpp, .c, .cs, .css, .php, .rb, .sh, and .tex. For text/ MIME types, encoding must be utf-8, utf-16, or ascii.
Structured formats such as .csv and .jsonl are not supported for File Search retrieval. That is a documented limitation, not a bug in your upload. A CSV that works as Responses input_file will not become a retrievable File Search document.
File Search also does not parse images inside documents. If charts matter, convert to PDF and use input_file (which can include PDF page images on vision-capable models), or extract the chart some other way.
Images and audio are not input_file documents
Images. Vision uses input_image, not input_file. Supported image formats are PNG (.png), JPEG (.jpeg or .jpg), WEBP (.webp), and non-animated GIF (.gif). You can pass a fully qualified image URL, a base64 data URL, or a file ID created with the Files API. Official vision limits include up to 512 MB total payload per request and up to 1,500 images per request; images also count as tokens and must fit the model's context window. See the images and vision guide.
Audio. File transcription at /v1/audio/transcriptions is a different endpoint. Official supported input formats include flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, and webm, with a 25 MB file size limit. Current official guidance starts with gpt-transcribe for recorded speech in its original language. Live microphone or streaming audio is a Realtime transcription path, not this file-upload list. See the file transcription guide.
Do not expect a WAV or a PNG to appear on the Responses input_file document table, and do not expect a DOCX to be valid on the transcription endpoint.
Size limits and typical rejection reasons
When a request comes back 400 or an upload is refused, walk the stack in this order:
- Wrong endpoint. Non-PDF documents belong on Responses
input_file, not on Chat Completionsfileparts. - Wrong purpose. Fine-tune and Batch require
.jsonl. Model input files should be uploaded asuser_data. - Wrong retrieval format. CSV and JSONL are not File Search types.
- Size. 512 MB per Files API object and 2.5 TB per project; Batch JSONL up to 200 MB; transcription files up to 25 MB; Assistants files also have a 2 million token cap.
- Lost visuals.
.pptxor.xlsxcharts are not extracted unless you convert to PDF and send that PDF asinput_file. - Spreadsheet truncation. Only the first 1,000 rows per sheet are parsed in the spreadsheet augmentation flow.
- Compatible or proxied base URL. A third-party
/v1may implement chat but not file inputs, or may use a different type list. Test against the official API before blaming the file.
Frequently asked questions
Does the Chat Completions API support DOCX, PPTX, or CSV file parts?
No. Chat Completions file parts are PDF only. Use the Responses API input_file list for those document types, or extract the text in your app and send it as text.
Which Files API purpose should I use for model inputs?
Use user_data for files you will pass into the model, as the official file inputs guide recommends. fine-tune and batch are .jsonl pipelines, not general document input.
Can File Search index a CSV or JSONL file?
No. Official File Search documentation and the Assistants File Search FAQ state that structured formats such as .csv and .jsonl are not supported for retrieval. Send a CSV as Responses input_file if you need the model to see a slice of the sheet, and stay within the first-1,000-rows behavior.
Why did my PowerPoint or spreadsheet lose its charts?
For non-PDF files, the Responses API extracts text only and does not pull embedded images or charts into context. Convert the file to PDF, then send the PDF as input_file on a vision-capable model if the visuals matter.
Are image and audio formats part of the same "supported file types" list?
No. Images go through input_image (PNG, JPEG, WEBP, non-animated GIF). Audio transcription uses /v1/audio/transcriptions with its own format list and a 25 MB cap. Document input_file is a third list.
How to choose a path before you upload
Pick the surface first, then the format:
- Need the model to read a document or a sheet in one request? Use Responses
input_fileand the document or spreadsheet list above. - Stuck on Chat Completions? Attach a PDF, or send extracted text. Do not attach DOCX or CSV as a file part.
- Need retrieval over a large corpus? Use File Search and its narrower format list — not CSV or JSONL.
- Need page images, charts, or diagrams? Prefer PDF
input_fileon a vision-capable model. - Need a transcript? Use the audio transcription endpoint and its 25 MB format list.
Once the endpoint is fixed, the OpenAI API supported file types question becomes a short checklist instead of a single undocumented table.