Skip to main content
Chat completions are the core of Askr’s text API. It follows the OpenAI format, so any OpenAI-compatible library works.

Basic request

Messages

The messages array holds the conversation. Each message has a role and content. To continue a conversation, append the assistant’s reply and the next user message, then send the whole array again.

Common parameters

number
default:"1"
Higher is more creative, lower is more focused. Range 0–2.
integer
Maximum tokens to generate in the reply.
boolean
default:"false"
Stream tokens as they are generated. See Streaming.
See the full list in Chat completions.