Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A npm library for Image Pig, the API for AI images.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages