=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::vector_stores-vector_store_id-files - Documentation for the /vector_stores/{vector_store_id}/files path.

=head1 OPERATIONS

=head2 GET /vector_stores/{vector_store_id}/files

=head3 listVectorStoreFiles

  $client->list_vector_store_files({
      body => { ... },
  });

Returns a list of vector store files.

=head4 Path/query parameters

=over

=item * C<vector_store_id> (in path, required, string) - The ID of the vector store that the files belong to.

=item * C<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

=item * C<order> (in query, optional, string) - Sort order by the C<created_at> timestamp of the objects. C<asc> for ascending
order and C<desc> for descending order.

Allowed values: asc, desc

Default: desc

=item * C<after> (in query, optional, string) - A cursor for use in pagination. C<after> is 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.

=item * C<before> (in query, optional, string) - A cursor for use in pagination. C<before> is an object ID that defines your
place in the list. For instance, if you make a list request and receive 100
objects, starting with obj_foo, your subsequent call can include
before=obj_foo in order to fetch the previous page of the list.

=item * C<filter> (in query, optional, string) - Filter by file status. One of C<in_progress> , C<completed> , C<failed> ,
C<cancelled> .

Allowed values: in_progress, completed, failed, cancelled

=back

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    {
       "data" : [
          "{\n  \"id\": \"file-abc123\",\n  \"object\": \"vector_store.file\",\n  \"usage_bytes\": 1234,\n  \"created_at\": 1698107661,\n  \"vector_store_id\": \"vs_abc123\",\n  \"status\": \"completed\",\n  \"last_error\": null,\n  \"chunking_strategy\": {\n    \"type\": \"static\",\n    \"static\": {\n      \"max_chunk_size_tokens\": 800,\n      \"chunk_overlap_tokens\": 400\n    }\n  }\n}\n"
       ],
       "first_id" : "file-abc123",
       "has_more" : false,
       "last_id" : "file-abc456",
       "object" : "list"
    }

=head2 POST /vector_stores/{vector_store_id}/files

=head3 createVectorStoreFile

  $client->create_vector_store_file({
      body => { ... },
  });

Create a vector store file by attaching a
L<File|https://platform.openai.com/docs/api-reference/files> to a
L<vector store|https://platform.openai.com/docs/api-reference/vector-stores/object>
.

This endpoint is subject to a per-vector-store write rate limit of 300
requests per minute, shared with
C</vector_stores/{vector_store_id}/file_batches> . For uploading multiple
files to the same vector store, use the file batches endpoint to reduce
request volume.

=head4 Path/query parameters

=over

=item * C<vector_store_id> (in path, required, string) - The ID of the vector store for which to create a File.

=back

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    {
       "chunking_strategy" : {
          "static" : {
             "chunk_overlap_tokens" : 400,
             "max_chunk_size_tokens" : 800
          },
          "type" : "static"
       },
       "created_at" : 1698107661,
       "id" : "file-abc123",
       "last_error" : null,
       "object" : "vector_store.file",
       "status" : "completed",
       "usage_bytes" : 1234,
       "vector_store_id" : "vs_abc123"
    }

=head1 SCHEMAS

=head2 ChunkingStrategyRequestParam

The chunking strategy used to chunk the file(s). If not set, will use the
C<auto> strategy.

=head2 CreateVectorStoreFileRequest

Properties:

=over

=item * C<attributes> (VectorStoreFileAttributes)

See L</VectorStoreFileAttributes> below for shape.

=item * C<chunking_strategy> (ChunkingStrategyRequestParam)

See L</ChunkingStrategyRequestParam> below for shape.

=item * C<file_id> (string, required) - A L<File|https://platform.openai.com/docs/api-reference/files> ID that the
vector store should use. Useful for tools like C<file_search> that can access
files. For multi-file ingestion, we recommend
L<C<file_batches>|https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch>
to minimize per-vector-store write requests.

=back

=head2 ListVectorStoreFilesResponse

Properties:

=over

=item * C<data> (array of VectorStoreFileObject, required)

=item * C<first_id> (string, required)

=item * C<has_more> (boolean, required)

=item * C<last_id> (string, required)

=item * C<object> (string, required)

=back

=head2 VectorStoreFileAttributes

Set of 16 key-value pairs that can be attached to an object. This can be
useful for storing additional information about the object in a structured
format, and querying for objects via API or the dashboard. Keys are strings
with a maximum length of 64 characters. Values are strings with a maximum
length of 512 characters, booleans, or numbers.

=head2 VectorStoreFileObject

Properties:

=over

=item * C<attributes> (VectorStoreFileAttributes)

See L</VectorStoreFileAttributes> below for shape.

=item * C<chunking_strategy> (object) - The strategy used to chunk the file.

=item * C<created_at> (integer, required) - The Unix timestamp (in seconds) for when the vector store file was created.

=item * C<id> (string, required) - The identifier, which can be referenced in API endpoints.

=item * C<last_error> (anyOf, required)

=item * C<object> (string, required) - The object type, which is always C<vector_store.file> .

Allowed values: vector_store.file

=item * C<status> (string, required) - The status of the vector store file, which can be either C<in_progress> ,
C<completed> , C<cancelled> , or C<failed> . The status C<completed> indicates
that the vector store file is ready for use.

Allowed values: in_progress, completed, cancelled, failed

=item * C<usage_bytes> (integer, required) - The total vector store usage in bytes. Note that this may be different from
the original file size.

=item * C<vector_store_id> (string, required) - The ID of the
L<vector store|https://platform.openai.com/docs/api-reference/vector-stores/object>
that the L<File|https://platform.openai.com/docs/api-reference/files> is
attached to.

=back

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 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.

=cut
