Completions Logs not available when using an uploaded file

Hi all,

I am using the OpenAI API to parse documents. I am using the /v1/chat/completions endpoint. Text documents (Word, email body), spreadsheets (Excel, CSV), or images (Base64) are inserted inline into the user content. The requests and responses are available in the Logs in my API Dashboard.

When parsing a PDF, I upload the file to the OpenAI Storage, using the OpenAI Java SDK. Here is a snippet of the code:

public String uploadFile(byte[] fileBytes, String fileName) throws IOException {
	Path tempFile = Files.createTempFile("openai_upload_", "_" + fileName);
	Files.write(tempFile, fileBytes);

	FileCreateParams params = FileCreateParams.builder().file(tempFile).purpose(FilePurpose.ASSISTANTS).build();
	FileObject file = client.files().create(params);
	Files.deleteIfExists(tempFile);

	return file.id();
}

In my request, this file_id is inserted in the user content:

{
	"type":"file",
	"file":{
		"file_id":"file-[...]"
	}
}

This works fine. However, this request and its response are not available in the Logs in my API Dashboard. I did include “store”: true in my request JSON.

Is it possible to make these request (and responses) available in the Logs? This would truly help with debugging complex issues.

Thanks in advance!

Hey @ONEtobeONE, really appreciate you digging into this and sharing the details. We’re taking a closer look on our side and will share an update once we know more.

- Sunny

In addition:
We did add “store”: true, but this didn’t work unfortunately.