curl --request POST \
--url https://paradigm.lighton.ai/api/v3/threads/turns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": 1,
"query": "What is the capital of France?"
}
'{
"id": "<string>",
"thread": "<string>",
"status": "running",
"messages": [
{
"id": "<string>",
"role": "user",
"parts": [
{
"type": "text",
"text": "<string>",
"reasoning": "<string>",
"tool_call": {
"id": "<string>",
"tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "tool_call",
"tool_args": {},
"steps": [
{
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"progress_report": {
"progress_percentage": 123,
"current_progress_text": "<string>",
"time_remaining_estimate": 123,
"metadata": {}
}
}
],
"result": {
"text": "<string>",
"file_artifacts": [
{}
],
"web_sources": [
{}
],
"chunk_sources": [
{}
],
"document_sources": [
{}
],
"timings": {}
}
},
"document": {
"id": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>",
"type": "shared",
"files_count": 123
},
"tag": {
"id": 123,
"tag": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "message",
"force_tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"immediate_final_answer": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "turn",
"error": {
"code": "<string>",
"message": "<string>"
},
"liked": true
}{
"id": "<string>",
"thread": "<string>",
"status": "running",
"messages": [
{
"id": "<string>",
"role": "user",
"parts": [
{
"type": "text",
"text": "<string>",
"reasoning": "<string>",
"tool_call": {
"id": "<string>",
"tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "tool_call",
"tool_args": {},
"steps": [
{
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"progress_report": {
"progress_percentage": 123,
"current_progress_text": "<string>",
"time_remaining_estimate": 123,
"metadata": {}
}
}
],
"result": {
"text": "<string>",
"file_artifacts": [
{}
],
"web_sources": [
{}
],
"chunk_sources": [
{}
],
"document_sources": [
{}
],
"timings": {}
}
},
"document": {
"id": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>",
"type": "shared",
"files_count": 123
},
"tag": {
"id": 123,
"tag": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "message",
"force_tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"immediate_final_answer": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "turn",
"error": {
"code": "<string>",
"message": "<string>"
},
"liked": true
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Create a conversation thread with initial turn
Create a new thread and immediately ask a query in a single request. This endpoint combines thread creation and turn creation to reduce round trips.
Supports synchronous and background processing modes. Streaming is not supported.If you need to use streaming mode then directly use the endpoint to create a turn within a thread
Note: chat_setting_id has been deprecated, now use agent_id instead, chat_settings_id is still supported for back-compatibility purposes. If no agent_id nor chat_setting_id is provided, the default agent for the company is used.
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/threads/turns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": 1,
"query": "What is the capital of France?"
}
'{
"id": "<string>",
"thread": "<string>",
"status": "running",
"messages": [
{
"id": "<string>",
"role": "user",
"parts": [
{
"type": "text",
"text": "<string>",
"reasoning": "<string>",
"tool_call": {
"id": "<string>",
"tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "tool_call",
"tool_args": {},
"steps": [
{
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"progress_report": {
"progress_percentage": 123,
"current_progress_text": "<string>",
"time_remaining_estimate": 123,
"metadata": {}
}
}
],
"result": {
"text": "<string>",
"file_artifacts": [
{}
],
"web_sources": [
{}
],
"chunk_sources": [
{}
],
"document_sources": [
{}
],
"timings": {}
}
},
"document": {
"id": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>",
"type": "shared",
"files_count": 123
},
"tag": {
"id": 123,
"tag": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "message",
"force_tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"immediate_final_answer": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "turn",
"error": {
"code": "<string>",
"message": "<string>"
},
"liked": true
}{
"id": "<string>",
"thread": "<string>",
"status": "running",
"messages": [
{
"id": "<string>",
"role": "user",
"parts": [
{
"type": "text",
"text": "<string>",
"reasoning": "<string>",
"tool_call": {
"id": "<string>",
"tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "tool_call",
"tool_args": {},
"steps": [
{
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"progress_report": {
"progress_percentage": 123,
"current_progress_text": "<string>",
"time_remaining_estimate": 123,
"metadata": {}
}
}
],
"result": {
"text": "<string>",
"file_artifacts": [
{}
],
"web_sources": [
{}
],
"chunk_sources": [
{}
],
"document_sources": [
{}
],
"timings": {}
}
},
"document": {
"id": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>",
"type": "shared",
"files_count": 123
},
"tag": {
"id": 123,
"tag": "<string>"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "message",
"force_tool": {
"id": "<string>",
"name": "<string>",
"type": "native",
"object": "tool",
"mcp_server_name": "<string>",
"require_document": true,
"accepted_file_types": [
"<string>"
]
},
"immediate_final_answer": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"object": "turn",
"error": {
"code": "<string>",
"message": "<string>"
},
"liked": true
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Body
Combined serializer for creating a thread and immediately creating a turn (answer).
This serializer composes the existing thread and answer serializers to maximize code reuse and maintain consistent validation logic.
Note: The 'stream' parameter is not supported for this endpoint.
Response
Final answer returned synchronously.