Skip to main content
POST
Send a chat message

Authorizations

session
string
cookie
required

The session cookie set when you sign in to AgentHub or ModelHub in a browser. The cookie name shown here is illustrative. There are no API tokens for these endpoints.

Body

application/json
conversationId
string<uuid> | null
required

null starts a new conversation.

message
string
required
Required string length: 1 - 32000
modelConfigId
string<uuid> | null
required

A specific model, or null to let routing choose.

orgSlug
string
required
Minimum string length: 1
projectSlug
string
required
Minimum string length: 1
history
object[]

Prior turns, oldest first, in masked form. At most 20 exchanges.

Maximum array length: 40
attachments
object[]

Text from POST /chat/attachments. Up to 50,000 characters each and 100,000 in total.

Maximum array length: 5
optimizePrompt
boolean
default:true

Tidy the prompt (whitespace, stock politeness) before sending.

overridePiiBlock
boolean

Continue after a held turn. The value is still masked.

restoreMap
object

Placeholder to real value, accumulated from earlier done events. At most 400 entries.

Response

Server-sent event stream.

The response is of type string.