imagepig
v1.0.10
Published
Package to use Image Pig, the API for AI images
Downloads
49
Readme
imagepig
A npm library for Image Pig, the API for AI images.
Installation
npm i imagepig
Example of usage
const ImagePig = require('imagepig');
void async function() {
// create instance of API (put here your actual API key)
const imagepig = ImagePig('your-api-key');
// call the API with a prompt to generate an image
const result = await imagepig.xl('cute piglet running on a green garden')
// save image to a file
await result.save('cute-piglet.jpeg');
// or access image data (Buffer)
await result.data;
}();
Contact us
Something does not work as expected? Feel free to send us a message, we are here for you.