Send a request to the text generation 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 create a completion 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 CompletionResponse
object.response_mode
is streaming
, returns text/event-stream
with a ChunkCompletionResponse
stream.Response object for blocking mode completion.