Send a request to the chat application.
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.
Request body to send a chat message.
The body is of type object
.
Successful response. The content type and structure depend on the response_mode
parameter in the request.
response_mode
is blocking
, returns application/json
with a ChatCompletionResponse
object.response_mode
is streaming
, returns text/event-stream
with a stream of ChunkChatEvent
objects.Response object for blocking mode chat completion.