File Storage
Persist and share files through short-lived presigned URLs — Sapiom mints the URLs and tracks metadata while the bytes flow directly between your client and object storage.
Call it from an agent step
Section titled “Call it from an agent step”File storage is on the typed ctx.sapiom.* client, so sapiom_dev_agents_check validates the call at author time:
const { fileId, uploadUrl, requiredHeaders } = await ctx.sapiom.fileStorage.upload({ contentType: "application/pdf", fileName: "report.pdf", fileSize: bytes.byteLength, // required });// PUT the bytes to uploadUrl with requiredHeaders, then share via getDownloadUrl(fileId)upload, getDownloadUrl, list, setVisibility, and delete manage files. Autocomplete surfaces the full input and response types. See Using Capabilities.
Call it directly (no agent)
Section titled “Call it directly (no agent)”From Claude Code or Codex, reach file storage through Sapiom Cloud MCP. Ask for the outcome in ordinary language; your coding agent can discover the current tool and input contract.
From your own code
Section titled “From your own code”Outside an agent, call the same capability through the typed client—see the @sapiom/tools package:
const { downloadUrl } = await sapiom.fileStorage.getDownloadUrl(fileId);© 2026 Sapiom, Inc.