Using Batch API Without uploading file

Can I use a JSON object to create a Batch instead of uploading a File Object to the Open AI?
The Idea is to run the code on a server without having to write in a file and uploading it to Open AI.
Thanks.