Image to prompt generator API, powered by Replicate. It allows you to generate a prompt from an image.
- Clone this repository by running the following command in your console:
git clone https://github.com/meroitachi/Image2prompt.git && cp -r Image2prompt/. . && rm -rf Image2prompt
- Go to replicate.com and obtain an
api token
. - Open the
.env
file and paste theapi token
in it.
Note: If you are using Replit, go to secrets
and create a new key.
- Run the following command in your console to install the required dependencies:
npm install
To use the API, go to the fllowing URL:
This is just an example:
localhost:8080/generate?imageUrl=https://i.pinimg.com/originals/1e/6c/1d/1e6c1de30e099b4dc589237da3d71ec2.jpg&apiKey=key
or
example.example.repl.co/generate?imageUrl=https://i.pinimg.com/originals/1e/6c/1d/1e6c1de30e099b4dc589237da3d71ec2.jpg&apiKey=key
This API can be used to generate prompts from images. It can help artists, writers and other creative people generate new ideas for their work.
Conclusion: img2prompt is a powerful tool that can be used to create prompts from images. It can help artists, writers and other creative people generate new ideas for their work.