=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::uploads-upload_id-complete - Documentation for the /uploads/{upload_id}/complete path.

=head1 OPERATIONS

=head2 POST /uploads/{upload_id}/complete

=head3 completeUpload

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

Completes the
L<Upload|https://platform.openai.com/docs/api-reference/uploads/object> .

Within the returned Upload object, there is a nested
L<File|https://platform.openai.com/docs/api-reference/files/object> object
that is ready to use in the rest of the platform.

You can specify the order of the Parts by passing in an ordered list of the
Part IDs.

The number of bytes uploaded upon completion must match the number of bytes
initially specified when creating the Upload object. No Parts may be added
after an Upload is completed. Returns the Upload object with status
C<completed> , including an additional C<file> property containing the created
usable File object.

=head4 Path/query parameters

=over

=item * C<upload_id> (in path, required, string) - The ID of the Upload.

=back

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    "{\n  \"id\": \"upload_abc123\",\n  \"object\": \"upload\",\n  \"bytes\": 2147483648,\n  \"created_at\": 1719184911,\n  \"filename\": \"training_examples.jsonl\",\n  \"purpose\": \"fine-tune\",\n  \"status\": \"completed\",\n  \"expires_at\": 1719127296,\n  \"file\": {\n    \"id\": \"file-xyz321\",\n    \"object\": \"file\",\n    \"bytes\": 2147483648,\n    \"created_at\": 1719186911,\n    \"filename\": \"training_examples.jsonl\",\n    \"purpose\": \"fine-tune\",\n  }\n}\n"

=head1 SCHEMAS

=head2 CompleteUploadRequest

Properties:

=over

=item * C<md5> (string) - The optional md5 checksum for the file contents to verify if the bytes
uploaded matches what you expect.

=item * C<part_ids> (array of string, required) - The ordered list of Part IDs.

=back

=head2 Upload

Properties:

=over

=item * C<bytes> (integer, required) - The intended number of bytes to be uploaded.

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

=item * C<expires_at> (integer, required) - The Unix timestamp (in seconds) for when the Upload will expire.

=item * C<file> (allOf)

=item * C<filename> (string, required) - The name of the file to be uploaded.

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

=item * C<object> (string) - The object type, which is always "upload".

Allowed values: upload

=item * C<purpose> (string, required) - The intended purpose of the file.
L<Please refer here|https://platform.openai.com/docs/api-reference/files/object#files/object-purpose>
for acceptable values.

=item * C<status> (string, required) - The status of the Upload.

Allowed values: pending, completed, cancelled, expired

=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
