REST API

Manage AI instances programmatically

The MyOpenClaw Developer API gives you full control over your AI infrastructure. Create instances, manage keys, and automate operations — all from your own scripts and CI/CD pipelines.

terminal
$ curl -H "Authorization: Bearer moc_abc..._xyz..." \
    https://www.myopenclaw.cloud/api/v1/instances

[
  {
    "id": "inst_abc123",
    "subdomain": "my-assistant",
    "status": "running",
    "plan": "pro",
    "fly_region": "dfw"
  }
]

What You Can Build

Full REST API coverage for managing your AI assistant infrastructure

Instance Lifecycle

Create, start, stop, restart, and delete instances. Full control over your AI infrastructure from any script or tool.

POST /api/v1/instances/{id}/start

API Key Management

Create keys with fine-grained scopes. Read-only for monitoring, write for automation, or full access for admin tools.

POST /api/v1/keys

Async Operations

Long-running operations return immediately with an operation ID. Poll for completion or set up webhooks.

GET /api/v1/operations/{operationId}

Multi-Instance

Manage up to 6 instances (Pro) or 21 instances (Business) from a single API key. Each with custom subdomains.

GET /api/v1/instances

Security First

Built with security at every layer. No shortcuts.

HMAC-SHA256 Keys

API keys are hashed with server-side pepper. Tokens are never stored in plaintext.

11 Granular Scopes

Least-privilege keys: instance:read, instance:write, keys:read, operations:read, and more.

Rate Limiting

Per-key and per-user global ceilings prevent abuse. Fail-closed when Redis is unavailable.

Real-World Use Cases

See how developers are using the API in production

CI/CD Integration

Restart instances after deploying new configurations. Use idempotency keys to prevent duplicate operations from retries.

# GitHub Actions
- name: Restart instance
  run: |
    curl -X POST \
      -H "Authorization: Bearer ${{ secrets.API_KEY }}" \
      -H "Idempotency-Key: ${{ github.sha }}" \
      https://www.myopenclaw.cloud/api/v1/instances/$ID/restart

Monitoring Dashboard

Poll instance status for custom uptime monitoring and alerting. Build Grafana dashboards or Datadog integrations.

# Check all instance statuses
curl -s -H "Authorization: Bearer $API_KEY" \
  https://www.myopenclaw.cloud/api/v1/instances | \
  jq '.[] | {subdomain, status, fly_region}'

Fleet Management

Manage multiple instances from a single script. Perfect for agencies running AI assistants for multiple clients.

import requests

API_KEY = "moc_abc123_xyz789..."
BASE = "https://www.myopenclaw.cloud/api/v1"

instances = requests.get(
    f"{BASE}/instances",
    headers={"Authorization": f"Bearer {API_KEY}"}
).json()

for inst in instances:
    print(f"{inst['subdomain']}: {inst['status']}")

Available on Pro & Business

API access is included with Pro ($49/mo) and Business ($99/mo) plans. No extra charges for API calls.

Pro
$49/month
  • Full API access
  • Up to 6 instances
  • Unlimited API keys
Business
$99/month
  • Full API access
  • Up to 21 instances
  • Higher rate limits