Stan Settings
Configure Stan's personality, inspect available skills, manage context usage and compaction, browse, resume and delete past conversations, and send messages through the universal Stan message endpoint.
All endpoints require authentication via X-API-Key header and the appropriate scope.
Personality Object
{
"personality": "professional"
}
Valid values: professional, friendly, concise.
GET /api/v1/stan/settings
Get the current personality preset for the authenticated user.
Scope: stan:execute
Response 200 OK
{ "data": { "personality": "professional" }, "meta": { "requestId": "req_abc123" } }
PATCH /api/v1/stan/settings
Set the personality preset for the authenticated user.
Scope: stan:execute
Request Body
{
"personality": "friendly"
}
| Field | Type | Required | Description |
|---|---|---|---|
personality | string | Yes | One of professional, friendly, concise |
Response 200 OK
{ "data": { "personality": "friendly" }, "meta": { "requestId": "req_abc123" } }
GET /api/v1/stan/skills
List all skills available to Stan -- both built-in system skills and user-defined skills.
Scope: stan:execute
Response 200 OK
{
"data": {
"system": [
{
"name": "workflow-builder",
"category": "build",
"description": "Build and edit workflows conversationally."
}
],
"user": [
{
"id": "skill_abc001",
"name": "my-custom-skill",
"category": "custom",
"description": "A user-authored skill."
}
]
},
"meta": { "requestId": "req_abc123" }
}
GET /api/v1/stan/context
Get the current context-usage stats for the active Stan session. maxTokens is the context window the session's model records; a session with no model answers as no session.
Scope: stan:execute
Response 200 OK
When no session is active:
{
"data": { "active": false, "message": "No active session" },
"meta": { "requestId": "req_abc123" }
}
When a session is active:
{
"data": {
"active": true,
"totalTokens": 18234,
"availableTokens": 181766,
"maxTokens": 200000,
"usagePercentage": 9,
"needsCompaction": false
},
"meta": { "requestId": "req_abc123" }
}
POST /api/v1/stan/compact
Trigger compaction of the active Stan session's conversation history. Requires an active LLM session.
Scope: stan:execute
Response 200 OK
{
"data": { "compacted": true, "messagesCompacted": 24 },
"meta": { "requestId": "req_abc123" }
}
GET /api/v1/stan/conversations
List past conversation sessions for the authenticated user.
Scope: stan:execute
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Number of sessions to return (default: 20) |
Response 200 OK
{
"data": [
{
"_id": "conv_abc001",
"userId": "user_456",
"sessionId": "sess_abc001",
"title": "Webhook trigger setup",
"mode": "workflows",
"modelId": "model_abc123",
"modelName": "Claude Opus 4.7",
"messageCount": 14,
"createdResources": { "workflowId": "wf_abc123" },
"startedAt": "2025-02-10T10:00:00Z",
"endedAt": "2025-02-10T10:42:00Z",
"lastMessageAt": "2025-02-10T10:42:00Z"
}
],
"meta": { "requestId": "req_abc123" }
}
Conversations are listed most recent first, without their messages. A conversation is kept here when it ends (/clear ends the current one, and answers only once the conversation is listed here); sessionId is the session it was.
GET /api/v1/stan/conversations/:id
Get the full record of a past conversation, including all messages.
Scope: stan:execute
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Conversation ID |
Response 200 OK
{
"data": {
"_id": "conv_abc001",
"userId": "user_456",
"title": "Webhook trigger setup",
"mode": "workflows",
"modelId": "model_abc123",
"modelName": "Claude Opus 4.7",
"messageCount": 14,
"messages": [
{ "role": "user", "content": "Add a webhook trigger" },
{ "role": "assistant", "content": "Done -- added webhook-trigger node." }
],
"createdResources": { "workflowId": "wf_abc123" },
"startedAt": "2025-02-10T10:00:00Z",
"endedAt": "2025-02-10T10:42:00Z",
"lastMessageAt": "2025-02-10T10:42:00Z"
},
"meta": { "requestId": "req_abc123" }
}
POST /api/v1/stan/conversations/:id/resume
Resume a past conversation. Restores the conversation's model and mode and reloads every message into the active session.
Scope: stan:execute
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Conversation ID |
Response 200 OK
The conversation, as GET /stan/conversations/:id shows it; it is now your active session.
DELETE /api/v1/stan/conversations/:id
Delete one of your past conversations for good: its messages, the files attached to them, and its session's history (its events, runs and plans). Only your own; it cannot be undone. What STAN created in the conversation (a workflow, a code session) is not deleted.
Scope: stan:execute
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Conversation ID |
Response 204 No Content
Errors
| Status | Code | When |
|---|---|---|
| 404 | not-found | You have no conversation with this ID |
STAN's tools: list_stan_conversations and delete_stan_conversation (parameter id).
POST /api/v1/stan/messages
Universal Stan message endpoint, with full slash-command support: the single entry point for any client (web, mobile) to interact with Stan. The message goes to the user's current session.
Scope: stan:execute
Request Body
{
"message": "/help",
"source": "chat"
}
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | The user message or slash command to send; omit it to only load or switch a session |
source | string | No | Originating client surface (default: chat) |
stanVersion | string | No | 1.0 answers from Stan's prepared answers only; 2.0 (the default) runs the agent, asking for a model first when the session has none |
attachments | array | No | Images (PNG, JPEG, GIF, WebP) and PDFs sent with the message: [{ "name", "mimeType", "data" (base64) }]. Each reaches the session's model the way the model can take it; one it cannot take is refused with a 400 saying why. A message with files runs as its own turn |
shown | object | No | For a message sent with files: what the conversation shows for it, { "text", "files": [names] } |
newSession | boolean | No | true starts a new session with message and makes it current: a general conversation with your current session's model (or modelId), working on activeWorkflowId when given; with no model chosen yet, message is answered with the model picker. A session is stored with its first message, so newSession without message is 400 validation-error; the answer's sessionId is the new session |
sessionId | string | No | Make this session of yours current first |
includeHistory | integer | No | Also answer the last this many messages of the conversation |
async | boolean | No | true answers a run at once (202 while it works) instead of waiting for it to finish; follow it with GET /api/v1/stan/runs/:id |
delivery | string | No | While a run is working: steer it with the message (the default) or queue the message after it |
Response 200 OK
A slash command or quick answer returns at once:
{
"data": {
"id": "Hq3LmR8vTz2WkP5nX",
"response": "**STAN Commands** ...",
"category": "help",
"timestamp": "2026-09-29T14:02:11.418Z",
"sessionId": "Wm4TqZ7cR2pLx9KvB",
"createdNew": false
},
"meta": { "requestId": "req_abc123" }
}
A message Stan works on starts a run, and the call waits up to about 10 seconds for it. If the run has finished, async is false and the reply is in response:
{
"data": {
"id": "Hq3LmR8vTz2WkP5nX",
"response": "I've added a webhook trigger node to your workflow.",
"async": false,
"runId": "Jd8sQw3nY6rTb1XcM",
"runStatus": "completed",
"category": "llm-general",
"resources": {},
"tokensUsed": 1834,
"toolCalls": [ { "name": "add_workflow_node", "ok": true } ],
"timestamp": "2026-09-29T14:02:11.418Z",
"sessionId": "Wm4TqZ7cR2pLx9KvB",
"createdNew": false
},
"meta": { "requestId": "req_abc123" }
}
runStatus is completed or failed; for a failed run, response says what went wrong.
Response 202 Accepted
If the run is still queued or running after the wait, the same fields come back with async: true, the runStatus, a note, and an empty response. Poll GET /api/v1/stan/runs/:runId until runStatus is completed or failed, then read response there.
GET /api/v1/stan/runs/:id
Poll a Stan run started by POST /api/v1/stan/messages or by POST /api/v1/stan/sessions/:id/messages with "async": true. Only your own runs are returned.
Scope: stan:execute
Response 200 OK (finished)
{
"data": {
"runId": "Jd8sQw3nY6rTb1XcM",
"async": false,
"runStatus": "completed",
"response": "I've added a webhook trigger node to your workflow.",
"resources": {},
"tokensUsed": 1834,
"promptTokens": 1610,
"cachedTokens": 1280,
"toolsOffered": [31],
"toolCalls": [ { "name": "add_workflow_node", "ok": true } ],
"sessionId": "poQbivycv5r4pGkBw",
"links": [ { "text": "View Workflow", "url": "/workflow-builder/euaENzmRdkjjPthSf" } ],
"artifacts": [],
"credentialRequest": null
},
"meta": { "requestId": "req_abc123" }
}
Response 200 OK (still working)
{
"data": {
"runId": "Jd8sQw3nY6rTb1XcM",
"async": true,
"runStatus": "running",
"response": "",
"resources": {},
"tokensUsed": 0,
"promptTokens": 0,
"cachedTokens": 0,
"toolsOffered": [],
"toolCalls": [],
"sessionId": "poQbivycv5r4pGkBw",
"links": [],
"artifacts": [],
"credentialRequest": null,
"activity": "Adding a node to the workflow",
"stages": [ { "name": "Plan", "status": "done" }, { "name": "Build", "status": "active" } ],
"streamingText": "Adding the trigger node...",
"streamSeq": 12,
"note": "Still running; poll GET /api/v1/stan/runs/Jd8sQw3nY6rTb1XcM until runStatus is completed or failed."
},
"meta": { "requestId": "req_abc123" }
}
tokensUsed is the run's tokens over all its model calls, promptTokens its prompt tokens and cachedTokens how many of those the provider read from its prompt cache. toolsOffered is the number of tools each model call of the run offered, in call order: never more than 64.
A run is still working while runStatus is queued or running (async is true); activity says what it is doing now, stages the stages of a build, and streamingText carries the reply as it is written. Once async is false, response holds the reply, as the Stan chat shows it; for a failed run it is the run's own account of what went wrong. links are the links the answer offers (the workflow the run built or edited), artifacts the Stan artifacts it saved (artifactId, title, version, mimeType). A run paused for a credential (runStatus awaiting_credential) names what it asks for in credentialRequest (target and fields, never a value); give it with POST /api/v1/stan/runs/:id/credentials.
Errors: 404 when the run does not exist or is not yours.