Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

ChatKit

ModelsExpand Collapse
class ChatKitWorkflow { id, state_variables, tracing, version }

Workflow metadata and state returned for the session.

ChatKitSessions

Cancel chat session
beta.chatkit.sessions.cancel(session_id) -> ChatSession { id, chatkit_configuration, client_secret, 7 more }
POST/chatkit/sessions/{session_id}/cancel
Create ChatKit session
beta.chatkit.sessions.create(**kwargs) -> ChatSession { id, chatkit_configuration, client_secret, 7 more }
POST/chatkit/sessions

ChatKitThreads

Delete ChatKit thread
beta.chatkit.threads.delete(thread_id) -> ThreadDeleteResponse { id, deleted, object }
DELETE/chatkit/threads/{thread_id}
List ChatKit threads
beta.chatkit.threads.list(**kwargs) -> ConversationCursorPage<ChatKitThread { id, created_at, object, 3 more } >
GET/chatkit/threads
List ChatKit thread items
beta.chatkit.threads.list_items(thread_id, **kwargs) -> ConversationCursorPage<ChatKitThreadUserMessageItem { id, attachments, content, 5 more } | ChatKitThreadAssistantMessageItem { id, content, created_at, 3 more } | ChatKitWidgetItem { id, created_at, object, 3 more } | 3 more>
GET/chatkit/threads/{thread_id}/items
Retrieve ChatKit thread
beta.chatkit.threads.retrieve(thread_id) -> ChatKitThread { id, created_at, object, 3 more }
GET/chatkit/threads/{thread_id}
ModelsExpand Collapse
class ChatSession { id, chatkit_configuration, client_secret, 7 more }

Represents a ChatKit session and its resolved configuration.

class ChatSessionAutomaticThreadTitling { enabled }

Automatic thread title preferences for the session.

class ChatSessionChatKitConfiguration { automatic_thread_titling, file_upload, history }

ChatKit configuration for the session.

class ChatSessionChatKitConfigurationParam { automatic_thread_titling, file_upload, history }

Optional per-session configuration settings for ChatKit behavior.

class ChatSessionExpiresAfterParam { anchor, seconds }

Controls when the session expires relative to an anchor timestamp.

class ChatSessionFileUpload { enabled, max_file_size, max_files }

Upload permissions and limits applied to the session.

class ChatSessionHistory { enabled, recent_threads }

History retention preferences returned for the session.

class ChatSessionRateLimits { max_requests_per_1_minute }

Active per-minute request limit for the session.

class ChatSessionRateLimitsParam { max_requests_per_1_minute }

Controls request rate limits for the session.

ChatSessionStatus = :active | :expired | :cancelled
class ChatSessionWorkflowParam { id, state_variables, tracing, version }

Workflow reference and overrides applied to the chat session.

class ChatKitAttachment { id, mime_type, name, 2 more }

Attachment metadata included on thread items.

class ChatKitResponseOutputText { annotations, text, type }

Assistant response text accompanied by optional annotations.

class ChatKitThread { id, created_at, object, 3 more }

Represents a ChatKit thread and its current status.

class ChatKitThreadAssistantMessageItem { id, content, created_at, 3 more }

Assistant-authored message within a thread.

class ChatKitThreadItemList { data, first_id, has_more, 2 more }

A paginated list of thread items rendered for the ChatKit API.

class ChatKitThreadUserMessageItem { id, attachments, content, 5 more }

User-authored messages within a thread.

class ChatKitWidgetItem { id, created_at, object, 3 more }

Thread item that renders a widget payload.

class ThreadDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a thread.