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

Conversations

Manage conversations and conversation items.

Create a conversation
client.Conversations.New(ctx, body) (*Conversation, error)
POST/conversations
Delete a conversation
client.Conversations.Delete(ctx, conversationID) (*ConversationDeletedResource, error)
DELETE/conversations/{conversation_id}
Retrieve a conversation
client.Conversations.Get(ctx, conversationID) (*Conversation, error)
GET/conversations/{conversation_id}
Update a conversation
client.Conversations.Update(ctx, conversationID, body) (*Conversation, error)
POST/conversations/{conversation_id}
ModelsExpand Collapse
type ComputerScreenshotContent struct{…}

A screenshot of a computer.

type Conversation struct{…}
type ConversationDeleted struct{…}
type ConversationDeletedResource struct{…}
type Message struct{…}

A message to or from the model.

type SummaryTextContent struct{…}

A summary text from the model.

type TextContent struct{…}

A text content.

ConversationsItems

Manage conversations and conversation items.

Create items
client.Conversations.Items.New(ctx, conversationID, params) (*ConversationItemList, error)
POST/conversations/{conversation_id}/items
Delete an item
client.Conversations.Items.Delete(ctx, conversationID, itemID) (*Conversation, error)
DELETE/conversations/{conversation_id}/items/{item_id}
List items
client.Conversations.Items.List(ctx, conversationID, query) (*ConversationCursorPage[ConversationItemUnion], error)
GET/conversations/{conversation_id}/items
Retrieve an item
client.Conversations.Items.Get(ctx, conversationID, itemID, query) (*ConversationItemUnion, error)
GET/conversations/{conversation_id}/items/{item_id}
ModelsExpand Collapse
type ConversationItemUnion interface{…}

A single item within a conversation. The set of possible types are the same as the output type of a Response object.

type ConversationItemList struct{…}

A list of Conversation items.