NAME
OpenAPI::Client::OpenAI::Path::containers-container_id-files - Documentation for the /containers/{container_id}/files path.
OPERATIONS
GET /containers/{container_id}/files
ListContainerFiles
$client->list_container_files({
body => { ... },
});
List Container files
Lists container files.
Path/query parameters
container_id(in path, required, string)limit(in query, optional, integer) - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.Default: 20
order(in query, optional, string) - Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.Allowed values: asc, desc
Default: desc
after(in query, optional, string) - A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Responses
200 - Success
Content-Type: application/json
Example:
{
"data" : [
"{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n"
],
"first_id" : "string",
"has_more" : false,
"last_id" : "string",
"object" : "list"
}
POST /containers/{container_id}/files
CreateContainerFile
$client->create_container_file({
body => { ... },
});
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.
Creates a container file.
Path/query parameters
container_id(in path, required, string)
Responses
200 - Success
Content-Type: application/json
Example:
{
"bytes" : 880,
"container_id" : "cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04",
"created_at" : 1747848842,
"id" : "cfile_682e0e8a43c88191a7978f477a09bdf5",
"object" : "container.file",
"path" : "/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json",
"source" : "user"
}
SCHEMAS
ContainerFileListResource
Properties:
data(array of ContainerFileResource, required) - A list of container files.first_id(string, required) - The ID of the first file in the list.has_more(boolean, required) - Whether there are more files available.last_id(string, required) - The ID of the last file in the list.object(string, required) - The type of object returned, must be 'list'.Allowed values: list
ContainerFileResource
Properties:
bytes(integer, required) - Size of the file in bytes.container_id(string, required) - The container this file belongs to.created_at(integer, required) - Unix timestamp (in seconds) when the file was created.id(string, required) - Unique identifier for the file.object(string, required) - The type of this object (container.file).path(string, required) - Path of the file in the container.source(string, required) - Source of the file (e.g.,user,assistant).
CreateContainerFileBody
Properties:
file(string) - The File object (not file name) to be uploaded.file_id(string) - Name of the file to create.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.