Create Chat Completion
The chat completions endpoint enables multi-turn conversations with KrosAI’s language models. This is ideal for chatbots, virtual assistants, and interactive applications.
Last updated
The chat completions endpoint enables multi-turn conversations with KrosAI’s language models. This is ideal for chatbots, virtual assistants, and interactive applications.
Last updated
messages array required
An array of messages comprising the conversation history
model string required
The ID of the model to use. Currently supported:KrosMLingual1.0.1
max_tokens integer default: "100"
The maximum number of tokens to generate
temperature number default: "0.7"
Controls randomness in the output. Values between 0 and 1.
role string required
The role of the message author. Must be one of: system
, user
, or assistant
content string required
The content of the message
400: Bad Request object
Invalid request parameters or message format
Invalid or missing API key
Rate limit exceeded
System Messages: Use system messages to set the behavior and context for your assistant.
Message History: Keep message history concise to stay within token limits.
Temperature: Use a lower temperature (0.2-0.4) for more focused, deterministic responses.
Rate Limits: Implement proper error handling for rate limits.
401: Unauthorized object
429: Too Many Requests object