An API-wrapper for Kie's Image Machine (kim). Completely anonymous image hosting.
- Unlimited image uploads
- No api key required
- No config files required
- Built on request
kim supports the following file extensions:
Uploading an image to kim.
// require kim-apiconst kim = ;const path = ;// uploadkim
$ npm install kim-api
$ yarn add kim-api
Upload an image to kim. Returns a promise.
Get the datauri of an image uploaded to kim. Returns a promise.
Get the total amount of images uploaded to kim. Returns a promise.
If there's an error on kim server-sided, an Error will be thrown.
Error: kim-api error: recieved status code 400 - invalidFileExtension// stack trace ...
If not all arguments required for a method are provided, a TypeError will be thrown.
TypeError: No image provided// stack trace ...
.catch() these errors to prevent UnhandledPromiseRejectionWarnings.