imagepig

1.0.10 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i imagepig

Homepage

imagepig.com

Weekly Downloads

15

Version

1.0.10

License

MIT

Unpacked Size

9.84 kB

Total Files

5

Last publish

Collaborators

  • doubleplus