# Mime Type / file extension for file inputs

**URL:** <https://community.openai.com/t/mime-type-file-extension-for-file-inputs/1384596>\
**Category:** API\
**Tags:** api, file-uploads, responses-api\
**Created:** [June 24, 2026, 12:11pm UTC](https://community.openai.com/t/mime-type-file-extension-for-file-inputs/1384596 "2026-06-24T12:11:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![exalog](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@exalog](https://community.openai.com/u/exalog)\
**Post date:** [June 24, 2026, 12:11pm UTC](https://community.openai.com/t/mime-type-file-extension-for-file-inputs/1384596/1 "2026-06-24T12:11:29Z")

</div>

Hi. I’m building an app using the Responses API where I need to pass files as input. We first upload the files using the Files API, with user\_data purpose and the we reference them using file\_id.

How relevant/important are the mime type and file extension for both APIs? I noticed that some extensions are rejected via the Files API (eg. .log). Also in the Responses API it seems to work sending a log file (.log, officially documented) even if the mime type is set as _application/octet-stream_ (not mentioned as accepted)

Can the mime type be set to any value as long as the extension is accepted? Is the mime type relevant?

---

<div class="post-metadata">

**Author:** ![OpenAI\_Support](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/openai_support/32/561845_2.png) [@OpenAI\_Support](https://community.openai.com/u/OpenAI_Support)\
**Post date:** [August 1, 2026, 5:38pm UTC](https://community.openai.com/t/mime-type-file-extension-for-file-inputs/1384596/2 "2026-08-01T17:38:06Z")

</div>

Hi [**exalog**](https://community.openai.com/u/exalog), thanks for sharing your use case.

In general, both the file extension and the MIME type should match the actual file contents.

For files used with the Responses API, it's recommended to upload them with purpose="user\_data" and use a supported file extension along with the correct MIME type. For example, a .log file should typically use text/plain.

While application/octet-stream may work in some cases, it isn't documented as a supported MIME type for this use case, so it's better not to rely on it.

[API Reference doc](https://developers.openai.com/api/reference/resources/files)

Avinash

---

<div class="post-metadata">

**Author:** ![avinash.api](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/avinash.api/32/741581_2.png) [@avinash.api](https://community.openai.com/u/avinash.api)\
**Post date:** [August 5, 2026, 2:20pm UTC](https://community.openai.com/t/mime-type-file-extension-for-file-inputs/1384596/3 "2026-08-05T14:20:28Z")

</div>

Closed on August 5, 2026, 2:20pm UTC


