Developer Docs (Preview)
TXT CLAW for Developers
Create a dedicated OpenClaw agent (memory + configuration) and talk to it over HTTPS. SMS provisioning is a separate, optional lane.
Quickstart (1 line)
pnpm dlx txtclaw@latest init
Stable agent-ingest docs: /agents.md · /openapi.yaml
Get an API key: /dashboard/api-keys
Copy Prompt (For Coding Agents)
Paste this into Codex/Cursor when someone asks “how do I set up OpenClaw agents via API?”
# Add TXT CLAW (OpenClaw agent runtime API)
**Purpose:** Set up OpenClaw agents via API (create agents, send messages, get replies).
**Guardrails:** Use pnpm. Never log or commit API keys. Keep keys server-side only.
## 1) Create account + API key
- Sign up: https://www.txtclaw.com/sign-up
- API key dashboard: https://www.txtclaw.com/dashboard/api-keys
- Keys look like: vck_...
## 2) Set env vars (server-side)
export TXTCLAW_API_BASE_URL="https://txtclaw-sms-e2e.lopez731.workers.dev"
export TXTCLAW_API_KEY="vck_REPLACE_ME"
## 3) Verify
curl -sS "$TXTCLAW_API_BASE_URL/v1/status" -H "Authorization: Bearer $TXTCLAW_API_KEY"
## 4) Create agent + send message
- POST /v1/agents
- POST /v1/agents/{agent_id}/messages
## Optional: BYOK
- PUT /v1/byok (store provider key encrypted)
- Create agents with: llm: { "mode": "byok" }
## Pasteable docs
- https://www.txtclaw.com/quickstart.md
- https://www.txtclaw.com/agents.md
- https://www.txtclaw.com/openapi.yaml
- https://www.txtclaw.com/byok.md
- https://www.txtclaw.com/routing.mdHTTP API
Base URL: https://txtclaw-sms-e2e.lopez731.workers.dev
Set env vars:
export TXTCLAW_API_BASE_URL="https://txtclaw-sms-e2e.lopez731.workers.dev" export TXTCLAW_API_KEY="vck_REPLACE_ME"
Create an agent:
curl -sS "$TXTCLAW_API_BASE_URL/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 "$TXTCLAW_API_BASE_URL/v1/agents/$AGENT_ID/messages" \
-H "Authorization: Bearer $TXTCLAW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Draft a polite text asking my landlord to fix a leak." }'Create and revoke API keys in /dashboard/api-keys.
Pasteable Docs Links
If you’re pasting URLs into Cursor/Codex, start with /quickstart.md.
https://www.txtclaw.com/quickstart.md https://www.txtclaw.com/agents.md https://www.txtclaw.com/openapi.yaml https://www.txtclaw.com/pricing.md https://www.txtclaw.com/api-keys.md https://www.txtclaw.com/cli.md https://www.txtclaw.com/mcp.md https://www.txtclaw.com/skills.md https://www.txtclaw.com/byok.md https://www.txtclaw.com/routing.md https://www.txtclaw.com/rate-limits.md https://www.txtclaw.com/security.md
More
- OpenClaw MCP: /openclaw-mcp
- OpenClaw SDK: /openclaw-sdk
- API reference: /api-reference
- Agent-friendly Markdown: /agents.md
- OpenAPI spec: /openapi.yaml