- Node.js LTS
- git
- pnpm
- clone repo:
git clone git@github.com:radekBednarik/gpt-image-model-cli-generator.git
- run command in the root of the project:
pnpm install
- create
.env
file in the root of the project and add your own OpenAI API key:
API_KEY=your_openai_api_key
Be aware, that for gpt-image-1
model you need to verify yourself via openai platform.
You will need to provide some form of valid credentials and provide your photos.
OpenAI is using Persona for this.
And of course, you will pay for the usage of the API, so prepare your card :)
pnpm go
If you have bun installed, you can easily compile the code to standalone application.
I have tested this on macOS/Linux.
bun install
pnpm build
Then just run it:
./gptcli
You can move the executable to have it wherever you want. When you run it, do not forget to prepend ENV variable with your API key, like this:
API_KEY=your_openai_api_key ./gptcli
- these are stored in
./downloaded_images/
relative to current working directory by default but you can override that.
- Linux Ubuntu LTS
- MacOS Sequoia