Completion
Create Completion Message
Send a request to the text generation 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 create a completion 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 aCompletionResponse
object. - If
response_mode
isstreaming
, returnstext/event-stream
with aChunkCompletionResponse
stream.
Response object for blocking mode completion.