Request an upload
Usefile__request_upload before creating an artifact whose bytes cannot fit
in a tool argument.
- Optional inputs:
size_bytes,session_id, and Gateway’srationale. - Returns:
upload_url,upload_key,is_presigned,expires_in_seconds, andmax_bytes. - Effect: write; mints a temporary upload capability.
is_presigned is true, send the bytes without the Gateway bearer token. If
it is false, resolve the root-relative URL against the Gateway origin and send
the bearer token. Treat the URL as a password and do not log it.
After the upload, create the artifact with upload_key in its metadata. The
artifact kind’s other required fields still apply.