Spring Boot Starter for embedding SaaSClaw in your Java applications.
The SaaSClaw Java SDK is a Spring Boot Starter that provides auto-configured client beans for the SaaSClaw REST API. Use it to create projects, trigger deploys, send agent messages, and manage files — all from your Java application with type-safe DTOs and automatic token refresh.
<dependency>
<groupId>com.saasclaw</groupId>
<artifactId>saasclaw-spring-boot-starter</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
implementation 'com.saasclaw:saasclaw-spring-boot-starter:0.1.0-SNAPSHOT'
saasclaw:
base-url: https://saasclaw.ai
# Option 1: API key (recommended for servers)
api-key: sk_...
# Option 2: Email/password (auto-login + refresh)
email: [email protected]
password: secret
You only need one auth method. API keys are recommended for production — generate them from Account → API Keys in the SaaSClaw dashboard.
@Autowired
private SaaSClawClient client;
// List projects
List<ProjectDto> projects = client.listProjects();
// Create a project
client.createProject(new ProjectCreateRequest("My App", "desc", "spring-boot"));
// Deploy
DeployStatus status = client.deploy("my-app");
// Send agent message
MessageDto msg = client.sendMessage("my-app", sessionId, "Add a login page");
// Stream SSE responses
client.streamMessages("my-app", sessionId, "Build a dashboard", event -> {
System.out.println(event.getType() + ": " + event.getData());
});
The SDK supports two authentication methods:
sk_...) — sent as Authorization: Bearer sk_... or X-API-Key: sk_.... Recommended for server-to-server use. Generate from the SaaSClaw dashboard.Beyond the SDK, SaaSClaw natively deploys Java / Spring Boot applications:
The Java SDK is open-source at github.com/saasclawai-org/saasclaw-java-sdk. It includes 33 tests and full auto-configuration.
Java 21+ (JDK 21). The SDK uses the modern java.net.http.HttpClient for HTTP requests and SSE streaming.
The SDK is designed as a Spring Boot Starter with auto-configuration. You can use the SaaSClawClient directly by instantiating it manually, but you'll lose the auto-configuration and bean injection.
Yes! SaaSClaw detects Spring Boot projects (@SpringBootApplication), builds them with Maven, and runs the resulting JAR via systemd. PostgreSQL databases are auto-provisioned with JDBC URLs injected as environment variables.