Cost efficiency on managing threads

I’m thinking of creating more than 100K threads everyday, instead of maintaining 50K threads. The reason is that I need only 2 messages from each thread. So, I don’t want to make threads big. As I understand, bigger thread costs maximum price of context window for every communication with model. Am I right?

Hi and welcome to the Developer Forum!

Yes, a new thread will not have any past context to add to the token overhead, but I question your use of assistants for this, this sounds like the sort of thing that could be done more simply with the normal API.

Thanks for your warm welcome :slight_smile:

There will be some data Model might need to give an answer. So I want to utilize Model.

Is there any limitation for creating threads in terms of cost? or just OK for creating and deleting them without charge?

Thanks for your reply in advance!


Not aware of any restrictions around creating threads, but I would be mindful of possible restrictions in the future, if creating lots of threads becomes commonplace and becomes a significant load on the backend, then I can see that being restricted or at least thought about and I would not build on there being it an infinite resource.

I think if you manage your threads well, i.e. delete them as soon as your are finished with them, then that would be less of an issue going forwards.

1 Like

No cost in creating Threads.

I have over 30K threads and counting…

Costs are only for Model usage and file usage.

1 Like

Thank you all!

@idonotwritecode It’s great to know clearer answer!
@Foxalabs I’m sure that well management of threads must be the pre-requirement for creating abundant threads. Thanks for warm advice!

1 Like