Create container file

Changed on

Create a Container File

You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.

post/containers/{container_id}/files

Request

  • Base URL
    https://api.openai.com/v1
  • URL
    https://api.openai.com/v1/containers/{container_id}/files
  • Auth
    HTTP bearer

Path parameters

container_idstring required

Request body

file_idstring

Name of the file to create.

filestring binary

The File object (not file name) to be uploaded.

Response

Success

idstring required

Unique identifier for the file.

objectstring required

The type of this object (container.file).

container_idstring required

The container this file belongs to.

created_atinteger required

Unix timestamp (in seconds) when the file was created.

bytesinteger required

Size of the file in bytes.

pathstring required

Path of the file in the container.

sourcestring required

Source of the file (e.g., user, assistant).

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status