Chat
ChatCompletions
Given a list of messages comprising a conversation, the model will return a response.
Create chat completion
chat.completions.create(**kwargs) -> ChatCompletion { id, choices, created, 7 more }
POST
/chat/completionsDelete chat completion
chat.completions.delete(completion_id) -> ChatCompletionDeleted { id, deleted, object }
DELETE
/chat/completions/{completion_id}List Chat Completions
chat.completions.list(**kwargs) -> CursorPage<ChatCompletion { id, choices, created, 7 more } >
GET
/chat/completionsGet chat completion
chat.completions.retrieve(completion_id) -> ChatCompletion { id, choices, created, 7 more }
GET
/chat/completions/{completion_id}Update chat completion
chat.completions.update(completion_id, **kwargs) -> ChatCompletion { id, choices, created, 7 more }
POST
/chat/completions/{completion_id}ChatCompletionsMessages
Given a list of messages comprising a conversation, the model will return a response.
Get chat messages
chat.completions.messages.list(completion_id, **kwargs) -> CursorPage<ChatCompletionStoreMessage { id, content_parts } >
GET
/chat/completions/{completion_id}/messages