multipart/form-data (the same shape as curl -F). No base64, no payload doubling.
From a Path
From a file handle
f.name.
From raw bytes
Multiple files
_json text field automatically.
Nested files aren’t extracted
Only top-level file values become multipart fields. Files inside lists or nested dicts stay in the JSON sidecar and the server won’t see them as uploads:Don’t base64 yourself
Path, file-like object, or {"content": ..., "filename": ..., "mime_type": ...} dict. Plain strings pass through as scalar inputs.