Official Integration & SDK
High-Concurrency Image Transcoding for Java & Spring Boot
Enterprise-ready Java client engineered for Spring Boot, Quarkus, and Micronaut microservices. High throughput with non-blocking I/O.
Install:
JAVA Packageimplementation "app.smallpict:smallpict-java:1.2.0"Implementation Example
java// Spring Boot Service Example
import app.smallpict.SmallPictClient;
import app.smallpict.models.OptimizeRequest;
import app.smallpict.models.ImageFormat;
import org.springframework.stereotype.Service;
@Service
public class MediaOptimizationService {
private final SmallPictClient client = new SmallPictClient(System.getenv("SMALLPICT_API_KEY"));
public String optimizeUpload(byte[] imageBytes) {
return client.optimize(OptimizeRequest.builder()
.bytes(imageBytes)
.format(ImageFormat.AVIF)
.quality(80)
.maxWidth(1600)
.build())
.getCdnUrl();
}
}Integration Steps
11. Add Maven / Gradle Dependency
Add app.smallpict:smallpict-java to your build.gradle or pom.xml.
22. Register Spring Bean
Define SmallPictClient @Bean with connection pooling and timeouts.
33. Process Byte Streams
Pass InputStream or byte[] buffers directly into client.optimize().
Key Benefits
- Thread-safe client with OkHttp connection pooling and HTTP/2
- Built-in exponential backoff and circuit breaker support
- Sub-35ms stream pipeline with zero local disk writes
- Compatible with Java 17, 21 LTS and Spring Boot 3+
Official Developer Documentation
Need Complete Implementation Guides & API Specs?
Explore parameter references, authentication mechanisms, error codes, and local testing instructions in our official Java & Spring Boot SDK developer guide.
Supercharge Your Java & Spring Boot SDK Image Pipeline
Experience sub-50ms AVIF and WebP image optimization in your application. Zero setup fee, instant sandbox keys, and unlimited scalability.
