Delete a conversation does not delete its items

Hello, I’m starting to use the new Conversation API replacing Thread. However, according to the documentation, removing a conversation does not remove its items.

/api/reference/python/resources/conversations/methods/delete

To me this means to avoid additional costs, when deleting a conversation I need to also take care of deleting its items. This is not convenient with the current API which allows the items to be removed one by one.

Am I missing something?

Welcome to the developer community @artin :waving_hand:

As far as I know, the Conversations API itself doesn’t incur usage charges. It simply stores and manages conversation state.

Costs are only generated when a model processes data, for example via the OpenAI Responses API, where billing is based on the tokens processed by the model, not on the existence of the stored conversation or its items.

Because of that:

  • Deleting a conversation mainly makes it inaccessible for future use through APIs like Responses.
  • The conversation items themselves don’t generate ongoing costs, since they are just stored state and are only billed if they are included in a model request.

So in practice, you usually don’t need to delete items individually to avoid costs. The costs only incur when those items are sent to a model for inference.

1 Like

The missing context here is the arbitrary and ambiguous “items” being referred to, which doesn’t convey any meaning.

The only surface where application transferrence coming from Assistants API may not meet expectations is of thread attachment of vector stores, where by a general appearance of “attaching” a file id to a thread, a vector store would automatically be created and be employed by the thread use.

The existence of a vector store costs you money daily, but Assistants merely provided an illusion. A vector store created automatically by a thread had an expiration of one week. Not only would the vector store ID still hang around and bill after a thread was deleted and abandoned, but also when it did automatically expire, you would have a failure when re-engaging with a chat weeks later.

Files are free to upload. A smart application developer doesn’t upload customer data for any longer than needed, and certainly doesn’t orphan it.

Vector stores for use (if you opt to use file_search) are yours to make managed programmatic use of, purposefully instead of by happenstance. Given the continued prolonged outages, I would consider this facility merely a proof-of-concept, that you must not rely on, and can do better.

2 Likes