NAME
OpenAPI::Client::OpenAI::Path::files-file_id - Documentation for the /files/{file_id} path.
OPERATIONS
DELETE /files/{file_id}
deleteFile
$client->delete_file({
body => { ... },
});
Delete a file and remove it from all vector stores.
Path/query parameters
file_id(in path, required, string) - The ID of the file to use for this request.
Responses
200 - OK
Content-Type: application/json
Example:
{
"deleted" : false,
"id" : "string",
"object" : "file"
}
GET /files/{file_id}
retrieveFile
$client->retrieve_file({
body => { ... },
});
Returns information about a specific file.
Path/query parameters
file_id(in path, required, string) - The ID of the file to use for this request.
Responses
200 - OK
Content-Type: application/json
Example:
"{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"expires_at\": 1680202602,\n \"filename\": \"salesOverview.pdf\",\n \"purpose\": \"assistants\",\n}\n"
SCHEMAS
DeleteFileResponse
Properties:
deleted(boolean, required)id(string, required)object(string, required)Allowed values: file
OpenAIFile
Properties:
bytes(integer, required) - The size of the file, in bytes.created_at(integer, required) - The Unix timestamp (in seconds) for when the file was created.expires_at(integer) - The Unix timestamp (in seconds) for when the file will expire.filename(string, required) - The name of the file.id(string, required) - The file identifier, which can be referenced in the API endpoints.object(string, required) - The object type, which is alwaysfile.Allowed values: file
purpose(string, required) - The intended purpose of the file. Supported values areassistants,assistants_output,batch,batch_output,fine-tune,fine-tune-results,vision, anduser_data.Allowed values: assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, user_data
status(string, required) - Deprecated. The current status of the file, which can be eitheruploaded,processed, orerror.Allowed values: uploaded, processed, error
status_details(string) - Deprecated. For details on why a fine-tuning training file failed validation, see theerrorfield onfine_tuning.job.
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.