class RubyLLM::UploadedFile

An UploadedFile is the metadata record for a file stored with a provider through its Files API. Upload a file once with ::upload, then reuse its provider id or URI, for example as a chat attachment or in a batch.

file = RubyLLM.upload("batch.jsonl", purpose: "batch")
file.id         # => "file_..."
file.filename   # => "batch.jsonl"
file.byte_size  # => 1234

File ids are provider-owned. Persist provider alongside id and pass it back when finding or downloading the file later.