Skip to content

request_file_upload_url

Request a signed URL to upload a file directly to storage.

Returns a signed upload URL and file_id. After receiving the URL, perform
the upload using this two-step resumable upload flow:

Step 1 — Initiate the resumable upload:
POST {upload_url}
Headers:
Content-Type: {content_type}
x-goog-resumable: start
Body: (empty)
Response: 201 with Location header containing the session URI.

Step 2 — Upload file content:
PUT {session_uri_from_Location_header}
Headers:
Content-Type: {content_type}
Body: raw file bytes
Response: 200 on success.

After upload completes, use the returned file_id as input to generation tools.
The upload URL expires in 15 minutes. Maximum file size: 64 MB.

IMPORTANT: Call tool `get_instructions` first for general platform guidance.

Parameters

ParameterTypeDefaultDescription
workspace_idrequiredstring (uuid)The user's workspace id.
content_typerequiredstringMIME type of the file. Allowed: image/png, image/jpeg, image/webp, video/mp4, audio/wav, audio/mpeg.
file_size_bytesrequiredinteger>0Expected file size in bytes. Maximum 64 MB.
file_namestringOptional file name. Auto-generated from content_type if omitted.