/sessions/Summary: Create a New Chat Session
Description: Create a New Chat Session
Required: Yes
application/jsonSessionCreate (Define in Models)| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'POST' \
'http://localhost:8000/api/v1/sessions/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{}'
/sessions/Summary: Get All Chat Sessions
Description: Get All Chat Sessions
| Name | In | Required | Type | Description |
|---|---|---|---|---|
user_id |
query | Yes | string | |
feature_name |
query | No | string |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'GET' \ 'http://localhost:8000/api/v1/sessions/?user_id=<user_id>&feature_name=<feature_name>' \ -H 'accept: application/json'
/sessions/Summary: Delete All Sessions for Feature
Description: Delete All Sessions for Feature
| Name | In | Required | Type | Description |
|---|---|---|---|---|
user_id |
query | Yes | string | |
feature_name |
query | No | string |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'DELETE' \ 'http://localhost:8000/api/v1/sessions/?user_id=<user_id>&feature_name=<feature_name>' \ -H 'accept: application/json'
/sessions/{session_id}/chatSummary: Send a Message in a Session (Streaming)
Description: Streams AI response using Server-Sent Events (SSE). Yields tokens, reasoning, and tool executions in real-time.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
Required: Yes
application/jsonChatRequest (Define in Models)| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'POST' \
'http://localhost:8000/api/v1/sessions/{session_id}/chat' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{}'
/sessions/{session_id}/messagesSummary: Get Session Chat History
Description: Get Session Chat History
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'GET' \
'http://localhost:8000/api/v1/sessions/{session_id}/messages' \
-H 'accept: application/json'
/sessions/{session_id}/clear-historySummary: Clear Chat History (Preserve Session)
Description: Deletes all messages for a session but preserves the session itself (node attachments, workspace ID, sync config, title all remain intact). Useful in Swarm Control to start a fresh chat without losing the file sync workspace.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'POST' \
'http://localhost:8000/api/v1/sessions/{session_id}/clear-history' \
-H 'accept: application/json'
/sessions/{session_id}/tokensSummary: Get Session Token Usage
Description: Get Session Token Usage
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'GET' \
'http://localhost:8000/api/v1/sessions/{session_id}/tokens' \
-H 'accept: application/json'
/sessions/{session_id}Summary: Get a Single Session
Description: Get a Single Session
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'GET' \
'http://localhost:8000/api/v1/sessions/{session_id}' \
-H 'accept: application/json'
/sessions/{session_id}Summary: Update a Chat Session
Description: Update a Chat Session
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
Required: Yes
application/jsonSessionUpdate (Define in Models)| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'PATCH' \
'http://localhost:8000/api/v1/sessions/{session_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{}'
/sessions/{session_id}Summary: Delete a Chat Session
Description: Delete a Chat Session
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'DELETE' \
'http://localhost:8000/api/v1/sessions/{session_id}' \
-H 'accept: application/json'
/sessions/messages/{message_id}/audioSummary: Upload audio for a specific message
Description: Upload audio for a specific message
| Name | In | Required | Type | Description |
|---|---|---|---|---|
message_id |
path | Yes | integer |
Required: Yes
multipart/form-dataBody_upload_message_audio_sessions_messages__message_id__audio_post (Define in Models)| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'POST' \
'http://localhost:8000/api/v1/sessions/messages/{message_id}/audio' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@/path/to/file'
/sessions/messages/{message_id}/audioSummary: Get audio for a specific message
Description: Get audio for a specific message
| Name | In | Required | Type | Description |
|---|---|---|---|---|
message_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'GET' \
'http://localhost:8000/api/v1/sessions/messages/{message_id}/audio' \
-H 'accept: application/json'
/sessions/{session_id}/nodesSummary: Attach Nodes to Session
Description: Attach one or more Agent Nodes to a chat session.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
Required: Yes
application/jsonNodeAttachRequest (Define in Models)| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'POST' \
'http://localhost:8000/api/v1/sessions/{session_id}/nodes' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{}'
/sessions/{session_id}/nodesSummary: Get Session Node Status
Description: Returns all nodes attached to a session and their current sync status. Merges persisted sync_status with live connection state from the registry.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'GET' \
'http://localhost:8000/api/v1/sessions/{session_id}/nodes' \
-H 'accept: application/json'
/sessions/{session_id}/nodes/{node_id}Summary: Detach Node from Session
Description: Detach Node from Session
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer | |
node_id |
path | Yes | string |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'DELETE' \
'http://localhost:8000/api/v1/sessions/{session_id}/nodes/{node_id}' \
-H 'accept: application/json'
/sessions/{session_id}/cancelSummary: Cancel Running AI Task
Description: Cancel Running AI Task
| Name | In | Required | Type | Description |
|---|---|---|---|---|
session_id |
path | Yes | integer |
| Status Code | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
curl -X 'POST' \
'http://localhost:8000/api/v1/sessions/{session_id}/cancel' \
-H 'accept: application/json'