POST /api/chat/completions
Single-turn chat completion. Supports streaming.| Field | Type | Notes |
|---|---|---|
messages | Array<{role, content}> | user, assistant, or system |
model | string | Optional, uses default provider if omitted |
systemPrompt | string | Optional override |
temperature | number | 0-2 |
maxTokens | number | Positive integer |
stream | boolean | Enable SSE streaming |
conversationId | string | Link to a conversation |
taskId | string | Inject task context |
ticketId | string | Inject ticket context |
200
POST /api/chat/quick
Simplified single-prompt endpoint.POST /api/chat/smart
Context-aware chat that automatically injects task or ticket context.Conversation Management
GET /api/chat/conversations
List conversations with optional filters.POST /api/chat/conversations
Create a conversation.GET /api/chat/conversations/:id
Get a conversation with its message history.DELETE /api/chat/conversations/:id
Delete a conversation and all its messages.POST /api/chat/conversations/:id/messages
Send a message in a conversation (full context + history).userMessage, assistantMessage, usage, and optional compaction info.
POST /api/chat/conversations/:id/messages/with-tools
Send a message with native tool calling enabled (up to 5 tool roundtrips).deny | sandbox | allowlist | ask | full
POST /api/chat/conversations/:id/messages/agentic
Run agentic (autonomous) execution via SSE. See Chat Stream for the event format.Models and Providers
Provider types
anthropic | openai | azure | google | ollama | openrouter | groq | xai | mistral | cohere | perplexity | deepseek | together | cerebras | fireworks
Tool Approval
allow-once | allow-always | deny
Related
- Chat Streaming - SSE event format for agentic execution
- Agent Sessions API - Monitor and cancel execution sessions
- Tools Overview - Tools the agent can call during execution
- AI Providers Overview - Configure providers and models