Chat API
The Chat API currently do not support the following parameters:
model, temperate, max_tokens
stream will be set to false ( xNomad Agents currently do not support streaming
post
Generates a model response for the given chat conversation.
Body
modelstringOptional
ID of the model to use.
temperaturenumber | nullableOptionalDefault:
What sampling temperature to use, between 0 and 2.
1
Example: 0
max_tokensinteger | nullableOptionalDefault:
The maximum number of tokens to generate in the chat completion.
1
Example: 0
streamboolean | nullableOptionalDefault:
If set, partial message deltas will be sent.
false
Example: false
Responses
200
OK
application/json
post
POST /v1/chat/completions HTTP/1.1
Host: core.xnomad.fun
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"messages": [
{
"role": "user",
"content": "Buy $BRRR(7dGEYMPsAxxxxxCCx9SSE52H4k1wF617uE) with 0.0001 SOL"
}
],
"model": "",
"temperature": 0,
"max_tokens": 0,
"stream": false
}
200
OK
{
"id": "chatcmpl-prLvANKtOJErUM8VivHyUvhJYm2jH",
"object": "chat.completion",
"created": 1745995327,
"model": "",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Unable to proceed with buying $BRRR because your SOL balance is too low to cover the swap gas fee. You need at least 0.0011 SOL, but only 0.001 SOL is available. Please deposit more SOL to your wallet and try again."
},
"finish_reason": ""
}
],
"usage": {
"prompt_tokens": 47,
"completion_tokens": 55,
"total_tokens": 102
}
}
Last updated
Was this helpful?