Skip to content

API Overview

The LiberClaw API provides programmatic access to create, deploy, and interact with AI agents on Aleph Cloud. All endpoints are RESTful JSON over HTTPS.

https://api.liberclaw.ai/api/v1

All endpoints documented here are relative to this base URL. For example, GET /agents means GET https://api.liberclaw.ai/api/v1/agents.

Most endpoints require a Bearer token in the Authorization header:

Authorization: Bearer <access_token>

Access tokens are short-lived JWTs (15 minutes). Use the refresh endpoint to obtain new tokens without re-authenticating. See the Authentication guide for all available login methods.

All error responses follow a consistent JSON structure:

{
"error": {
"code": "NOT_FOUND",
"message": "Agent not found",
"status": 404,
"details": null
}
}
FieldTypeDescription
codestringMachine-readable error code (e.g., NOT_FOUND, UNAUTHORIZED, VALIDATION_ERROR)
messagestringHuman-readable description
statusintegerHTTP status code
detailsobject or nullAdditional context (validation errors include field-level details)
CodeHTTP StatusDescription
BAD_REQUEST400Invalid request parameters
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions or quota exceeded
NOT_FOUND404Resource does not exist
CONFLICT409Resource conflict (e.g., duplicate email)
VALIDATION_ERROR422Request body failed validation
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Unexpected server error
BAD_GATEWAY502Agent VM unreachable

When a request body fails validation, details contains an array of field-level errors:

{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation error",
"status": 422,
"details": [
{
"field": "body → name",
"message": "String should have at least 1 character",
"type": "string_too_short"
}
]
}
}

Rate limits are applied per IP address. When you exceed a limit, the API returns a 429 response:

{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded: 5 per 1 minute",
"status": 429,
"details": null
}
}

Key rate limits:

EndpointLimit
POST /auth/login/email5/minute
POST /auth/verify-magic-link10/minute
POST /auth/refresh20/minute
POST /auth/wallet/*10/minute
POST /auth/exchange10/minute
POST /auth/guest10/minute
HeaderRequiredDescription
AuthorizationYes (most endpoints)Bearer <access_token>
Content-TypeYes (POST/PATCH)application/json
HeaderDescription
Content-Typeapplication/json or text/event-stream for SSE endpoints

List endpoints support pagination via query parameters:

ParameterTypeDefaultDescription
limitinteger20Items per page (1-100)
offsetinteger0Number of items to skip

Paginated responses include total count:

{
"agents": [...],
"total": 42,
"limit": 20,
"offset": 0
}

For a complete interactive API explorer with all endpoints, see the Endpoint Reference.