SEO: OpenClaw API

OpenClaw API

TXT CLAW exposes a developer API for OpenClaw-powered agents. You create an agent, send messages over HTTPS, and get back plain text. SMS provisioning is a separate, optional lane.

Quickstart (1 line)

pnpm dlx txtclaw@latest init

Docs for coding agents: /agents.md · /openapi.yaml

Minimal API Flow

Base URL: https://txtclaw-sms-e2e.lopez731.workers.dev

Get a TXT CLAW API key:

/dashboard/api-keys

Create an agent:

curl -sS "https://txtclaw-sms-e2e.lopez731.workers.dev/v1/agents" \
  -H "Authorization: Bearer $TXTCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "system_prompt": "You are a helpful assistant.", "sms": { "mode": "none" } }'

Send a message:

curl -sS "https://txtclaw-sms-e2e.lopez731.workers.dev/v1/agents/$AGENT_ID/messages" \
  -H "Authorization: Bearer $TXTCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Write a short reply to this email: ..." }'

For the full spec, see /openapi.yaml or the /api-reference page.

FAQ

Is this the official OpenClaw API?

TXT CLAW is built on OpenClaw and exposes a developer runtime API for OpenClaw-powered agents. If you want the base project, see openclaw.com.

Do I need Twilio to use the API?

No. The runtime API works without Twilio. SMS provisioning is optional and may require compliance steps.

Can I wrap this into my own product?

Yes. The design goal is "wrappable": a clean agent runtime API + stable docs for coding agents.

How do I set up OpenClaw agents via API?

Start at /quickstart.md (it’s designed to be pasted into coding agents), then follow the minimal flow above.