REST Endpoints
The OpenClaw Gateway provides HTTP REST endpoints for specific use cases including OpenAI compatibility, webhooks, and tool invocation.OpenAI-Compatible Chat Completions
POST /v1/chat/completions
OpenAI-compatible chat completions endpoint. Authentication:string
required
Model identifier (e.g.,
"openclaw", "gpt-4"). Maps to OpenClaw agent.array
required
Array of message objects with
role and contentboolean
default:false
Enable streaming responses (SSE)
string
User identifier for session scoping
string
Completion ID (format:
chatcmpl_<uuid>)string
"chat.completion" or "chat.completion.chunk" (for streaming)number
Unix timestamp
string
Model identifier from request
array
Array of completion choices
object
Token usage statistics
Webhook Endpoints (Hooks)
POST /hooks/:path
Custom webhook endpoints for external integrations. Configuration:string
required
User message to send to agent
string
Target agent ID (defaults to configured default)
string
Session key for conversation context
string
Display name for the sender
boolean
default:true
Whether to deliver response via channel
string
Channel to deliver response (e.g.,
"signal", "telegram", "discord")string
Recipient identifier (phone number, user ID, etc.)
string
Override model for this request
string
Thinking budget:
"low", "medium", "high"string
default:"now"
"now" or "next-heartbeat"number
Request timeout in seconds
Tool Invocation
POST /api/tools/invoke
HTTP-based tool invocation endpoint. Authentication:string
required
Tool name to invoke
object
Tool-specific parameters
Channel Endpoints
POST /api/slack/events
Slack Events API endpoint for receiving Slack app events. Authentication: Handled via Slack signing secret verification. Request Body: Slack event payload (see Slack Events API). Response:/api/channels/:channelId/*
Channel-specific HTTP endpoints exposed by channel plugins. Authentication:/api/channels/telegram/webhook- Telegram webhook/api/channels/discord/interactions- Discord interactions
Health Check
GET /health
Health check endpoint (no authentication required). Response:Error Responses
All REST endpoints return standard error responses: 400 Bad Request:Next Steps
Hooks
Configure webhook integrations
OpenAI Compatibility
Use OpenAI-compatible API

