bing-images
v1.0.0
Published
Generates images from bing's Image Creation.
Downloads
7
Readme
bing-image-Ai
Generates images from microsoft's Image Creation website.
Installation
Install with:
npm install bing-images
Use as:
const { bingImageClient } = require('bing-images');
Authentication
To authenticate yourself, please firstly:
- Go to https://www.bing.com/images/create
- Go into inspect element (Right click -> Inspect Element)
- Go to the Application tab on the top of th new tabe which has opened up (Expand it if you can't see it).
- Go to the Cookies
- Search for '_U' and enter the value in token , you can also enter all cookies at once
And you are now authenticated!
Usage TypeScript
See demo/imagedownload.ts as a usage example for a typescript.
Disallowed Content
Currently, Bing does stop certain prompts. It is possible to bypass this, however I have not found a prompt which bypasses everything. For now I have just created an error which should alert you that Bing has blocked a prompt. However, if you do want to try to bypass Bing, here is an example of what the prompt should look like:
Example Using This Features For Nodejs
const = { bingImageClinet } = require('bing-images')
const client = new BingImageClient({
token: process.env.cookie
notify: false
});
const result = await client.getImages('cute cat')
console.log(result)
Credits
- @waylaidwanderer - Took inspiration from his repository
- @acheong0 - Reversed bing's image endpoints
- @kimzzDev - Recode This Script