---
title: "Create container file"
method: POST
path: "/containers/{container_id}/files"
---

# Create container file

`POST /containers/{container_id}/files`

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.

## Path parameters

- `container_id` string, required

## Request body

- CreateContainerFileBody
  - `file_id` string — Name of the file to create.
  - `file` string, binary — The File object (not file name) to be uploaded.

## Response `200`

Success

- ContainerFileResource
  - `id` string, required — Unique identifier for the file.
  - `object` 'container.file', required — The type of this object (`container.file`).
  - `container_id` string, required — The container this file belongs to.
  - `created_at` integer, required — Unix timestamp (in seconds) when the file was created.
  - `bytes` integer, required — Size of the file in bytes.
  - `path` string, required — Path of the file in the container.
  - `source` string, required — Source of the file (e.g., `user`, `assistant`).

---

[API](https://skmtc.net/openai/apis/openai-api.md) · [All operations](https://skmtc.net/openai/apis/openai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api/versions/dcd35773a322/schema)
