For the complete documentation index, see llms.txt. This page is also available as Markdown.

files_create_upload_url

Prepare a large-file upload using filename, exact byte_length and content_hash=base64(SHA-256(file bytes)).

Effect: This call saves data or changes configuration. Review the behavior below before using it.

Inputs

Name
Type
Requirement
Description

filename

string

Required

Name of the uploaded file, including its extension.

byte_length

integer

Required

Exact file size in bytes, from 1 through 104857600 (100 MiB).

content_hash

string

Required

Standard base64 of the SHA-256 digest of the exact file bytes: 44 characters ending in =. Do not send a hexadecimal digest.

purpose

string

Optional

Default user-documents. Allowed: user-documents, user-content, user-tables, form-banner.

mime_type

string

Optional

Content type. Omitted: inferred from filename.

Example

These are MCP tool arguments, not an HTTP request body. Replace bracketed IDs with values returned from your account.

The size and hash below correspond to the UTF-8 bytes Approved notes. with no trailing newline. Compute them from your actual file before sending the request.

{
  "filename": "notes.txt",
  "byte_length": 15,
  "content_hash": "ccX1sDcgkglGrhFPo8Jc7mUSr9TXl+bpdPhYftxpbE0=",
  "mime_type": "text/plain"
}

Result

Abbreviated result example; unshown fields are omitted for clarity.

Behavior

The hash is 44 characters ending in =.

Maximum file size is 100 MiB.

Returns upload_url, upload_token, file_id, expiry and next_step.

The client must PUT the bytes directly with Authorization: Bearer <upload_token>, then finalize.

Bytes do not pass through MCP.

Duplicate content hashes can reuse a file record.

Troubleshooting

If size or hash validation fails, recompute both from the exact bytes to be uploaded. Complete the PUT before the returned expiry; do not finalize an incomplete upload.

File uploads

Upload a larger document

Connection, permissions, pagination, and recovery

Was this helpful?