1.0.8 • Published 5 months ago
@space-runners/ablo-ts-sdk v1.0.8
Ablo Typescript SDK
This is the official Ablo Typescript SDK.
Installation
npm install ablo-ts-sdk
Usage
To use the Ablo Typescript SDK, you need to initialize it with your API key. Here's a basic example of how to use the SDK:
import { Ablo } from 'ablo-ts-sdk'
const ablo = new Ablo('your-api-key')
// Example usage of the SDK
// GET /styles
const styles = await ablo.styles.getAll()
console.log('Styles:', styles)
// Background Removal
const backgroundRemovalResult = await ablo.backgroundRemoval.byUrl(
imageUrl: 'https://example.com/image.jpg',
)
console.log('Background removed image:', backgroundRemovalResult.image)
// FontMaker
const fontMakerResult = await ablo.fontMaker.run({
text: 'Hello World',
styleId: 'some-fontmaker-style-id',
})
console.log('FontMaker generated images:', fontMakerResult.images)
// Image Maker
const imageMakerResult = await ablo.imageMaker.run({
freeText: 'A beautiful sunset over the ocean',
styleId: 'some-imagemaker-style-id',
})
console.log('Image Maker generated images:', imageMakerResult.images)
// Photo Transformer
const photoTransformerResult = await ablo.photoTransformer.fromUrl({
imageUrl: 'https://example.com/image.jpg',
styleId: 'some-phototransformer-style-id',
})
console.log('Photo Transformer result:', photoTransformerResult.images)
// Inpainting
const inpaintingResult = await ablo.inpainting.run({
imageUrl: 'https://example.com/image.jpg',
maskUrl: 'https://example.com/mask.jpg',
})
console.log('Inpainting result:', inpaintingResult.images)
1.0.2
8 months ago
1.0.8
5 months ago
1.0.7
6 months ago
1.0.6
6 months ago
1.0.5
7 months ago
1.0.4
7 months ago
1.0.3
7 months ago
1.0.1
9 months ago
1.0.0
9 months ago
0.1.1
9 months ago
0.1.0
9 months ago
0.0.8
9 months ago
0.0.7
9 months ago
0.0.6
9 months ago
0.0.5
9 months ago
0.0.4
9 months ago
0.0.3
9 months ago
0.0.2
9 months ago
0.0.1
9 months ago