Chat
Chat
Chat
Completion Message
CompletionMessage
A message containing the model's (assistant) response in a chat conversation.
Create Chat Completion Response
CreateChatCompletionResponse
Response from a chat completion request.
Create Chat Completion Response Stream Chunk
CreateChatCompletionResponseStreamChunk
A chunk of a streamed chat completion response.
Message
Messagealias
contentunionrole"user"UserMessage | contentunionrole"system"SystemMessage | contentunionrole"tool"tool_call_idstringToolResponseMessage | role"assistant"contentunionstop_reasonuniontool_callsarrayCompletionMessage
A message from the user in a chat conversation.
Message Image Content Item
MessageImageContentItem
A image content item
Message Text Content Item
MessageTextContentItem
A text content item
System Message
SystemMessage
A system message providing instructions or context to the model.
Tool Response Message
ToolResponseMessage
A message representing the result of a tool invocation.
User Message
UserMessage
A message from the user in a chat conversation.
ChatCompletions
Create
client.chat.completions.create(CompletionCreateParamsbody, RequestOptionsoptions?): completion_messageCompletionMessageidstringmetricsarrayCreateChatCompletionResponse | Stream<eventEventidstringCreateChatCompletionResponseStreamChunk>
post/chat/completions