For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Authorizations
Body
modelstringOptional

ID of the model to use.

temperaturenumber · max: 2 · nullableOptional

What sampling temperature to use, between 0 and 2.

Default: 1Example: 0
max_tokensinteger · min: 1 · nullableOptional

The maximum number of tokens to generate in the chat completion.

Default: 1Example: 0
streamboolean · nullableOptional

If set, partial message deltas will be sent.

Default: falseExample: false
Responses
200

OK

application/json
idstringRequired

A unique identifier for the chat completion.

Example: chatcmpl-prLvANKtOJErUM8VivHyUvhJYm2jH
objectstring · enumRequired

The object type, which is always 'chat.completion'.

Example: chat.completionPossible values:
createdintegerRequired

The Unix timestamp (in seconds) of when the chat completion was created.

Example: 1745995327
modelstringOptional

The model used for the chat completion.

post/v1/chat/completions
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?