Skip to content

meroitachi/Image2prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

img2prompt API

Image to prompt generator API, powered by Replicate. It allows you to generate a prompt from an image.

Setup

  1. 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
  1. Go to replicate.com and obtain an api token.
  2. Open the .env file and paste the api token in it.

Note: If you are using Replit, go to secrets and create a new key.

  1. Run the following command in your console to install the required dependencies:
npm install

Usage

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

Note

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.