Skip to main content
POST
/
ai
/
messages
/
stream
Stream message
curl --request POST \
  --url https://api.getcargo.io/v1/ai/messages/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chatUuid": "<string>",
  "chatTrigger": {
    "type": "<string>",
    "connectorUuid": "<string>",
    "meta": {}
  },
  "uuid": "<string>",
  "parts": [
    "<unknown>"
  ],
  "agentUuid": "<string>",
  "tools": [
    {
      "name": "<string>",
      "slug": "<string>",
      "description": "<string>",
      "isBulkAllowed": true,
      "config": {},
      "kind": "<string>",
      "toolUuid": "<string>",
      "templateSlug": "<string>"
    }
  ],
  "mcpClients": [
    {
      "name": "<string>",
      "url": "<string>",
      "authentication": {
        "issuedAt": "<string>",
        "accessToken": "<string>",
        "expiresIn": 123,
        "refreshToken": "<string>",
        "scope": "<string>",
        "tokenType": "<string>",
        "clientId": "<string>"
      },
      "disabledToolSlugs": [
        "<string>"
      ]
    }
  ],
  "resources": [
    {
      "kind": "<string>",
      "name": "<string>",
      "slug": "<string>",
      "description": "<string>",
      "integrationSlug": "<string>",
      "modelUuid": "<string>",
      "filter": {
        "conjonction": "or",
        "groups": [
          "<unknown>"
        ]
      },
      "selectedColumnSlugs": [
        "<string>"
      ],
      "limit": 123,
      "prompt": "<string>"
    }
  ],
  "capabilities": [
    {
      "slug": "<string>"
    }
  ],
  "systemPrompt": "<string>",
  "contextPrompt": "<string>",
  "withReasoning": true,
  "temperature": 123,
  "maxSteps": 123,
  "languageModelSlug": "<string>",
  "integrationSlug": "<string>",
  "connectorUuid": "<string>"
}
'
{
  "errorMessage": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body schema.

chatUuid
string
required

Chat identifier.

chatTrigger
Chat trigger · object
required

Chat trigger configuration.

uuid
string
required

Message identifier.

parts
any[]
required

Message parts.

agentUuid
string

Agent identifier.

tools
Tools · object[]

Tools available for the message.

mcpClients
MCP clients · object[]

MCP clients to use for the message.

resources
Resources · object[]

Resources available for the message.

capabilities
Capabilities · object[]

Capabilities available for the message.

systemPrompt
string

System prompt for the message.

contextPrompt
string

Additional context for the message.

withReasoning
boolean

Whether to include reasoning.

temperature
number

Sampling temperature.

maxSteps
number

Maximum number of steps.

languageModelSlug
string

Language model identifier.

integrationSlug
string

Integration identifier.

connectorUuid
string

Connector identifier.

Response

Successful response

Response body schema.

errorMessage
string
required

Error message when the request fails.