Documentation Index
Fetch the complete documentation index at: https://dev.chief.bot/llms.txt
Use this file to discover all available pages before exploring further.
This guide takes you from zero to a completed chat response. For authentication and HTTP semantics, see Introduction.
Prerequisites
- A Chief account with access to a project
- A PAT from Settings → API tokens
- Your project id (
project_…)
Export variables for the examples:
export CHIEF_API_KEY="pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export CHIEF_PROJECT_ID="project_xxxxxxxxxxxxxxxxxxxx"
export CHIEF_BASE_URL="https://api.storytell.ai"
Start a chat
POST /v1/chats starts an async workflow and returns ids immediately:
curl -sS -X POST "$CHIEF_BASE_URL/v1/chats" \
-H "Content-Type: application/json" \
-H "X-API-Key: $CHIEF_API_KEY" \
-H "X-Project-Id: $CHIEF_PROJECT_ID" \
-d '{"prompt": "What are the three most important themes in our Q2 launch docs?"}'
Example response (202 Accepted):
{
"chat_id": "chat_d8aad64dib2c7m3ae7j0",
"message_id": "message_d8aad64dib2c7m3ae7jg",
"created_at": "2026-05-23T10:15:30Z"
}
Poll for the response
Poll until response appears on the message:
CHAT_ID="chat_d8aad64dib2c7m3ae7j0"
MESSAGE_ID="message_d8aad64dib2c7m3ae7jg"
curl -sS "$CHIEF_BASE_URL/v1/chats/$CHAT_ID/messages/$MESSAGE_ID" \
-H "X-API-Key: $CHIEF_API_KEY" \
-H "X-Project-Id: $CHIEF_PROJECT_ID"
Use exponential backoff between polls and cap total wait time in production.
Continue the conversation
curl -sS -X POST "$CHIEF_BASE_URL/v1/chats/$CHAT_ID/messages" \
-H "Content-Type: application/json" \
-H "X-API-Key: $CHIEF_API_KEY" \
-H "X-Project-Id: $CHIEF_PROJECT_ID" \
-d '{"prompt": "Summarize that in three bullet points."}'
Next steps
- Chats guide — scope, intelligence modes, and listing
- Assets guide — upload files for use in
scope
- API reference → Chats → Start a chat — full request schema