I’m currently working on a Java web application using Spring Boot, where I need to upload a PDF and extract specific information from it. I’m trying to use OpenAI for this task, but I’m struggling to find enough documentation for Java, particularly on how to upload files. I found that OpenAI supports Vector Store and Assistant APIs for file uploads and information retrieval, but I’m not entirely sure how to implement this, especially with Java.
Does anyone know how I can achieve this or have any documentation/resources that could help me complete this request?
I did a quick search and found this Java package, but looks like it’s been archived.
However, all OpenAI API examples, including Assistants API work with standard curl (HTTP) requests. So any Java library that is able to behave like curl equivalent (sending HTTP requests to some URI), should work fine.
For example, on this page, you can see how to do everything by selecting “curl” option. To upload a file for example, you would do this: