Chat
Authorizations
AuthorizationstringRequired
API key sent as Bearer token. Two types:
- Master key (
g_master_...): full access to all agents and endpoints. - Agent key (
g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
messagestring · max: 32000RequiredExample:
The user message to send to the agent.
What's the weather in Madrid?sessionKeystring · max: 255OptionalExample:
Reuse an existing session. Must start with api:. If omitted, a new
session key is generated automatically.
api:550e8400-e29b-41d4-a716-446655440000Pattern: ^api:[a-zA-Z0-9\-]+$streambooleanOptionalDefault:
If true, the response is an SSE stream (text/event-stream).
If false (default), waits for the full response and returns JSON.
falseResponses
200
Sync response with the full assistant message
successbooleanOptionalExample:
true401
Unauthorized — Invalid or missing API key
application/json
402
Payment Required — Insufficient credits
application/json
403
Forbidden — Key lacks the required scope
application/json
404
Agent not found
application/json
409
Agent is not running
application/json
422
Validation error
application/json
502
Gateway error — agent is unreachable or returned an error
application/json
post
/agents/{id}/chatLast updated