Skip to content
AIZACDeveloper Platform

Chat Completion

POSTapi.denthub.ai/chat/completionsnon-streaming

Send an ordered user/assistant conversation to densper and receive one complete JSON response. Streaming is not supported.

Body parameters

FieldTypeNotes
modelstringrequired โ€” densper
messagesarrayrequired โ€” ordered [{ role, content }] turns
max_tokensintegeroptional โ€” output token limit

messages[] item

FieldTypeNotes
roleenumuser | assistant
contentstringthe message text
Planned contract: a top-level persona will replace free-form system prompts. Its type and allowed values are not public yet, so it is not listed as a current body parameter. Do not send a system message.

Errors & authall STT & LLM REST endpoints

Authenticate every REST call with the license key issued to your account, in the X-License-Key header. Errors are returned as an ErrorResponseEntity:

{
  "errorCode": "1003",
  "message": "Invalid License."
}
HTTPerrorCodeMeaningWhen
4001000Bad RequestRequest validation failed or malformed request body
4011003UnauthorizedMissing or invalid license key in X-License-Key header
4041002Not FoundRequested resource not found or access denied
5005000Server ErrorInternal server error โ€” retry later or contact support

Some endpoints run as background jobs and return a status you poll (or receive by webhook); others respond synchronously. See Asynchronous jobs for how polling and callbacks work.