How to get a list of threads

I am lost :frowning:
I am trying to get a list of all available threads without saving them locally, but it looks like there is no such API like “list threads”.
I can get runs, but I need the threadId.
I can get messages, but I need the threadId.
I can get all the assistants, but they have no clue which thread they are attached to.

How can I see all threads without saving them locally?
Thank you

For now, you can’t. I had the same issue with the Threads so every time I create a Thread, I have to save it locally.

2 Likes

Just unbelievable.
You can list Assistants, Runs, Messages, … But you cannot list Threads.
My opinion? It would be too easy to create a way better UI than the ugly and feature-less official one. Done. Said it. Ban me.
But I do not see any technical reason behind this choice. Because it’s a choice they made.

Maybe its a security thing. I don’t want anyone to list all threads(conversations). I would want to differentiate the threads by the API Key used to create the thread. Maybe, I could be wrong but I agree, this is a must have feature.

1 Like

They already separate the key per-project, so without a key, you wouldn’t be able to see all the threads. But maybe you are right: at the beginning, when the key was “for all”, with a single key you could have known someone else’s thread, then maybe it’s a good reason why it’s not available now. They didn’t implement at the beginning, when the key was not per-project, and now either they forgot or they are doing it (er… It takes 5 minutes to implement it, since you already have all the others, it’s almost a copy/paste). Or a combination of all, including my “conspiration” theory :wink: with such an API, it would be trivial to implement a better UI and sell chatgpt for less than 20$/month…

1 Like

Save threads, messages, runs locally. So that you don’t make api request to list them each time. It will take less time to get them from local database rather that from api

1 Like

You are correct, I agree and I will do that from now on.
But at the moment I do have a lot of threads that I would like to recover that I didn’t save.
And YES they are available in the dashboard, but I have no access to that - I only have the APIkey.