Skip to main content
Tools that accept files mark the field in their inputSchema with "format": "engini/file" (a list of files is an array with that format). The SDK’s File helper handles encoding.

Direct execution

Constructors: File.from_path(path) (mime type inferred), File.from_bytes(data, filename=...), File.from_base64(b64, filename=...) - camelCase equivalents in TS. In TypeScript, File shadows the global DOM/Node File inside your import scope.

Files in an LLM loop

Models can’t emit binary content, so the SDK rewrites file fields into string reference keys: you register files under names, the model picks a name, and handle_tool_calls resolves it.
An unknown reference key raises EnginiValidationError.

From the CLI

Repeat --file field=@path with the same field name to build a list.