Files

Complete file upload

Verifies that the bytes were uploaded to the signed URL returned by Create file upload session, then promotes the object to a durable REST API file record. This call is idempotent by upload_id; retrying after a successful completion returns the same file metadata. When the session was created with sha256, the API verifies the stored object's SHA-256 before completing it.

post/api/v1/files/uploads/{upload_id}/complete

Request

  • Base URL: https://api.studio.kaitoi.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.studio.kaitoi.io/api/v1/files/uploads/{upload_id}/complete
  • Auth: HTTP bearer

Path parameters

upload_idstring required

Headers

authorizationstring nullable

Request body

actualSizeBytesinteger nullable

Optional client-observed byte count.

actualSha256string nullable

Optional client-observed lowercase hex SHA-256. Required for multipart uploads when the session was created with sha256.

Example request

{
  "actualSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "actualSizeBytes": 12345
}

Response

Completed file metadata.

fileIdstring required

Stable file identifier for REST API inputs and outputs.

filenamestring required

Original filename supplied by the developer.

contentTypestring required

Detected or supplied media type.

sizeBytesinteger required

Stored file size in bytes.

externalIdstring nullable

Developer-provided external file identifier.

externalUserIdstring nullable

Developer-provided end-user identifier.

externalWorkspaceIdstring nullable

Developer-provided workspace/team identifier.

createdAtstring date-time required

Upload timestamp.

updatedAtstring date-time required

Last metadata update timestamp.

Example response

{
  "contentType": "image/png",
  "createdAt": "2026-05-24T12:00:00+00:00",
  "externalId": "asset_123",
  "externalUserId": "user_789",
  "externalWorkspaceId": "team_456",
  "fileId": "2f8f8c5df80e4f76a5b7d1bbd6fae0ab.png",
  "filename": "input.png",
  "sizeBytes": 12345,
  "updatedAt": "2026-05-24T12:00:00+00:00"
}

Changes

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