OpenAI Batching API Error with file upload

Hey there, I’m stuck trying to use the Batching API from OpenAI

https://platform.openai.com/docs/guides/batch/getting-started

At the current stage the OpenAI Module doesn’t have the functionality to upload batch documents:

So I tried a couple workarounds for that:

  • Using the ‘Make an API call’ from OpenAI module doesn’t work because data should be in multipart/form-data, I get an error - [415] Invalid Content-Type header (application/json), expected multipart/form-data. (HINT: If you’re using curl, you can pass -H ‘Content-Type: multipart/form-data’)

  • Using the Make Request module from HTTP doesn’t work either because it mentions that the file extension is wrong:

Here’s the error:
CleanShot 2024-06-07 at 12.32.26

Does anyone how to handle form-data in different ways ??

Thanks
R

To get helpful responses

  • explain your goal with as much context as possible
  • mention any steps you’ve tried so far

Include screenshots of

  • your scenario setup (functions, mappings, variables, etc.)
  • module configurations and outputs
  • any error messages you are gettinge

HI @Riccardo_Vandra can you share an example of the text, I assume the issue is within the JSONL lining.

1 Like