Chat completion
Changed onGenerate a chat completion based on the provided messages. The response shown below is for non-streaming. To learn about streaming responses, see the chat completion guide.
Request
- Base URLhttps://api.writer.com
- URLhttps://api.writer.com/v1/chat
- AuthHTTP bearer
Request body
Example request
{
"model": "palmyra-x5",
"messages": [
{
"content": "Write a memo summarizing this earnings report.",
"role": "user"
}
]
}Response
Successful response
Example response
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"choices": [
{
"finish_reason": "stop",
"message": {
"content": "Hello! How can I assist you today?",
"role": "user"
}
}
],
"created": 1678587532773,
"model": "palmyra-x5"
}Changes
- breaking
removed from the
/request propertyoneOflist - warning
removed the optional property
///from the response with the status (media type: application/json) - warning
removed the optional property
////from the response with the status (media type: text/event-stream) - warning
removed the optional property
////from the response with the status (media type: text/event-stream) - info
removed
translationvisiondiscriminator mapping keys from the/request property
- breaking
- breaking
the request property
/////became required - info
the
request property default valuefalsewas added - info
the response property
//////became required for the status (media type: application/json) - info
the response property
///////became required for the status (media type: text/event-stream) - info
the response property
///////became required for the status (media type: text/event-stream)
- breaking