Chat
Send Chat Message
Send a request to the chat application.
POST
Authorizations
API Key authentication. For all API requests, include your API Key in the Authorization
HTTP Header, prefixed with 'Bearer '. Example: Authorization: Bearer {API_KEY}
. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.
Body
application/json
Request body to send a chat message.
The body is of type object
.
Response
200
application/json
Successful response. The content type and structure depend on the response_mode
parameter in the request.
- If
response_mode
isblocking
, returnsapplication/json
with aChatCompletionResponse
object. - If
response_mode
isstreaming
, returnstext/event-stream
with a stream ofChunkChatEvent
objects.
Response object for blocking mode chat completion.