All Claw API endpoints require authentication via Authorization: Bearer sk-... header.
Base URL: https://api.lemondata.cc/v1/claw
List Instances
Returns all instances for the authenticated organization.
curl https://api.lemondata.cc/v1/claw/instances \
-H "Authorization: Bearer sk-your-api-key"
{
"instances": [
{
"id": "cm5abc123",
"subdomain": "mybot",
"url": "https://claw-mybot.lemondata.cc",
"defaultModel": "claude-opus-4-6",
"hasIMConfig": true,
"status": "RUNNING",
"paidUntil": "2026-03-10T00:00:00.000Z",
"canRebuild": true,
"totalPaid": 20,
"createdAt": "2026-02-08T00:00:00.000Z"
}
]
}
Instance Status Values
| Status | Description |
|---|
PENDING | Just created, waiting for provisioning |
PROVISIONING | Container is being deployed |
RUNNING | Instance is active and healthy |
STOPPED | Stopped due to expiration (data retained 7 days) |
FAILED | Deployment failed (auto-refunded) |
DELETED | Permanently removed |
Create Instance
Creates a new instance and charges $20 for 30 days from your organization balance.
Subdomain (3-32 chars, lowercase alphanumeric + hyphens). Instance URL: https://claw-{subdomain}.lemondata.cc
Default AI model (e.g., claude-opus-4-6, gpt-5.2, gemini-3-pro-preview, minimax-m2.1, kimi-k2.5)
curl -X POST https://api.lemondata.cc/v1/claw/instances \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"subdomain": "mybot", "defaultModel": "claude-opus-4-6"}'
{
"id": "cm5abc123",
"subdomain": "mybot",
"url": "https://claw-mybot.lemondata.cc",
"status": "PENDING",
"paidUntil": "2026-03-10T00:00:00.000Z",
"charged": true,
"chargedAmount": 20
}
Insufficient balance returns 402 Payment Required. Ensure your organization has at least $20 before creating an instance.
Get Instance
GET /v1/claw/instances/:id
Returns details for a specific instance.
Update Instance
PATCH /v1/claw/instances/:id
Update instance configuration.
Change the default AI model
Update IM platform configuration (Telegram, Discord, etc.)
curl -X PATCH https://api.lemondata.cc/v1/claw/instances/cm5abc123 \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"defaultModel": "claude-sonnet-4-5"}'
Rebuild Instance
POST /v1/claw/instances/:id/rebuild
Destroys and recreates the container while preserving data (PVC). Limited to 10 rebuilds per day.
Returns 429 Too Many Requests if the daily limit is exceeded.
Renew Instance
POST /v1/claw/instances/:id/renew
Extends the billing period by 30 days ($20). If the instance was stopped due to expiration, it will automatically restart.
{
"id": "cm5abc123",
"subdomain": "mybot",
"status": "RUNNING",
"paidUntil": "2026-04-09T00:00:00.000Z",
"charged": true,
"chargedAmount": 20
}
Health Check
Returns Claw service health status. No authentication required.
{"status": "ok", "timestamp": "2026-02-08T15:00:00.000Z"}