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:Model identifier (e.g.,
"openclaw", "gpt-4"). Maps to OpenClaw agent.Array of message objects with
role and contentEnable streaming responses (SSE)
User identifier for session scoping
Completion ID (format:
chatcmpl_<uuid>)"chat.completion" or "chat.completion.chunk" (for streaming)Unix timestamp
Model identifier from request
Array of completion choices
Token usage statistics
Webhook Endpoints (Hooks)
POST /hooks/:path
Custom webhook endpoints for external integrations. Configuration:User message to send to agent
Target agent ID (defaults to configured default)
Session key for conversation context
Display name for the sender
Whether to deliver response via channel
Channel to deliver response (e.g.,
"signal", "telegram", "discord")Recipient identifier (phone number, user ID, etc.)
Override model for this request
Thinking budget:
"low", "medium", "high""now" or "next-heartbeat"Request timeout in seconds
Tool Invocation
POST /api/tools/invoke
HTTP-based tool invocation endpoint. Authentication:Tool name to invoke
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

