PublicChatController_chat
const url = 'https://example.com/v1/public/chat';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" } ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
What the calling client can do itself. navigation: it serves the built-in page tools openPage, readPage and usePageControl (the widget does).
Example
[ "navigation"]Per-message host context (merged over the token context, max 8 KB)
object
object
Example
image/pngData: URL
Preferred answer language for this message (BCP 47)
Results of the client tool calls from the last assistant message. Sent instead of a message to resume the turn.
object
Set when the host could not run the tool
JSON result returned by the host handler
object
object
What the calling client can do itself. navigation: it serves the built-in page tools openPage, readPage and usePageControl (the widget does).
Example
[ "navigation"]Per-message host context (merged over the token context, max 8 KB)
object
object
Example
image/pngData: URL
Preferred answer language for this message (BCP 47)
Results of the client tool calls from the last assistant message. Sent instead of a message to resume the turn.
object
Set when the host could not run the tool
JSON result returned by the host handler
object
Responses
Section titled “Responses”OK (200) - Server-Sent Events stream
Unauthorized (401)
Forbidden (403)
Not Found (404)
Unprocessable Entity (422)
Internal Server Error (500)