NAME

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

OPERATIONS

POST /uploads/{upload_id}/cancel

cancelUpload

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

Cancels the Upload. No Parts may be added after an Upload is cancelled.

Returns the Upload object with status cancelled .

Path/query parameters

  • upload_id (in path, required, string) - The ID of the Upload.

Responses

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"

SCHEMAS

Upload

Properties:

  • bytes (integer, required) - The intended number of bytes to be uploaded.

  • created_at (integer, required) - The Unix timestamp (in seconds) for when the Upload was created.

  • expires_at (integer, required) - The Unix timestamp (in seconds) for when the Upload will expire.

  • file (allOf)

  • filename (string, required) - The name of the file to be uploaded.

  • id (string, required) - The Upload unique identifier, which can be referenced in API endpoints.

  • object (string) - The object type, which is always "upload".

    Allowed values: upload

  • purpose (string, required) - The intended purpose of the file. Please refer here for acceptable values.

  • status (string, required) - The status of the Upload.

    Allowed values: pending, completed, cancelled, expired

SEE ALSO

OpenAPI::Client::OpenAI::Path

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.