Skip to main content
POST
Initiate a chunked upload

Authorizations

Authorization
string
header
required

API key for authentication. Format: gcai_xxxxxxxxx

Create API keys in the GC AI app under Settings → API.

Body

application/json
file_name
string
required

Original filename, including extension.

Required string length: 1 - 255
Example:

"msa-2026.pdf"

size
integer
required

Total size of the complete file in bytes. Validated up front against the file-size limit so oversized uploads fail before any parts are sent.

Required range: x > 0
Example:

12582912

content_type
string

MIME type of the file. When omitted, it is derived from the filename extension.

Example:

"application/pdf"

folder_id
string<uuid>

Target folder ID. Defaults to the user's "My Files" folder. Mutually exclusive with project_id and scope.

project_id
string<uuid>

Upload the file into a project. The file is placed in the project's upload folder and linked to the project. Mutually exclusive with folder_id and scope.

scope
enum<string>

Upload to the root of a meta-collection ("my-files" or "organization"). Mutually exclusive with folder_id and project_id. User-scoped keys only.

Available options:
my-files,
organization
Example:

"my-files"

Response

Upload session created

upload_id
string<uuid>
required

Opaque identifier for this upload session. Use it in the part and complete requests.

part_size
number
required

Recommended part size in bytes. Split the file into parts no larger than this for reliable transfers.

max_parts
number
required

Maximum number of parts allowed for this session. Part numbers run from 1 to this value.

expires_at
string
required

ISO 8601 timestamp after which the session expires. Upload all parts and call complete before this.