Skip to content

PublicChatController_chat

POST
/v1/public/chat
curl --request POST \
--url https://example.com/v1/public/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "capabilities": [ "navigation" ], "context": {}, "files": [ { "filename": "example", "mediaType": "image/png", "type": "file", "url": "example" } ], "image": "binary", "language": "example", "message": "example", "toolResults": [ { "errorText": "example", "output": {}, "toolCallId": "example", "toolName": "example" } ] }'
object
capabilities

What the calling client can do itself. navigation: it serves the built-in page tools openPage, readPage and usePageControl (the widget does).

Array<string>

Example

[
"navigation"
]
context

Per-message host context (merged over the token context, max 8 KB)

object
files
Array<object>
object
filename
string
mediaType
string

Example

image/png
type
string
Allowed values: file
url

Data: URL

string
image
string format: binary
language

Preferred answer language for this message (BCP 47)

string
message
string
<= 2000 characters
toolResults

Results of the client tool calls from the last assistant message. Sent instead of a message to resume the turn.

Array<object>
object
errorText

Set when the host could not run the tool

string
output

JSON result returned by the host handler

object
toolCallId
string
toolName
string

OK (200) - Server-Sent Events stream

Unauthorized (401)

Forbidden (403)

Not Found (404)

Unprocessable Entity (422)

Internal Server Error (500)