Skip to main content
POST
/
chat
Chat
curl --request POST \
  --url https://api.puppeteerai.com/chat \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "thread_id": "<string>",
  "message": "<string>",
  "puppeteer_config_name": "<string>",
  "streaming": false,
  "config_version_id": "<string>",
  "start_new_conversation": false,
  "simulate": {
    "initial_messages": [
      "<string>"
    ],
    "max_turns": 123,
    "agent_type": "<string>",
    "industry": "<string>",
    "behavioural_prompt": "<string>",
    "topic": "<string>",
    "create": false,
    "evaluate": false
  },
  "user_type": "<string>"
}
'
{
  "message": "<string>",
  "extras": {
    "user_message_id": "<string>",
    "conversation_id": 123,
    "reply_message_id": "<string>"
  }
}

Headers

Authorization
string
required

Body

application/json
thread_id
string
required

The unique identifier for the thread you're sending a message in.

message
string
required

The message sent by the user.

puppeteer_config_name
string
required

The name of the Puppeteer project this thread belongs to.

streaming
boolean | null
default:false

Whether to stream the response back with HTTP streaming.

config_version_id
string | null
start_new_conversation
boolean | null
default:false

Whether this message is the first in a new conversation inside the thread.

simulate
SimulatedMessage · object
user_type
string | null

Response

Successful Response

message
string
required

The AI's response to the message.

extras
ChatExtras · object
required

Metadata about the created messages and conversation.