Initiate a Chunked Upload
Start a multipart upload session for a large file. Validates the file type, size, and destination up front, then returns an upload_id. Send the file in parts with PUT /files/uploads/{upload_id}/parts/{part_number}, then finalize with POST /files/uploads/{upload_id}/complete.
Use this instead of POST /files when a single request is impractical (large files, or clients with per-request payload limits). The destination options (folder_id / project_id / scope) behave exactly as on POST /files.
Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Body
Original filename, including extension.
1 - 255"msa-2026.pdf"
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.
x > 012582912
MIME type of the file. When omitted, it is derived from the filename extension.
"application/pdf"
Target folder ID. Defaults to the user's "My Files" folder. Mutually exclusive with project_id and scope.
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.
Upload to the root of a meta-collection ("my-files" or "organization"). Mutually exclusive with folder_id and project_id. User-scoped keys only.
my-files, organization "my-files"
Response
Upload session created
Opaque identifier for this upload session. Use it in the part and complete requests.
Recommended part size in bytes. Split the file into parts no larger than this for reliable transfers.
Maximum number of parts allowed for this session. Part numbers run from 1 to this value.
ISO 8601 timestamp after which the session expires. Upload all parts and call complete before this.