uploads

Complete an upload

Assembles the listed parts and materializes the upload as a regular file-... object referenced via the returned file field. part_ids must follow upload order and sum to the declared bytes; any other order is refused with a 400 rather than reordered. Completing an already completed session returns the same file.

post/v1/uploads/{id}/complete

Request

  • Base URL: https://api.aiand.com
  • URL: https://api.aiand.com/v1/uploads/{id}/complete
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

part_idsstring[] required

Part ids returned by /parts, in the order the parts were uploaded. Their sizes must sum to the declared bytes.

md5string

Optional MD5 of the assembled file

Response

The completed upload, with file populated

idstring required

Stable upload session id with upload- prefix

object'upload' required
bytesinteger required

Declared total size of the file being uploaded

created_atinteger required

Unix timestamp

expires_atinteger required

Unix timestamp (1 hour from creation by default)

filenamestring nullable required
purpose'vision' | 'video' | 'audio' | 'document' required
status'pending' | 'completed' | 'cancelled' | 'expired' | 'failed' required

Changes

No recorded changes to this operation across all 1 revision of this API.