Several questions in Assistant API development

  1. Is there any way to retrieve assistants with curl command

  2. There is still doubt about the model of how to run messages in thread(s). In API interaction, do we usually run messages in one thread, or run messages in multiple threads. For example, in one api call, there are 4 messages in one thread, and I run them in thread A, and later, there are another 2 messages, shall I run them in thread A, or run them in a new thread B? although either way is ok, the run models need their corresponding command suites.

  3. If we run additional new messages in thread A, is there any curl command to run thread A to and specify that only some messages to run.

Looking for supports. Thanks.

  1. Yes, you can retrieve the assistants with the API’s /v1/assistants endpoint.
    This is explained under “List Assistants” in the API reference.

  2. You can think of a thread as a conversation. Just how ChatGPT has conversations on the sidebar, a thread refers to this conversation. You can choose to continue conversation A (thread A), or thread B. Depending on the conversation you wish to continue, you would run the assistant on the specified thread.

  3. The curl command can be used to run an assistant response within the specified thread. You may run an assistant on a thread by using the API’s /v1/threads/{thread_id}/runs endpoint

1 Like

Thanks. It helps to solve my puzzle. Appreciated. :grinning:

1 Like

Hi Thanks for you help with my last question.

If you have time, can you help me to check, if there is any api to list all threads under one assistant please?

I read the API Reference and didn’t find any curl command to list all threads. Really appreciated if you have time to help to check.

Correct if I’m wrong please. currently, in API, I don’t know how to my thread through API. After creating a thread, if I didn’t record the thread Id, I can’t find a way to get the thread Id back.

Or it’s just the design of the thread system that I need to record the thread Id myself for future use.


Hi @EricBo , for the time being, one solution would be to create a database table for the chats, it can include a column for the assistant and another for the thread, this way you can query the threads associated to the assistant.

Thanks It’s confirmed. Thank you for your time. :grinning:

1 Like

Hi there. Would you happen to know the call to list all threads? The only one I could find is by supplying the thread ID. Thanks!