API reference

API reference · Playground

Append a message

POST/api/conversations/{id}Signed in sessionNo key

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredintegerThe conversation id.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
rolerequiredstringOne of "user", "assistant".
contentrequiredstring
modelstring

Example

{
  "role": "user",
  "content": "Say hello in five words.",
  "model": "antimatter/auto"
}

Answer 201

Appended.

Fields of the 201 answer
FieldTypeWhat it is
messageChatMessageRow
message.idinteger
message.conversationIdinteger
message.rolestringOne of "user", "assistant".
message.contentstring
message.modelstring or null
message.createdAtinteger

Errors

  • 400OpenAI shaped error.
  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter