Upload files non-local

Hi there!

We are trying to add a file for fine-tuning using the API OpenAI API. We want to do this on our Google Apps Script app Apps Script  |  Google Developers.

Seeing the method docs and samples, it seems like we can only provide the name of the file, which would exist locally. I tried creating a jsonl file on Apps Script, using our dataset, and providing the file blob, but I get a 400 error.

Is there an alternative way of inserting a file with the API?

Thank you.