DOCS
Dashboardnorth_eastGet an API keyvpn_key
PAI Chat·Endpoint
POST/chat

Create a new chat session. Authenticated users create regular/incognito chats. A

Create a new chat session. Authenticated users create regular/incognito chats. Anonymous users create support chats with an access token cookie.

GET/chat/{chatId}arrow_forward
upload
Request body
incognito
boolean
If true, creates an incognito chat that expires and cannot be fetched after expiry
expiresAt
string (date-time)
Optional expiration time for the chat. Defaults to 60 minutes from now for incognito chats.
double_arrow
Returns 201
idrequired
string (uuid)
The generated UUID for the new chat
userId
string (uuid)
The ID of the user who owns this chat
name
string
Auto-generated title from the first user message
createdAtrequired
string (date-time)
updatedAtrequired
string (date-time)
incognitorequired
boolean
Whether this is an incognito chat
grouprequired
boolean
Whether this is a group chat
expiresAt
string (date-time)
Expiration time for incognito chats
accessToken
string (uuid)
Access token for anonymous support chats. Also set as chat_token cookie.
report
Errors
StatusDescription
500Default Response
north_east
Request
curl -X POST 'https://chat-api-dev.paicloud.ai//chat' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "incognito": true,
  "expiresAt": "2026-01-01T00:00:00Z"
}'
south_west
Response
201 OK
application/json
{
  "id": "00000000-0000-0000-0000-000000000001",
  "userId": "00000000-0000-0000-0000-000000000001",
  "name": "name",
  "createdAt": "2026-01-01T00: 00:00Z",
  "updatedAt": "2026-01-01T00: 00:00Z",
  "incognito": true,
  "group": true,
  "expiresAt": "2026-01-01T00: 00:00Z",
  "accessToken": "00000000-0000-0000-0000-000000000001"
}