Calling as a service
Most API calls represent one person chatting. If instead your own backend is calling BoostGPT on behalf of many end users — a WhatsApp assistant, a helpdesk, a community bot — say so withpurpose: 'service':
- A workspace of your choosing. Pass
workspace_uuidand the turn runs in that workspace, so your agent can keep durable notes and read them back on a later conversation. - A chat mode that sticks.
'edit'survives the request, so the agent can write files.
read_conversations — the tool that reads what other
people have asked. Workspace scope, never cross-conversation reach.
purpose is a request, not a credential. It is granted only when your API key belongs to someone who
runs the project the bot is in; asking for it otherwise changes nothing and the call proceeds as
normal. It is also opt-in — omit it and your existing integration behaves exactly as it does today.Workspaces and the tool round trip
A pinned workspace is remembered against thechat_id, so a turn that pauses for tool execution
resumes in the same workspace. You do not re-send workspace_uuid to executeTool().
Limits
Service workspaces are counted against their own plan allowance, separate from the workspaces you create in the dashboard, and shown in your account usage. Neither allowance can be spent by the other.Basic Chat
Parameters
Response
Chat with Conversation Context
Usechat_id to maintain conversation context:
Override Model Per Request
Reasoning Modes
- auto - Automatically selects best approach
- standard - Quick answers (1x credit)
- agent - Autonomous multi-step reasoning with tool use (up to 10x)
Use Local Ollama Models
For self-hosted models:Use
provider_host instead of provider_key for Ollama.Limit Response Length
Use Your Own API Key (BYOK)
Bring your own API key for any provider:Override Instructions
Override the bot’s instruction per request:Use Specific Training Sources
Target specific training sources by ID:source_ids and tags narrow the search within the agent’s own knowledge; they do not grant access
to another agent’s. Both apply to an agent turn’s search_memory tool as well as to a standard
reply — the agent chooses how many results to pull back, but it cannot widen the scope you set.
A tool continuation inherits the scope of the turn it resumes, so scoping a
chat() call scopes
every executeTool() step that follows it — you do not need
to re-send anything. Passing source_ids or tags to executeTool() overrides the turn’s scope for
that step; passing [] clears it.Disable Training Data
Skip the agent’s training data for a specific request:memory uses the agent’s own setting; sending true or false overrides it for that
request. On an agent turn the resolved value also decides whether the search_memory tool is offered
at all, so memory: false means the agent cannot reach back into its knowledge mid-turn either — and
it stays off for the tool continuations that follow, which inherit it.
Stream Responses
Stream responses in real-time by settingstream: true:
Edit Chat Mode
Edit mode routes your request through the agent reasoning pipeline, where the agent uses the built-inedit tool to make targeted code changes in your workspace files.
Edit Mode Parameters
Edit mode forces agent reasoning — the AI analyzes your request, identifies the target file in the workspace, and applies precise string replacements using the built-in
edit tool. The agent can chain multiple edits in a single turn. No reference_message_id is needed.Plan Chat Mode
Plan mode enables a conversational “plan-then-execute” workflow — the AI proposes a step-by-step plan before executing any tools, giving you the opportunity to review, modify, or approve.Plan Mode Parameters
Plan mode classifies each message as one of three intents: approve (execute the proposed plan), modify (revise the plan), or new (generate a fresh plan). The AI is aware of all available tools (built-in and connected integrations) when generating plans. If no tools are needed, it bypasses planning and returns a direct answer. Plan generation costs 2 credits; execution costs are additional based on the tools used.
Managing a Conversation
Rename a chat
Set the stored chat mode
chat() takes chat_mode per message. setChatMode changes the conversation’s stored default.
Cancel a reply in progress
Stream state
Reconnect to a live reply
Both subscribe methods answertext/event-stream, so response is the raw stream rather than a
parsed object. This is how a client that dropped its connection mid-reply picks up the rest.
Schedules attached to this conversation
Error Handling
Complete Example
Next Steps
Training Data
Add knowledge to improve responses
API Reference
Complete API documentation