GET OpenAI Messages Max 20 Messages

Hi all,

I’m trying to retrieve all the messages within a thread from OpenAI.
As seen from the screenshot above, the GET request was successful.
However, upon closer inspection, it seems like only 20 messages were retrieved from the API.
I have checked using Postman and it shows more than 20 messages, which agrees with what I can see on OpenAi’s dashboard:

So I concluded that the issue must be with the HTTP request module having some sort of a limit. Can someone confirm this to be true?
And is there a way to increase this limit so that I can extract more messages.

Thank you for your time :smile:

Which endpoint are you calling?

If List messages, you can specify the limit (page size) in the Query parameters.

If you have more than 100, you must use the after parameter with the last_id variable to continue fetching more using a second HTTP module.

samliewrequest private consultation

Join the Make unofficial Discord server!