Skip to main content
POST
/
openai
/
v1
/
containers
/
{container_id}
/
files
Create file in container (OpenAI format)
curl --request POST \
  --url http://localhost:8080/openai/v1/containers/{container_id}/files \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'file_path=<string>'
{
  "id": "<string>",
  "object": "<string>",
  "container_id": "<string>",
  "path": "<string>",
  "bytes": 123,
  "created_at": 123,
  "source": "<string>",
  "extra_fields": {
    "request_type": "<string>",
    "provider": "openai",
    "model_requested": "<string>",
    "model_deployment": "<string>",
    "latency": 123,
    "chunk_index": 123,
    "raw_request": {},
    "raw_response": {},
    "cache_debug": {
      "cache_hit": true,
      "cache_id": "<string>",
      "hit_type": "<string>",
      "provider_used": "<string>",
      "model_used": "<string>",
      "input_tokens": 123,
      "threshold": 123,
      "similarity": 123
    }
  }
}

Path Parameters

container_id
string
required

Container ID

Query Parameters

provider
string

Provider for the container (defaults to openai)

Body

Request to create a file in a container via multipart upload

file
file

The file content to upload

file_path
string

Optional path for the file within the container

Response

Successful response

Response from creating a file in a container

id
string

The unique identifier for the created file

object
string

The object type (always "container.file")

container_id
string

The ID of the container this file belongs to

path
string

The path of the file within the container

bytes
integer<int64>

The size of the file in bytes

created_at
integer<int64>

Unix timestamp of when the file was created

source
string

The source of the file

extra_fields
object

Additional fields included in responses