thread

abstract suspend fun thread(request: ThreadRequest? = null, requestOptions: RequestOptions? = null): Thread

Deprecated

OpenAI retired the Assistants API on August 26, 2026. Use Responses and Conversations.

Create a thread.

Parameters

request

thread creation request.

requestOptions

request options.


abstract suspend fun thread(id: ThreadId, requestOptions: RequestOptions? = null): Thread?

Deprecated

OpenAI retired the Assistants API on August 26, 2026. Use Responses and Conversations.

Retrieve a thread.

Parameters

id

the identifier of the thread.

requestOptions

request options.


abstract suspend fun thread(id: ThreadId, metadata: Map<String, String>, requestOptions: RequestOptions? = null): Thread

Deprecated

OpenAI retired the Assistants API on August 26, 2026. Use Responses and Conversations.

Modify a thread.

Parameters

id

the identifier of the thread.

metadata

set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.

requestOptions

request options.