Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messages
(ChatCompletionRequestSystemMessage · object | ChatCompletionRequestUserMessage · object | ChatCompletionRequestAssistantMessage · object)[]
required

The conversation so far. Supported roles are system, user and assistant; messages with other roles (e.g. developer) are ignored. content can be a string or a list of text parts, which are joined. At least one user or assistant message is required.

model
string
required

ID of the model to use, as returned by GET /api/beta/amberai/models. Required and validated even if metadata.agent_id is set (an unavailable model returns 404); the agent's model is then used instead.

stream
boolean
default:false

If true, the response is streamed as server-sent events containing chat.completion.chunk objects. The last chunk has finish_reason stop; no [DONE] message is sent.

temperature
number
default:1

Sampling temperature.

metadata
Metadata · object

amber-specific options. Supported keys: agent_id (agent UUID), files (list of uploaded file IDs), web_search_mode (search, context, perplexity, staan_context or staan_full) and language (default de).

tools
Tool · object[]

amber tools the model may use, identified by function.name: amberSearch (alias amber_search) or webSearch (alias web_search). The names deepResearch, outlook, imageGeneration, videoGeneration and canvas are also accepted but not officially supported via the API. Unknown names are ignored. Replaced by the agent's tools if metadata.agent_id is set.

Response

Successful Response

id
string
required
created
integer
required
model
string
required
choices
any[]
required
usage
Usage · object
required
object
string
default:chat.completion
service_tier
string
default:default
system_fingerprint
string
default:default