Create ai chat
Changed onCreate a new AI chat thread and send the first message to the AI agent.
Required permissions:
- ai_chat:create
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Request body
Parameters for CreateAiChat
The AI agent that handles an AI chat.
The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").
A list of previously uploaded file attachments to include with the first message.
The source of an AI chat message
The text content of the first message to send to the AI agent.
The type of suggestion prompt that was clicked, when message_source is 'suggestion'.
An optional display title for the AI chat thread (e.g., "Help with billing").
Response
A successful response
An AI-powered chat conversation belonging to a user, with optional scheduled automation.
The AI agent that handles this chat. Set when the chat is created and fixed for its lifetime.
The total number of tokens consumed across all messages in this conversation.
The datetime the ai chat was created.
The unique identifier for the ai chat.
The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.
The total number of messages exchanged in this conversation.
The notification preference for this AI chat. all delivers AI chat notifications and badges, while none mutes them.
A short descriptive title for this AI chat conversation. Null if no title has been set.
The datetime the ai chat was last updated.
The user who owns this AI chat conversation.
Example response
{
"blended_token_usage": "123.45",
"created_at": "2023-12-01T05:00:00.401Z",
"id": "aich_xxxxxxxxxxxxx",
"last_message_at": "2023-12-01T05:00:00.401Z",
"message_count": 42,
"title": "Weekly Revenue Analysis",
"updated_at": "2023-12-01T05:00:00.401Z",
"user": {
"id": "user_xxxxxxxxxxxxx"
}
}Changes
- info
added the new optional request property
agent_identifier - info
added the required property
agent_identifierto the response with the status
- info
- warning
removed the request property
current_company_id
1 more change in this revision
- warning