API Reference
Auto-generated
Chat
API reference for chat endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.POST /api/v1/chat
POST
/api/v1/chatChat
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| message | string | Required | User's natural language message |
| conversation_id | string | Optional | conversation_id |
| context | object | Optional | Optional context from the visual workflow editor. |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/chat \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "example_message"
}'Response Example
JSON
{
"message": "example",
"conversation_id": "example",
"actions": [],
"tool_calls": [],
"usage": "example"
}GET /api/v1/chat/history
GET
/api/v1/chat/historyGet Conversation History
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| conversation_id | string | Required | Conversation ID |
Request Example
Bash
curl -X GET 'https://api.alterlab.io/api/v1/chat/history?conversation_id=<conversation_id>' \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/chat/stream
POST
/api/v1/chat/streamChat Stream
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| message | string | Required | User's natural language message |
| conversation_id | string | Optional | conversation_id |
| context | object | Optional | Optional context from the visual workflow editor. |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/chat/stream \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "example_message"
}'Response Example
JSON
{
"status": "ok"
}DELETE /api/v1/chat/{conversation_id}
DELETE
/api/v1/chat/{conversation_id}Delete Conversation
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| conversation_id | string | Required | conversation_id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/chat/<conversation_id> \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}