Skip to main content

Group Chat

Base URL: https://app.neuroflash.com/api/digital-twin-service

Ask multiple digital twins the same question and get aggregated opinions with individual responses.

Chat With Twin Group

POST/v1/workspaces/{workspace_id}/twin-group-chat-completions

Path Parameters

ParameterTypeRequiredDescription
workspace_idstringYes

Request Body

FieldTypeRequiredDescription
twinIdsarray<string>YesList of twin IDs to query (max 20)
messagesarray<object>YesConversation history (at least one message required, last message must be from user)
rolestringYesRole: 'user' or 'assistant'
contentstringYesMessage content
attachmentsobjectNoList of file IDs to attach to this message (user messages only)
responseFormatobjectNoStructured output format for individual twin responses. If null, uses default schema with 'answer' and 'reason' fields.
temperatureobjectNoSampling temperature for response generation
runRarobjectNoEnable Rephrase and Respond for question robustness
useWebSearchobjectNoWeb search mode: 'never', 'auto', or 'always'
useVerbalizedSamplingobjectNoGenerate 5 probability-weighted response options per twin. Mutually exclusive with custom responseFormat.

Response

FieldTypeDescription
summarystringLLM-generated summary of all twin responses
twinResponsesobjectDictionary mapping twin IDs to their responses

Example

curl -X POST "https://app.neuroflash.com/api/digital-twin-service/v1/workspaces/{workspace_id}/twin-group-chat-completions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"twinIds": [],
"messages": [],
"responseFormat": {},
"temperature": {},
"runRar": {},
"useWebSearch": {},
"useVerbalizedSampling": {}
}'

Response:

{
"summary": "string",
"twinResponses": {}
}