Upload and attach a file
uploads/ when a run uses
its workspaceId. You do not need to repeat their IDs in attachedFileIds.
Staged attachments are different: attach their IDs when creating the run.
Files attached to a session remain available to its follow-ups. An explicitly
attached staged file takes precedence over a workspace upload with the same
stored filename. For a new conversation that needs persistent files, pass the
same workspaceId; reusing a workspace does not copy conversation history.
Retrieve created files
Ask the agent to save its output, wait for the run to finish, then list the workspace:Storage and upload limits
CheckGET /api/v4/workspaces/{workspace_id}/size for usedBytes and
maxBytes. The current V4 upload allowance is 950 MiB per workspace for every
account, with 50 MiB per file. It leaves room for runtime files on the agent’s
1 GiB persistent disk. An upload quota is separate from the number of
workspaces you can create, and from temporary disk used by a running agent.
A 413 response means a file or workspace limit was exceeded. Remove unneeded
files, split large files, or use a fresh workspace. Do not retry an unchanged
oversized upload. Deleting a session, archiving a workspace, and deleting a
workspace are different operations; archiving is not a file-deletion request.
Download a file promptly or request a fresh URL when its link expires. A
short-lived download URL does not mean the stored file expires after 60 seconds.