endpoint
POST
/api/assistant/chats/{id}/messages
Send a turn and stream the character reply
auth: API keybase https://app.nz
Request
curl -sX POST https://app.nz/api/assistant/chats/{id}/messages \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{}'Character chat API
Start chats with any character by url_name or id, pin a model for that chat, and stream replies over the same server-sent-events shape as the OpenAI-compatible gateway. User-created characters can include long-form text or Markdown documents; app.nz strips image links, chunks the text, stores it in the character vector-search boundary, and retrieves relevant excerpts for each turn.
Character and chat bodies
name*stringPOST /api/characters display name.system_promptstringOptional persona prompt; generated from name/description/greeting if omitted.documentsarrayOptional long-form docs: [{ "name": "lore.md", "content": "# Markdown..." }]. Alias: knowledge_docs.character_url_name*stringPOST /api/assistant/chats target character slug.modelstringModel or route for this chat, e.g. app/auto or app/auto-fast.reasoning_effortstringauto | off | low | medium | high | xhigh.content*stringMessage text for POST /messages.Create a documented character and talk to it with a model
# Create a character with long-form Markdown knowledge.
curl -sX POST https://app.nz/api/characters \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "GPU Brain Operator",
"description": "Helps operate the gpu-brain search stack.",
"voice": "Kore",
"documents": [{
"name": "runbook.md",
"content": "# Runbook\nUse gobed for low-latency KNN over text chunks. Never ingest image links."
}]
}'
# Start a chat with a given model.
CHAT=$(curl -sX POST https://app.nz/api/assistant/chats \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{
"character_url_name": "gpu-brain-operator",
"model": "app/auto-fast",
"reasoning_effort": "auto"
}' | jq -r .chat.id)
# Send a message. The response is text/event-stream; relevant doc excerpts are
# retrieved server-side before the model call.
curl -N -sX POST https://app.nz/api/assistant/chats/$CHAT/messages \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"content":"What should I check if KNN search looks stale?"}'More in Character chat API
GET
/api/search-ais?q=luna&limit=20Find characters by name, title, tags, or descriptionGET/api/get-ai-by-name?name=lunaLoad one character by url_name or display namePOST/api/charactersCreate a user-owned character and ingest text/Markdown docsPATCH/api/characters/{url_name}Update your character and optionally replace indexed docsPOST/api/assistant/chatsCreate a chat for a character with a chosen modelGET/api/assistant/chats/{id}Reload a chat and its active branch