Chat Completion
POST
api.denthub.ai/chat/completionsnon-streamingSend an ordered user/assistant conversation to densper and receive one complete JSON response. Streaming is not supported.
Body parameters
| Field | Type | Notes |
|---|---|---|
| model | string | required โ densper |
| messages | array | required โ ordered [{ role, content }] turns |
| max_tokens | integer | optional โ output token limit |
messages[] item
| Field | Type | Notes |
|---|---|---|
| role | enum | user | assistant |
| content | string | the 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."
}| HTTP | errorCode | Meaning | When |
|---|---|---|---|
| 400 | 1000 | Bad Request | Request validation failed or malformed request body |
| 401 | 1003 | Unauthorized | Missing or invalid license key in X-License-Key header |
| 404 | 1002 | Not Found | Requested resource not found or access denied |
| 500 | 5000 | Server Error | Internal 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.
