Introduction
The better-openclaw REST API allows you to programmatically generate Docker Compose stacks, list available services, browse presets, and validate configurations. It’s perfect for integrating stack generation into CI/CD pipelines, web applications, or custom tooling.Base URL
The API runs on port 3456 with all endpoints prefixed with/v1:
localhost:3456 with your deployed API host.
Quick Start
Generate a stack with PostgreSQL, Redis, and n8n:API Features
- Service Discovery - List all 94 available services with filtering by category and maturity
- Preset Management - Browse 9 pre-configured stack templates
- Stack Generation - Generate complete stacks with multiple output formats (JSON, ZIP)
- Validation - Validate configurations before generation with dependency resolution
- OpenAPI Spec - Auto-generated specification available at
/v1/openapi.json - Interactive Docs - Swagger UI available at
/v1/docs
Response Format
All responses use JSON with consistent error handling: Success Response:Error Codes
| Code | Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid API key |
VALIDATION_ERROR | 400 | Invalid request parameters or body |
NOT_FOUND | 404 | Resource not found |
CONFLICT_ERROR | 409 | Configuration conflict (e.g., incompatible services) |
GENERATION_ERROR | 500 | Stack generation failed |
INTERNAL_ERROR | 500 | Unexpected server error |
Rate Limiting
The API includes distributed rate limiting:- Standard endpoints: 100 requests per 15 minutes per IP
- Generate endpoint: 10 requests per 15 minutes per IP
- Authenticated requests: Higher limits (configured per API key)
CORS
CORS is enabled for all origins by default. For production, configure allowed origins via environment variables.Health Check
Check API availability:Next Steps
Authentication
Learn how to authenticate your API requests
Services Endpoint
Browse and filter available services
Presets Endpoint
List preset stack configurations
Skills Endpoint
Discover skill packs for AI agents
Generate Endpoint
Generate complete Docker Compose stacks
Validate Endpoint
Validate configurations before generation