#Connecting Gateway to external apps

1 messages · Page 1 of 1 (latest)

vernal echo
#

I am integrating OpenClaw with my custom built app however I keep strucking a lot of issues and it keeps disconnecting, I am using http v1/repsonse but idk if that's the way to do it or not

coarse hollyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

icy dawnBOT
# vernal echo I am integrating OpenClaw with my custom built app however I keep strucking a lo...

@vernal echo If you meant the OpenAI “Responses API” shape: OpenClaw does support that, but the endpoint is POST /v1/responses (plural) and it’s disabled by default.

Here’s the quick checklist that usually explains “it disconnects / doesn’t work”:

  1. Make sure you’re hitting the right endpoint
  • âś… http://<gateway-host>:18789/v1/responses
  • ❌ /v1/response (will 404)

Docs: https://docs.openclaw.ai/gateway/openresponses-http-api

  1. Enable it in your OpenClaw config
{
gateway: {
http: {
endpoints: {
#
responses: { enabled: true },
},
},
},
}
  1. Send Gateway auth
Authorization: Bearer <gateway token or password>

(Uses your normal gateway.auth.* settings.)

  1. If you’re streaming (SSE), test with curl first
#
curl -N http://127.0.0.1:18789/v1/responses \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"model":"openclaw","stream":true,"input":"hi"}'

If curl streams fine but your app “disconnects”, it’s usually:

  • your HTTP client buffering/not handling SSE correctly, or
  • a proxy/load balancer timing out long-lived HTTP connections.
  1. If you actually want Chat Completions compatibility instead
    That’s POST /v1/chat/completions (also disabled by default):
    https://docs.openclaw.ai/gateway/openai-http-api

To get you unstuck fast, can you paste: