Completions
Given a list of messages comprising a conversation, the model will return a response.
Create chat completion
client.chat.completions.create(ChatCompletionCreateParamsbody, RequestOptionsoptions?): ChatCompletion { id, choices, created, 7 more } | Stream<ChatCompletionChunk { id, choices, created, 6 more } >
POST/chat/completions
Delete chat completion
client.chat.completions.delete(stringcompletionID, RequestOptionsoptions?): ChatCompletionDeleted { id, deleted, object }
DELETE/chat/completions/{completion_id}
List Chat Completions
client.chat.completions.list(ChatCompletionListParams { after, limit, metadata, 2 more } query?, RequestOptionsoptions?): CursorPage<ChatCompletion { id, choices, created, 7 more } >
GET/chat/completions
Get chat completion
client.chat.completions.retrieve(stringcompletionID, RequestOptionsoptions?): ChatCompletion { id, choices, created, 7 more }
GET/chat/completions/{completion_id}
Update chat completion
client.chat.completions.update(stringcompletionID, ChatCompletionUpdateParams { metadata } body, RequestOptionsoptions?): ChatCompletion { id, choices, created, 7 more }
POST/chat/completions/{completion_id}
CompletionsMessages
Given a list of messages comprising a conversation, the model will return a response.
Get chat messages
client.chat.completions.messages.list(stringcompletionID, MessageListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<ChatCompletionStoreMessage { id, content_parts } >
GET/chat/completions/{completion_id}/messages