Skip to main content
Hand a file to a run so it can attach it to a page, at submit time, mid-run, or before its first step. The call answers a file id the agent uses to attach it; you never send the bytes twice and the model never sees them directly. The file is destroyed when the run ends, on every ending. To get a file the run downloaded, such as an invoice PDF, use downloads. Use agent.results for the data a run produced.
MCP carries the file’s bytes as base64 directly in the tool call, it has no other way to move bytes. The CLI takes a file path and reads it for you; the TypeScript SDK takes a raw Uint8Array and the Python SDK takes bytes, and both encode it for you. All four reach the same endpoint, POST https://api.outcrawl.ai/v1/agent/<id>/files.