What is a workaround to list all thread IDs from the OpenAI developer platform (https://platform.openai.com/threads/) using JavaScript?
There is no official API to list all available threads.
I found answers about the v1 API. It’s also possible to list messages for a given thread, but that’s not what is needed.
Sources:
2
Answers
After long day searching, found a way to get a list of all threads available on OpenAI developer platform dashboard threads page (https://platform.openai.com/threads).
Developer Tools
inside browser.Now you have a list of all threads that you can use further in your application.
Example use. WARNING! All data would be deleted, use with caution!
Delete all threads on OpenAI threads page:
No, you cannot list an existing thread via the Assistants API if you didn’t store the thread ID when creating it.
You can:
The
https://api.openai.com/v1/threads
API endpoint suggested in the comment above is to create a thread.Also, retrieving a thread is not what you’re looking for because you need to pass the thread ID to the API endpoint. There’s no way to list existing thread IDs via the Assistants API.