Skip to main content
GET
Get Chat

Authorizations

Authorization
string
header
required

Retrieve your API Key from Dashboard [blocked].

Path Parameters

id
string
required

Response

200 - application/json
id
string
required

This is the unique identifier for the chat.

orgId
string
required

This is the unique identifier for the org that this chat belongs to.

createdAt
string<date-time>
required

This is the ISO 8601 date-time string of when the chat was created.

updatedAt
string<date-time>
required

This is the ISO 8601 date-time string of when the chat was last updated.

assistantId
string

This is the assistant that will be used for the chat. To use an existing assistant, use assistantId instead.

assistant
object

This is the assistant that will be used for the chat. To use an existing assistant, use assistantId instead.

assistantOverrides
object

These are the variable values that will be used to replace template variables in the assistant messages. Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.

name
string

This is the name of the chat. This is just for your own reference.

Maximum string length: 40
sessionId
string

This is the ID of the session that will be used for the chat. Mutually exclusive with previousChatId.

input

This is the input text for the chat. Can be a string or an array of chat messages.

Example:
stream
boolean
default:false

This is a flag that determines whether the response should be streamed. When true, the response will be sent as chunks of text.

previousChatId
string

This is the ID of the chat that will be used as context for the new chat. The messages from the previous chat will be used as context. Mutually exclusive with sessionId.

messages
(SystemMessage · object | UserMessage · object | AssistantMessage · object | ToolMessage · object | DeveloperMessage · object)[]

This is an array of messages used as context for the chat. Used to provide message history for multi-turn conversations.

output
(SystemMessage · object | UserMessage · object | AssistantMessage · object | ToolMessage · object | DeveloperMessage · object)[]

This is the output messages generated by the system in response to the input.

costs
(ModelCost · object | ChatCost · object)[]

These are the costs of individual components of the chat in USD.

cost
number

This is the cost of the chat in USD.