How can I use an Assistant created in Playground as an API?


Would love some help - Is it possible to use an assistant i’ve created in playground , via API in python? I can’t seem to figure it out from the documentation. Currently I’ve been using gpt-3.5-turbo-1106 in my code but want to switch over to an assistant I’ve created.

You can retrieve the Assistant you created in the playground using the Assistant ID you see in the playground.

Besides that method, one can also list assistants via an API call, and use the name field supplied in the object to identify the assistant, and then retrieve its id.

Doing this in an automated manner would be a strange implementation, for example your own interface that allowed someone to chose an assistant to interact with. You’d have to rely on extra metadata you create (that can be inserted just by the API) such as “published” or “for_mychat_site” to differentiate usable ones from others that are private.

Then the actual usage is a multi-step process, with the lower user satisfaction of the AI only returning an answer after a period of processing and finishing the response, with the costs of using the assistant unpredictable and not reported to you.

You can use assistant id

ASSISTANT_ID = “” #Existing assistant

run = client.beta.threads.runs.create(,

Hey, thanks for the response however I have the assistant ID, the issue is with getting the code to work