Skip to main content
POST
/
api
/
v1
/
ai
/
chat
AI chat
curl --request POST \
  --url http://localhost:3000/api/v1/ai/chat \
  --header 'Content-Type: application/json' \
  --cookie nut-session= \
  --data '
{
  "messages": [
    {
      "role": "user",
      "content": "<string>",
      "name": "<string>",
      "toolCalls": [
        {}
      ],
      "toolCallId": "<string>"
    }
  ],
  "model": "<string>",
  "stream": true,
  "tools": [
    {}
  ],
  "proposalId": "<string>",
  "agentName": "<string>"
}
'
"<string>"

Authorizations

nut-session
string
cookie
required

Session cookie authentication

Body

application/json
messages
object[]
required

Conversation messages

model
string

AI model to use

stream
boolean
default:true

Enable streaming response

tools
object[]

Available tools for the AI

proposalId
string

Associated proposal ID

agentName
string

Agent to use for the conversation

Response

AI response (streaming or complete)

Server-Sent Events stream