API Authentication
Authenticate all request sequences using your workspace secret key. Append the key in your request headers as a bearer token.
Sample Header
curl -X GET "https://api.1magesoftware.com/v1/projects" \
-H "Authorization: Bearer YOUR_SECRET_KEY"
Image Compression
Compress raw layouts on-the-fly. Pass image URL coordinates and desired optimization formats (avif, webp) as query parameters.
Compression API Endpoint
const image = await oneMage.images.transform('https://assets.com/photo.png', {
format: 'avif',
quality: 80
});
Generative Outpaint
Expand borders seamlessly using generative fill text instructions. Specify boundaries and texture prompts in your request payloads.
Outpaint Blueprint
const result = await oneMage.images.outpaint({
imageUrl: 'https://assets.com/photo.png',
expandRight: 100,
prompt: 'seamless ocean background'
});
Smart Focal Cropping
Determine focal points and face coordinates automatically to frame thumbnails perfectly for grids.
Focal Framing
const cropped = await oneMage.images.transform('https://assets.com/face.png', {
crop: 'smart-focal',
width: 200,
height: 200
});