Files

Upload a file

Upload a file to GC AI for processing and storage. Files are uploaded as multipart form data and automatically processed (text extraction, summarization, and embedding creation).

With a user-scoped key, files default to the user's "My Files" folder. With an org-scoped key, files default to the "Organization Files" folder and the my-files scope is not available.

For PDFs and Word documents, extraction runs asynchronously. Poll GET /files/{id} until status is ready.

post/files

Request

Request body multipart/form-data

filestring binary required

The file to upload

folder_idstring uuid

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

project_idstring 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'my-files' | 'organization'

Upload to the root of a meta-collection ("my-files" or "organization"). Mutually exclusive with folder_id and project_id. shared-with-me is not valid for upload.

Example request

{
  "scope": "my-files"
}

Response

File uploaded successfully

idstring uuid required

Unique file identifier

namestring required

Original filename

sizenumber required

File size in bytes

content_typestring required

MIME type of the file

status'extracting' | 'embedding' | 'ready' | 'failed' required

Current processing status of the file

created_atstring required

ISO 8601 creation timestamp

folder_idstring uuid nullable

Folder the file belongs to

extraction_errorstring

Error message if extraction failed

project_idstring uuid

Project the file is linked to, if uploaded with project_id

warningstring

Present when the file was uploaded successfully but a secondary operation (e.g. project linking) failed

Example response

{
  "content_type": "application/pdf"
}

Changes

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