apicheats.dev Cheat sheet Raw .md
POST

Try POST /uploads — OpenAI API

OpenAI playground

Create upload

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.openai.com; the proxy stores and logs nothing about them.

Body application/json

5 body fields
  • filename · required · string — The name of the file to upload.
  • purpose · required · string — The intended purpose of the uploaded file. See the [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29).
  • bytes · required · integer — The number of bytes in the file you are uploading.
  • mime_type · required · string — The MIME type of the file. This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.
  • expires_after · optional · object — The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.