File types support for Chat Completion beyond PDF

Hi, I know chat_completion API now supports PDF files natively. I also know image files are supported. What other file types are supported? I am interested to know if I can upload other file types like .py, .ipynb, .javascript etc?

You have mentioned PDF as user file input for direct context placement, and also images for computer vision, which can be used via (only) user messages.

Other destinations:

  • file search. This is by vector store file ID attachment, document files chunked with text extraction.
  • code interpreter. This is by “container” file ID attachment, then available in the Python notebook’s mount point

You can look at the internal tools documentation of Responses API or Assistants API.

Not available on Chat Completions - for there, you’d have to develop your own tool for function-calling or information placement method.