POST
/
inference
/
chat
/
Initiate/Continue Agent Chat
curl --request POST \
  --url https://agent-prod.studio.lyzr.ai/v3/inference/chat/ \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "rohith@lyzr.ai",
  "system_prompt_variables": {},
  "agent_id": "684009b00ff8ffe17f2c0a3c",
  "session_id": "684009b00ff8ffe17f2c0a3c-sdm4iozro1",
  "message": "Hi Diet planner craft a basic diet plan",
  "filter_variables": {},
  "features": [
    {
      "additionalProp1": {}
    }
  ],
  "assets": [
    "asset_123",
    "asset_456"
  ]
}'
{
  "status": "success",
  "agent_response": "The attached document discusses...",
  "session_id": "684009b00ff8ffe17f2c0a3c-sdm4iozro1",
  "agent_id": "684009b00ff8ffe17f2c0a3c"
}

Body

application/json
user_id
string
required

Unique identifier of the user

Example:

"rohith@lyzr.ai"

agent_id
string
required

Agent ID you want to interact with

Example:

"684009b00ff8ffe17f2c0a3c"

session_id
string
required

Unique session ID for maintaining chat continuity

Example:

"684009b00ff8ffe17f2c0a3c-sdm4iozro1"

message
string
required

Message from the user to the agent

Example:

"Hi Diet planner craft a basic diet plan"

system_prompt_variables
object

Optional variables to be passed to the system prompt

Example:
{}
filter_variables
object

Optional filters for narrowing context

Example:
{}
features
object[]

List of additional feature configurations

Example:
[{ "additionalProp1": {} }]
assets
string[]

List of asset IDs (PDF, images, etc.) to use as context

Example:
["asset_123", "asset_456"]

Response

Successful Response

status
string
Example:

"success"

agent_response
string
Example:

"The attached document discusses..."

session_id
string
Example:

"684009b00ff8ffe17f2c0a3c-sdm4iozro1"

agent_id
string
Example:

"684009b00ff8ffe17f2c0a3c"