Generate Message Completions

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’.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

X-API-KeystringRequired

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

resultsobject

Errors