Generate Message Completions

POST

Generate completions for a list of messages.

This endpoint uses the language model to generate completions for the provided messages. The generation process can be customized using the generation_config parameter.

The messages list should contain alternating user and assistant messages, with an optional system message at the start. Each message should have a ‘role’ and ‘content’.

Query parameters

response_modelstringRequired

Request

This endpoint expects an object.
messageslist of objectsRequired

List of messages to generate completion for

generation_configobjectOptional

Configuration for text generation

Response

Successful Response

Errors